DocubixDocs
Dashboard

Conversations

Dashboard conversation API for testing and review.

These endpoints power the dashboard Playground and Conversations pages. They require the X-Clerk-User-Id header.

Conversation lifecycle

Create a conversation → send messages → receive assistant responses. Messages are stored with metadata including sources and token usage.

text
Conversation
    ↓
User message
    ↓
Assistant response

Create conversation

POST/conversations
curl
curl -X POST https://api.docubix.com/conversations -H "X-Clerk-User-Id: your_clerk_user_id" \
  -H "Content-Type: application/json" \
  -d '{"kb_id": "...", "title": "ATP Questions"}'
json
{
  "id": "..."
}

List conversations

GET/conversations?kb_id={optional}
curl
curl "https://api.docubix.com/conversations?kb_id=..." -H "X-Clerk-User-Id: your_clerk_user_id"

Get conversation

GET/conversations/{conversation_id}

Returns conversation info and full message history.

Send message

POST/conversations/{conversation_id}/messages
json
{
  "message": "What is ATP?"
}

Stream responses with POST /conversations/{id}/messages/stream (SSE, same token format as public chat).

Delete conversation

DELETE/conversations/{conversation_id}
json
{
  "success": true
}