Conversations API
Query, filter, and manage conversations with comprehensive agent assignment tracking.
List Conversations
GET/api/conversations
Retrieve conversations with filtering and cursor-based pagination.
Query Parameters
limitinteger
Results per page (default: 10)
inbox_idstring
Filter by inbox ID
stage_statusstring
Filter by status: assigned, resolved, pending
cursor_idstring
Cursor ID for pagination
cursor_tsstring
Cursor timestamp for pagination
bash
curl -X GET "https://api.cekat.ai/api/conversations?limit=5" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
200 OK
{
"success": true,
"data": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"inbox_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"contact_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"contact_name": "Customer Name",
"contact_phone": "6281234567890",
"platform_type": "whatsapp",
"inbox_name": "CekatAI Support",
"stage_status": "assigned",
"handled_by_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"handled_by_name": "Agent Name",
"notes": "",
"labels": [
{ "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name": "Important" }
],
"last_message": {
"message": "Hello, how can I help?",
"created_at": "2026-04-10T09:24:23.237+00:00"
},
"first_message": {
"message": "Hi, I have a question"
},
"additional_data": {
"Email Akun Cekat": "[email protected]",
"business_name": "Company Name"
},
"created_at": "2026-04-10T05:47:16.771+00:00",
"resolved_at": null,
"resolved_by_id": null,
"resolved_by_name": null
}
],
"metadata": {
"next_cursor": {
"cursor_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"cursor_ts": "2026-04-10T09:51:19.885"
}
}
}
Conversation Object
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique conversation identifier |
inbox_id | string | Source inbox ID |
contact_id | string | Contact ID |
contact_name | string | Contact display name |
contact_phone | string | Contact phone number |
platform_type | string | Platform: whatsapp, livechat, messenger, instagram |
inbox_name | string | Inbox display name |
stage_status | string | Status: assigned, resolved, pending |
handled_by_id | string | Assigned agent ID (nullable) |
handled_by_name | string | Assigned agent name (nullable) |
labels | array | Array of label objects with id and name |
last_message | object | Last message preview |
first_message | object | First message preview |
additional_data | object | Custom metadata object |
notes | string | Conversation notes |
created_at | string | Creation timestamp |
resolved_at | string | Resolution timestamp (nullable) |
Stage Status Values
| Status | Description |
|---|---|
assigned | Conversation is assigned to an agent |
resolved | Conversation has been resolved |
pending | Conversation is waiting for assignment |
Code Examples
javascript
const getConversations = async (filters = {}) => {
const params = new URLSearchParams(filters);
const response = await fetch(
`https://api.cekat.ai/api/conversations?${params}`,
{ headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
return response.json();
};
// Get assigned conversations
const assigned = await getConversations({
stage_status: 'assigned',
limit: 20
});
// Get conversations for specific inbox
const inboxConvos = await getConversations({
inbox_id: 'your-inbox-id',
limit: 20
});
console.log(`Found ${assigned.data.length} assigned conversations`);
