Skip to main content

Ender GPT Chats API - Generative Analytics

Ender Chat API: dev guide

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-chat and POST /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 = true

    • workflow_state = waiting_for_user

3. Typical flow

  1. Create a chat with the first question.

  2. Read returned chat_id.

  3. Poll chat until workflow_state becomes waiting_for_user.

  4. Read the newest AI response in messages.

  5. Send a follow-up question to the same chat_id.

  6. Repeat.

4. Human-friendly integration tips

  • Always save chat_id client-side after create.

  • Show a “thinking” state while the workflow is not waiting_for_user.

  • If the user sends a message too early, handle 400 and 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 deleted chat_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 together on the list endpoint.

I can also turn this into ready-to-paste endpoint descriptions for your Help Center article format if you want.

Did this answer your question?