This API gives you an AI “analysis chat” over your conversation data.
Think of it as a stateful assistant: you create a chat once, then keep asking follow-up questions in the same thread.
1. What each endpoint is for
GET /api/v1/ender-chat: list existing chat sessions (history/inbox view).POST /api/v1/ender-chat: create a new chat and send the first question.GET /api/v1/ender-chat/{chat_id}: fetch one chat with full messages and current processing state.POST /api/v1/ender-chat/{chat_id}: send next question in an existing chat.PATCH /api/v1/ender-chat/{chat_id}: rename/deactivate/update chat metadata.
2. Important behavior (very important for integrations)
Processing is asynchronous.
POST /ender-chatandPOST /ender-chat/{chat_id}return quickly after queueing work.You must poll
GET /ender-chat/{chat_id}to see progress and responses.The next question is accepted only when:
is_active = trueworkflow_state = waiting_for_user
3. Typical flow
Create a chat with the first question.
Read returned
chat_id.Poll chat until
workflow_statebecomeswaiting_for_user.Read the newest AI response in
messages.Send a follow-up question to the same
chat_id.Repeat.
4. Human-friendly integration tips
Always save
chat_idclient-side after create.Show a “thinking” state while the workflow is not
waiting_for_user.If the user sends a message too early, handle
400and retry after polling.Use
PATCH /ender-chat/{chat_id}to rename chats so history is readable.Keep questions focused and specific; broad questions often need multiple iterations.
5. Common errors to expect
404 Chat session not found: wrong or deletedchat_id.400 Chat session is not active: chat was deactivated.400 Chat session is not ready for user input: still processing previous question.400 project_id and unassigned_only cannot be used togetheron the list endpoint.
I can also turn this into ready-to-paste endpoint descriptions for your Help Center article format if you want.
