Send a message to a Kai thread (SSE)
const url = 'http://localhost:8000/api/support/threads/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/messages/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"content":"example","attachment_ids":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8000/api/support/threads/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/messages/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "content": "example", "attachment_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'GET returns the persisted conversation, oldest first.
POST sends one user turn ({content}) and streams the assistant answer as text/event-stream with the same frame contract as /api/support/ask/ (meta → token* → citations → done); both turns are persisted server-side, so history is never re-sent by the client. An invalid body yields a single event: error frame with HTTP 400. POST shares the paid-LLM rate limit with /ask/; exceeding it returns 429.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”UI language (en / ru / es, default en) — localises attachment snapshot labels on create and retrieval + answers on message send.
Request Bodyrequired
Section titled “Request Bodyrequired”Body of POST /api/support/threads/{id}/messages/ — one user turn;
history is server-owned (unlike the legacy /ask/ full-transcript body).
attachment_ids binds previously-uploaded pending files (composer
chips) to this turn.
object
Examplegenerated
{ "content": "example", "attachment_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ]}Body of POST /api/support/threads/{id}/messages/ — one user turn;
history is server-owned (unlike the legacy /ask/ full-transcript body).
attachment_ids binds previously-uploaded pending files (composer
chips) to this turn.
object
Examplegenerated
content=example&attachment_ids=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0Body of POST /api/support/threads/{id}/messages/ — one user turn;
history is server-owned (unlike the legacy /ask/ full-transcript body).
attachment_ids binds previously-uploaded pending files (composer
chips) to this turn.
object
Responses
Section titled “Responses”text/event-stream of support-answer frames (see description).
object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examplegenerated
{ "detail": "example"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examplegenerated
{ "detail": "example"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examplegenerated
{ "detail": "example"}object
429 — rate limit exceeded. Honour the Retry-After response header (seconds to wait) before retrying; it is sent on every 429.
Examplegenerated
{ "detail": "example"}