Skip to content

Get an AI SRE conversation

GET
/ai-sre/conversations/{id}
curl --request GET \
--url https://app.tunnelhq.com/api/v1/ai-sre/conversations/54 \
--header 'X-API-Key: <X-API-Key>' \
--header 'X-Project-Id: prj_12'

One conversation with its questions and answers. Any role in the project can call it.

While running is true, the last answer is still being written: its steps so far are there. Read it again in a few seconds. An answer’s status is then done, failed, or stopped.

A change AI SRE suggests is in the answer’s changes. While it waits for a person, its status is proposed and approve_url opens the conversation in the dashboard, where a signed-in person approves it.

Need an API key? See Getting an API key.

id
required
integer
>= 1

The conversation’s id, a number such as 54, from Ask AI SRE or List AI SRE conversations.

Example
54
X-Project-Id
required
string

The project, as prj_12 or 12. A workspace key can only reach its own workspace’s projects.

Example
prj_12

The conversation.

Media typeapplication/json
object
id
required
integer
title
required
string
source
required
string
Allowed values: asked incident
monitor_id
required

The tunnel or check it’s about, as srv_57, or null.

string | null
running
required

Whether the last answer is still being written.

boolean
url
required

The conversation’s page in the dashboard.

string
created_at
required

ISO 8601, UTC.

string
messages
required

Each question and answer, oldest first.

Array<object>
object
id
required
integer
role
required
string
Allowed values: user assistant
status
required

A question is always done.

string
Allowed values: running done failed stopped
text

Questions only: what was asked. A pasted link or config shows as dots.

string
attachments

Questions only: the files sent with it.

Array<object>
object
id
required
string
kind
required
string
Allowed values: image pdf text
name
required
string
size
required

In bytes.

integer
width

Pictures only.

integer
height

Pictures only.

integer
pages

PDFs only.

integer
masked

Only when uploaded: something in the text file was hidden.

boolean
stays_in_tunnelhq

A VPN config or share link inside stays in TunnelHQ and isn’t sent to the AI provider.

boolean
removed

In a conversation: its contents were deleted, after 30 days or by hand.

boolean
download_url

In a conversation, to a role that can edit monitors, while the contents are kept.

string
answer

Answers only. null until it’s written, and for one that failed or was stopped.

object
headline
string
body
string
facts
Array<object>
object
label
string
text
string
ruled_out
Array<object>
object
cause
string
found
string
visuals

Up to two tables or charts

Array<object>
object
steps_by_hand

Steps for a person to follow.

string | null
commands

Commands to run on the server. Check them with whoever runs it first.

string | null
needs_agent

Whether a better answer needs the TunnelHQ agent on the server.

boolean
error

Answers only: why it failed.

string | null
steps

Answers only: what it read, step by step.

Array<object>
object
label
string
at

UTC, as YYYY-MM-DD HH:MM:SS.

string
changes

Answers only: changes it suggested.

Array<object>
object
title
string
detail
string | null
status

proposed while it waits for a person.

string
approve_url

Only while proposed: where a signed-in person approves it in the dashboard.

string
counted

Stopped answers only: whether it counts toward the month.

boolean
created_at
required

ISO 8601, UTC.

string
finished_at
required

ISO 8601, UTC.

string | null
Example
{
"id": 54,
"title": "Why sg-vless-01 is down",
"source": "asked",
"monitor_id": "srv_57",
"running": false,
"url": "https://app.tunnelhq.com/ai-sre/c/54",
"created_at": "2026-11-10T13:20:11.000Z",
"messages": [
{
"id": 301,
"role": "user",
"status": "done",
"text": "Why is it down?",
"created_at": "2026-11-10T13:20:11.000Z",
"finished_at": null
},
{
"id": 302,
"role": "assistant",
"status": "done",
"answer": {
"headline": "The server stopped answering on port 443 at 13:12 UTC.",
"body": "Every location fails at the connect step, and the Trojan tunnel on the same server is still up, so the server runs but the VLESS service on it doesn't.",
"facts": [
{
"label": "Down since",
"text": "13:12 UTC, 8 checks in a row"
}
],
"ruled_out": [
{
"cause": "The network",
"found": "The Trojan tunnel on the same server passes."
}
],
"visuals": [],
"steps_by_hand": null,
"commands": "systemctl restart xray",
"needs_agent": false
},
"error": null,
"steps": [
{
"label": "Read the tunnel's last checks",
"at": "2026-11-10 13:20:14"
}
],
"changes": [],
"created_at": "2026-11-10T13:20:11.000Z",
"finished_at": "2026-11-10T13:21:40.000Z"
}
]
}
X-RateLimit-Limit
integer

Requests the workspace’s plan allows per minute.

X-RateLimit-Remaining
integer

Requests left in the current minute.

X-RateLimit-Reset
integer

Unix time, in seconds, when the current minute ends.

The X-Project-Id header is missing or malformed.

Media typeapplication/json
object
error
required
boolean
code
required

The HTTP status, repeated.

integer
message
required

What went wrong.

string
details

More detail, on some errors.

retry_after

Seconds to wait, on the 429 for wrong keys.

integer
Examples
{
"error": true,
"code": 400,
"message": "X-Project-Id header is required (e.g. prj_1 or numeric id)"
}

The API key is missing, wrong, expired, switched off, or no longer valid.

Media typeapplication/json
object
error
required
boolean
code
required

The HTTP status, repeated.

integer
message
required

What went wrong.

string
details

More detail, on some errors.

retry_after

Seconds to wait, on the 429 for wrong keys.

integer
Examples
{
"error": true,
"code": 401,
"message": "API key is required. Provide X-API-Key header or Authorization: Bearer <key>"
}

The key can’t reach this project.

Media typeapplication/json
object
error
required
boolean
code
required

The HTTP status, repeated.

integer
message
required

What went wrong.

string
details

More detail, on some errors.

retry_after

Seconds to wait, on the 429 for wrong keys.

integer
Examples
{
"error": true,
"code": 403,
"message": "This API key is scoped to a different organization"
}

The project has no such conversation.

Media typeapplication/json
object
error
required
boolean
code
required

The HTTP status, repeated.

integer
message
required

What went wrong.

string
details

More detail, on some errors.

retry_after

Seconds to wait, on the 429 for wrong keys.

integer
Example
{
"error": true,
"code": 404,
"message": "No such conversation in this project."
}

A usage limit was reached, or this IP address made too many requests with a wrong key.

Usage limits are per workspace and plan: per minute (Retry-After: 60), per day (Retry-After: 3600), and per month (no Retry-After). They use their own body shape. An IP address may send 10 wrong keys a minute; one more is allowed every 6 seconds. While that allowance is used up, every request from the address is refused, even one with a valid key.

Media typeapplication/json
One of:
object
error
required
string
Allowed values: Rate limit exceeded Daily limit exceeded Monthly limit exceeded
message
required
string
retry_after

Seconds to wait. Absent for the monthly limit.

integer
Examples
{
"error": "Rate limit exceeded",
"message": "Per-minute limit of 60 requests exceeded",
"retry_after": 60
}
Retry-After
integer

Seconds to wait. 60 for the per-minute limit, 3600 for the daily limit, 6 after wrong keys. Absent for the monthly limit.

Something failed on TunnelHQ’s side.

Media typeapplication/json
object
error
required
boolean
code
required

The HTTP status, repeated.

integer
message
required

What went wrong.

string
details

More detail, on some errors.

retry_after

Seconds to wait, on the 429 for wrong keys.

integer
Example
{
"error": true,
"code": 500,
"message": "Internal server error"
}