List messages in a conversation

이 페이지는 아직 한국어 언어로 제공되지 않습니다. 기본 언어(English)로 표시합니다.

List messages in a conversation

GEThttps://api.cekat.ai/messages

Lists every message in one conversation, newest first. Use GET /api/messages to search across conversations or by date.

Authorization

api_keystringheaderrequired

Your Cekat API key, from Settings → Developers & API in the Cekat dashboard.

Query parameters

conversation_idstring<uuid>required
pageinteger
default: 1min: 1
limitinteger
default: 1000min: 1

Response

200
400
401
404
429

The conversation's messages.

successboolean
status_codeinteger
dataChatMessage[]
Show child attributes
idstring
conversation_idstring<uuid>
messagestring | null
sent_bystring | null

ID of the sender (agent, AI agent, contact or system).

sent_by_namestring | null
sent_by_typestring

Who sent the message, for example user (the contact), agent, api or system.

media_typestring | null
media_urlstring | null
platform_midstring | null

The channel's message ID, for example the WhatsApp message ID.

statusstring | null

Delivery status, for example sent, delivered, read or failed.

is_templateboolean | null
created_atstring

ISO 8601 UTC with version=2026-05-22 or later; otherwise YYYY-MM-DD HH:mm:ss in Asia/Jakarta time.

updated_atstring | null
chat_credits_usednumber | null

AI credits used to generate the message, for AI replies.

locationobject | null
actionobject | null
additional_dataobject | null

Extra data, such as the ad referral for messages that came from a click-to-WhatsApp ad.

contactobject
Show child attributes
idstring<uuid>
display_namestring
phone_numberstring | null
platform_idstring | null
usernamestring | null
typestring
inboxobject
Show child attributes
idstring<uuid>
business_idstring<uuid>
namestring
phone_numberstring | null
typestring

conversation_id is missing.

successboolean
status_codeinteger
errorobject
Show child attributes
messagestring

The API key is missing or invalid.

successboolean
status_codeinteger
errorobject
Show child attributes
messagestring

The conversation was not found.

successboolean
status_codeinteger
errorobject
Show child attributes
messagestring

Rate limit exceeded. Wait and retry.

messagestring
GET/messages
cURL
JavaScript
Python
PHP
curl --request GET \
  --url 'https://api.cekat.ai/messages?conversation_id=3c90c3cc-0d44-4b50-8888-8dd25736052a' \
  --header 'api_key: YOUR_API_KEY'
const response = await fetch('https://api.cekat.ai/messages?conversation_id=3c90c3cc-0d44-4b50-8888-8dd25736052a', {
  method: 'GET',
  headers: { 'api_key': 'YOUR_API_KEY' },
});

const data = await response.json();
console.log(data);
import requests

url = "https://api.cekat.ai/messages?conversation_id=3c90c3cc-0d44-4b50-8888-8dd25736052a"
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/messages?conversation_id=3c90c3cc-0d44-4b50-8888-8dd25736052a',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['api_key: YOUR_API_KEY'],
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response
200
400
401
404
429
{
  "success": true,
  "status_code": 1,
  "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>"
      }
    }
  ]
}
{
  "success": true,
  "status_code": 1,
  "error": {
    "message": "<string>"
  }
}
{
  "success": true,
  "status_code": 1,
  "error": {
    "message": "<string>"
  }
}
{
  "success": true,
  "status_code": 1,
  "error": {
    "message": "<string>"
  }
}
{
  "message": "<string>"
}