List messages
Halaman ini belum tersedia dalam Bahasa Indonesia. Menampilkan bahasa default (English).
List messages
https://api.cekat.ai/api/messagesLists messages across your business, or in one conversation, with each message’s contact and inbox.
Without date filters, only today’s messages are returned (in your X-User-Timezone, default Asia/Jakarta). With only a start date, results run to the end of today.
Authorization
Your Cekat API key, from Settings → Developers & API in the Cekat dashboard.
Alternative to api_key: send the same key as Bearer YOUR_API_KEY.
Query parameters
1min: 1100min: 1max: 2000asc, desc"desc"true to return only contact messages that came from a click-to-WhatsApp ad.
falsetrue for template messages only, false to exclude them.
Only include items created on or after this date (YYYY-MM-DD). Cannot be combined with start_datetime.
Only include items created on or before the end of this date (YYYY-MM-DD). Cannot be combined with end_datetime.
Only include items created at or after this time (YYYY-MM-DDTHH:mm:ss, optional offset such as +07:00 or Z). Cannot be combined with start_date.
Only include items created at or before this time (YYYY-MM-DDTHH:mm:ss, optional offset). Cannot be combined with end_date.
Response format version in YYYY-MM-DD format. Use 2026-05-22 or later to get created_at as an ISO 8601 UTC timestamp.
^\d{4}-\d{2}-\d{2}$Headers
IANA time zone used to read date filters that have no offset. Defaults to Asia/Jakarta.
Response
A page of messages.
Show child attributes
ID of the sender (agent, AI agent, contact or system).
Who sent the message, for example user (the contact), agent, api or system.
The channel's message ID, for example the WhatsApp message ID.
Delivery status, for example sent, delivered, read or failed.
ISO 8601 UTC with version=2026-05-22 or later; otherwise YYYY-MM-DD HH:mm:ss in Asia/Jakarta time.
AI credits used to generate the message, for AI replies.
Extra data, such as the ad referral for messages that came from a click-to-WhatsApp ad.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
A filter is invalid, or limit is above 2000.
Show child attributes
Request ID. Include it when contacting Cekat support.
The API key is missing or invalid.
Show child attributes
Request ID. Include it when contacting Cekat support.
Rate limit exceeded. Wait and retry.
curl --request GET \
--url 'https://api.cekat.ai/api/messages' \
--header 'api_key: YOUR_API_KEY'
const response = await fetch('https://api.cekat.ai/api/messages', {
method: 'GET',
headers: { 'api_key': 'YOUR_API_KEY' },
});
const data = await response.json();
console.log(data);
import requests
url = "https://api.cekat.ai/api/messages"
headers = {"api_key": "YOUR_API_KEY"}
response = requests.get(url, headers=headers)
print(response.json())
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.cekat.ai/api/messages',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['api_key: YOUR_API_KEY'],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{
"success": true,
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"sent_by": "<string>",
"sent_by_name": "example_name",
"sent_by_type": "<string>",
"media_type": "<string>",
"media_url": "https://example.com",
"platform_mid": "<string>",
"status": "<string>",
"is_template": true,
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z",
"chat_credits_used": 10000,
"location": {},
"action": {},
"additional_data": {},
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"display_name": "Jane Doe",
"phone_number": "6281234567890",
"platform_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "example_name",
"type": "<string>"
},
"inbox": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Jane Doe",
"phone_number": "6281234567890",
"type": "<string>"
}
}
],
"metadata": {
"pagination": {
"current_page": 1,
"current_items": 1,
"total_page": 1,
"total_items": 1
}
}
}
{
"success": true,
"message": "<string>",
"statusCode": 1,
"error": {
"message": "<string>"
},
"correlationId": "<string>"
}
{
"success": true,
"message": "<string>",
"statusCode": 1,
"error": {
"message": "<string>"
},
"correlationId": "<string>"
}
{
"message": "<string>"
}