New Open API Overview
The New Open API provides a modern, RESTful interface with improved features including cursor-based pagination, comprehensive filtering, and consistent response formats.
Base URL
Base URL: https://api.cekat.ai/api
All New Open API endpoints are prefixed with /api.
Key Features
Cursor Pagination
Efficient pagination with cursor-based navigation for large datasets.
Rich Filtering
Filter by date ranges, status, agents, and more.
Date Range Filters
Query data within specific time periods.
Available Endpoints
| Category | Endpoints |
|---|---|
| Messages | GET /api/messages, GET /api/messages/summary/ai_credits |
| Agents | GET /api/agents |
| Inboxes | GET /api/inboxes |
| Campaigns | GET /api/campaigns, GET /api/campaigns/:id/messages |
| Conversations | GET /api/conversations, GET /api/conversations/:id, PUT /api/conversations/:id |
| Contacts | GET /api/contacts |
| Templates | GET /api/templates |
| Agent Assignments | GET /api/conversations/agent-assignments, GET /api/agent_assignments |
Quick Examples
List Messages with Pagination
bash
curl -X GET "https://api.cekat.ai/api/messages?limit=50&before=msg_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"
Get AI Credits Summary
bash
curl -X GET "https://api.cekat.ai/api/messages/summary/ai_credits?from=2025-03-01&to=2025-03-31" \
-H "Authorization: Bearer YOUR_API_KEY"
Filter Conversations
bash
curl -X GET "https://api.cekat.ai/api/conversations?status=open&assigned_to=agent_123" \
-H "Authorization: Bearer YOUR_API_KEY"
Response Format
All responses follow a consistent JSON structure:
200 OK
{
"success": true,
"data": [
// Array of items
],
"pagination": {
"total": 150,
"limit": 50,
"offset": 0,
"has_more": true,
"next_cursor": "cursor_abc123"
}
}
Pagination
The New Open API uses cursor-based pagination for efficient data retrieval:
| Parameter | Type | Description |
|---|---|---|
limit | integer | Results per page (default: 50, max: 100) |
before | string | Cursor for previous page |
after | string | Cursor for next page |
offset | integer | Alternative offset-based pagination |
Date Filtering
Most list endpoints support date range filtering:
| Parameter | Format | Description |
|---|---|---|
from | ISO 8601 or YYYY-MM-DD | Start date |
to | ISO 8601 or YYYY-MM-DD | End date |
