Skip to main content

Endpoints

  • GET /api/conversations
  • GET /api/conversations/{conversation_id}
  • PATCH /api/conversations/{conversation_id}
  • DELETE /api/conversations/{conversation_id}

Resource Shapes

Conversation summary

{
  "id": "string",
  "title": "string",
  "sidebar_title": "string",
  "last_message": "ISO timestamp",
  "message_count": 4
}

Conversation detail

{
  "id": "string",
  "title": "string",
  "messages": [
    {
      "role": "user",
      "content": "text",
      "sources": [],
      "max_rerank_score": 0.73,
      "model_name": "llama-3.3-70b-versatile",
      "provider": "groq",
      "timestamp": "ISO timestamp"
    }
  ],
  "created_at": "ISO timestamp",
  "updated_at": "ISO timestamp"
}

Behavior Contracts

GET /api/conversations

  • query: limit (default 20, max 100)
  • ordered by most recently updated
  • sidebar_title is the short label used by the left sidebar “Recently Asked” list
  • sidebar_title is generated from the first user message and normalized to drop low-value leading demonstratives (this, that, these, those)

GET /api/conversations/{conversation_id}

  • returns full message timeline in chronological order
  • 404 if not found

PATCH /api/conversations/{conversation_id}

Request:
{ "title": "New title" }
  • title required and non-empty
  • unknown fields rejected
  • 404 if conversation missing

DELETE /api/conversations/{conversation_id}

  • returns success object on delete
  • cascades to related messages/feedback via FK rules

Important Note

Conversations are not created via a standalone create endpoint. They are created implicitly when chat endpoints are called.