Conversations API
Conversations API
Section titled “Conversations API”Retrieve and manage customer conversations.
List Conversations
Section titled “List Conversations”GET /v1/projects/:project_id/conversationsReturns conversations for a project, with optional filters.
Query parameters:
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status: active, closed, escalated |
channel | string | Filter by channel: telegram, jivo |
limit | integer | Max results per page (default: 50) |
offset | integer | Pagination offset |
Response:
{ "conversations": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "project_id": "my-company", "channel": "telegram", "user_name": "John", "status": "active", "created_at": "2025-03-20T14:00:00Z", "updated_at": "2025-03-20T14:15:00Z" } ]}Get Messages
Section titled “Get Messages”GET /v1/conversations/:id/messagesReturns all messages in a conversation.
Response:
{ "messages": [ { "id": "msg-001", "role": "user", "content": "My server is not responding", "created_at": "2025-03-20T14:00:00Z" }, { "id": "msg-002", "role": "assistant", "content": "I'll check the status of your server right away...", "model": "gpt-4", "created_at": "2025-03-20T14:00:02Z" } ]}Update Conversation Status
Section titled “Update Conversation Status”PATCH /v1/conversations/:id/statusChange the status of a conversation.
Request body:
{ "status": "closed"}Valid statuses: active, closed, escalated.
Get Conversation Quality
Section titled “Get Conversation Quality”GET /v1/conversations/:id/qualityReturns quality metrics for a conversation, including B-score components.
Rate Conversation
Section titled “Rate Conversation”POST /v1/conversations/:id/rateSubmit a quality rating for a conversation.