Chat
Send a chat query and receive an AI response.
This endpoint creates a new chat session if no session_id is provided, or reuses an existing session to maintain conversation context.
Usage:
POST to this endpoint with your question
Receive session_id, message_id, and message_url in response
Poll the message_url or GET /app/api/v1/chat/{session_id}/message/{message_id} for results
(Optional) Include session_id query param in subsequent queries to maintain context
(Optional) Include retry_from_query_id to retry a failed query (error or timed_out) in the same session. Attached files from the source query are reused when present.
Optional: UUID of existing chat session to maintain conversation context
Your question or chat message
Optional: message ID of a failed query in the same session to retry (source must be error or timed_out). Reuses attached files from the source query when present.
Chat query created successfully. Use the message_url to poll for results.
Bad request - invalid input
Unauthorized
Access denied
Resource not found
Another query in this session is still pending
System error
System not ready for requests
POST /app/api/v1/chat/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 82
{
"text": "text",
"files": [
{
"name": "text",
"content": "text"
}
],
"retry_from_query_id": 1
}{
"session_id": "123e4567-e89b-12d3-a456-426614174000",
"message_id": 1,
"message_url": "text"
}Get the status and result of a chat message.
Poll until status is no longer pending (done, canceled, error, or timed_out).
response_text is null while pending; set on success or with an error message on failure.
response_citations is populated only when status is done.
progress_messages lists processing updates while pending (last entry is current).
The message ID returned from POST /app/api/v1/chat/
The chat session ID (UUID)
Chat message details with status and response (if complete)
A chat query with its CSV citation bodies inline, as core sent them.
The bodies are stored in ChatQueryCsvPart and put back here: API-key clients can't reach the preview /
download endpoints. Reads the parts through instance.csv_parts, so a list read should prefetch them.
pending- Pendingdone- Donecanceled- Cancelederror- Errortimed_out- Timed Out
Bad request - invalid input
Unauthorized
Access denied
Resource not found
System error
System not ready for requests
GET /app/api/v1/chat/{session_id}/message/{message_id} HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"id": 1,
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"chat_session": "123e4567-e89b-12d3-a456-426614174000",
"request_user": {
"id": 1,
"first_name": "text",
"last_name": "text",
"email": "name@gmail.com",
"role": "admin",
"oidc_user_id": "text"
},
"request_text": "text",
"request_files": null,
"response_text": "text",
"response_citations": null,
"interview": {
"id": 1,
"summary": "text",
"created_at": "2026-01-01T00:00:00.000Z",
"started_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"completed_at": "2026-01-01T00:00:00.000Z",
"status": "pending",
"auto_approved": true,
"interviewee_email": "text",
"question": "text",
"context": "text",
"chat_history": null,
"error_msg": "text",
"communicator": "text",
"investigation": 1
},
"status": "pending",
"progress_messages": [
{
"id": 1,
"message": "text",
"timestamp": 1
}
]
}Last updated
Was this helpful?