Skip to main content
GET
/
v1
/
admin
/
conversations
List Conversations
curl --request GET \
  --url https://api.example.com/v1/admin/conversations \
  --header 'x-admin-api-key: <x-admin-api-key>'
{
  "conversations": [
    {
      "_id": "<string>",
      "_creationTime": 123,
      "sessionId": "<string>",
      "createdAt": 123,
      "updatedAt": 123,
      "lastMessage": "<string>"
    }
  ],
  "total": 123,
  "error": "<string>"
}
Retrieves a paginated list of all conversations in the system.

Authentication

This endpoint requires admin authentication via the x-admin-api-key header.
x-admin-api-key
string
required
Admin API key for authentication

Query Parameters

limit
number
default:100
Maximum number of conversations to return. Must be a positive integer up to 200.

Response

conversations
ConversationSummary[]
Array of conversation summaries
total
number
Total number of conversations in the system (before limit is applied)

Example Request

curl -X GET "https://your-domain.com/v1/admin/conversations?limit=50" \
  -H "x-admin-api-key: your-admin-api-key"

Example Response

{
  "conversations": [
    {
      "_id": "jd7s8dk2ls8dk3ks9d",
      "_creationTime": 1709481600000,
      "sessionId": "user-session-123",
      "createdAt": 1709481600000,
      "updatedAt": 1709481650000,
      "lastMessage": "Thank you for your help!"
    }
  ],
  "total": 145
}

Error Responses

error
string
Error message

400 Bad Request

{
  "error": "Invalid query parameters"
}

401 Unauthorized

{
  "error": "Unauthorized"
}

503 Service Unavailable

{
  "error": "ADMIN_API_KEY is not configured on this deployment"
}

Build docs developers (and LLMs) love