Skip to content

Ask AI SRE a follow-up

POST
/ai-sre/conversations/{id}/messages
curl --request POST \
--url https://app.tunnelhq.com/api/v1/ai-sre/conversations/54/messages \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--header 'X-Project-Id: prj_12' \
--data '{ "question": "Was it slow before that?" }'

Asks a follow-up question in a conversation, and answers at once. Read the answer as for a new question. A conversation has one answer being written at a time.

The answer counts toward the project’s monthly limit, and it needs a role that can mute and pause monitors (Owner, Admin, and Manager by default).

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
Media typeapplication/json
object
question
required

The question, in plain words. A pasted list of servers fits whole.

string
>= 1 characters <= 20000 characters
attachments

Files for this question, from Add a file to an AI SRE question, as att_91. Your own files, not yet sent. Up to 5, and 40 PDF pages across them.

Array<string>
<= 5 items
Example
{
"question": "Was it slow before that?"
}

The follow-up is asked, and its answer is being written.

Media typeapplication/json
object
id
required

The conversation.

integer
running
required
boolean
url
required

The conversation’s page in the dashboard.

string
Example
{
"id": 54,
"running": true,
"url": "https://app.tunnelhq.com/ai-sre/c/54"
}
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 question is empty or too long, the monitor isn’t in the project, or 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": "Write a question first."
}

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 role can’t mute and pause monitors, which asking AI SRE needs, or 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": "Asking AI SRE needs a role that can mute and pause monitors."
}

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."
}

An answer is still being written in this 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": 409,
"message": "AI SRE is still answering. Wait for it to finish."
}

The project has used its answers for the month, already has 3 answers being written, or a usage limit was reached (see the other operations’ 429).

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": 429,
"message": "This project has used all its AI SRE answers for this month. An owner can raise the limit in AI SRE settings."
}

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"
}

This TunnelHQ server can’t run AI SRE now.

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": 503,
"message": "AI SRE is switched off on this server."
}