Ask the in-app support assistant (SSE)
const url = 'http://localhost:8000/api/support/ask/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"messages":[{"role":"user","content":"example"}]}'};
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/ask/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "messages": [ { "role": "user", "content": "example" } ] }'Server-sent events stream answering a coach’s product / how-to question, grounded in AiKYNETIX’s in-app help content. Send the conversation so far in messages (the latest user turn is the question; earlier turns give context for follow-ups).
Frame sequence: event: meta ({mode, model, lang}) → event: token ({text} chunks, concatenate for the answer) → event: citations ({sources: [...]} — friendly help-section titles) → event: done ({ok, escalate, support_email}).
When the help content doesn’t cover the question, escalate is true and the answer suggests emailing support@aikynetix.com instead of guessing. An invalid body yields a single event: error frame with HTTP 400.
Rate-limited per user (this is the one endpoint backed by a paid model); exceeding the limit returns 429 with a Retry-After header. The conversation accepts at most 30 messages, each up to 4000 characters.
Answers are grounded in user-facing help only — no internal docs, field names, or team/user data are ever included.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Body of POST /api/support/ask/ — the conversation so far. The latest
user message is the question; earlier turns give the assistant context for
follow-ups. Bounded so a caller can’t push an unbounded prompt at the LLM.
object
One turn in the support conversation.
object
user- userassistant- assistant
Body of POST /api/support/ask/ — the conversation so far. The latest
user message is the question; earlier turns give the assistant context for
follow-ups. Bounded so a caller can’t push an unbounded prompt at the LLM.
object
One turn in the support conversation.
object
user- userassistant- assistant
Body of POST /api/support/ask/ — the conversation so far. The latest
user message is the question; earlier turns give the assistant context for
follow-ups. Bounded so a caller can’t push an unbounded prompt at the LLM.
object
One turn in the support conversation.
object
user- userassistant- assistant
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
429 — rate limit exceeded. Honour the Retry-After response header (seconds to wait) before retrying; it is sent on every 429.
Examplegenerated
{ "detail": "example"}