Inboxes Endpoints
Retrieve the list of inboxes (channels) configured for your business account.
List Inboxes
GET/inboxes
Get all inboxes associated with your account, including WhatsApp, Instagram, and Live Chat channels.
Authentication
Requires Bearer token authentication in the Authorization header.
bash
curl -X GET "https://api.cekat.ai/inboxes" \
-H "Authorization: Bearer YOUR_API_KEY"
Query Parameters
typestring
Filter by inbox type: whatsapp, instagram, livechat, telegram
statusstring
Filter by status: active, inactive, pending
limitinteger
Maximum number of results to return (default: 50, max: 100)
offsetinteger
Number of results to skip for pagination
Response
200 OK
{
"success": true,
"data": [
{
"id": "inbox_abc123",
"name": "Customer Support",
"type": "whatsapp",
"status": "active",
"phone_number": "+62812345678",
"created_at": "2025-01-15T08:00:00Z",
".Messages_count": 15420
},
{
"id": "inbox_def456",
"name": "Instagram DM",
"type": "instagram",
"status": "active",
"instagram_account_id": "ig_789",
"created_at": "2025-02-01T10:30:00Z",
"messages_count": 8932
}
],
"pagination": {
"total": 15,
"limit": 50,
"offset": 0
}
}
Inbox Object
| Field | Type | Description |
|---|---|---|
id | string | Unique inbox identifier |
name | string | Display name of the inbox |
type | string | Channel type: whatsapp, instagram, livechat, telegram |
status | string | Current status: active, inactive, pending |
phone_number | string | WhatsApp phone number (for type: whatsapp) |
instagram_account_id | string | Instagram account ID (for type: instagram) |
created_at | string | ISO 8601 timestamp |
messages_count | integer | Total messages in this inbox |
Code Examples
javascript
const response = await fetch('https://api.cekat.ai/inboxes', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const { data } = await response.json();
// Filter active WhatsApp inboxes
const whatsappInboxes = data.filter(
inbox => inbox.type === 'whatsapp' && inbox.status === 'active'
);
console.log(`Found ${whatsappInboxes.length} WhatsApp inboxes`);
Error Responses
json
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired API key"
}
}
json
{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}
