For the complete documentation index, see llms.txt. This page is also available as Markdown.

Send a WhatsApp message

Sends a free-form WhatsApp message in an existing conversation. WhatsApp only delivers these within 24 hours of the contact's last message; outside that window, send a template with POST /templates/send.

The message is queued and the response returns right away with status: sent. Check delivery later with GET /messages/{message_id}.

media_type

What to send

text

message

image, video, document

file_url (the type is also detected from the file extension), with message as the caption

location

location with latitude and longitude, plus optional name and address

button

message and action.buttons: 1 to 3 buttons, each {"type": "reply", "reply": {"id", "title"}}; titles up to 20 characters

list

message and action with button (up to 20 characters) and sections: up to 10 sections, each with a title (up to 24 characters) and up to 10 rows of {"id", "title", "description"}

cta_url

message and action {"name": "cta_url", "parameters": {"display_text", "url"}}; display_text up to 20 characters

header ({"text"} or {"file_url"}) and footer (text) are optional for button, list and cta_url messages.

post
Authorizations
api_keystringRequired

Your business's Cekat API key, from Settings → Developers & API in the Cekat dashboard (https://chat.cekat.ai/developers?section=apikeys). Available on the Business and Enterprise plans.

Body
conversation_idstring · uuidRequired

A WhatsApp conversation.

messagestringOptional

Message text, or the caption for media.

media_typestring · enumOptionalDefault: textPossible values:
file_urlstring · uriOptional

Public URL of the image, video or document to send.

footerstringOptional
Responses
201

Message queued for sending.

application/json
successbooleanOptional
status_codeintegerOptional
post/messages/whatsapp
POST /messages/whatsapp HTTP/1.1
Host: api.cekat.ai
api_key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 107

{
  "conversation_id": "3a4b5c6d-7e8f-4a0b-9c1d-2e3f4a5b6c7d",
  "message": "Pesanan Anda sudah dikirim hari ini."
}
{
  "success": true,
  "status_code": 201,
  "data": {
    "id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
    "message": "Pesanan Anda sudah dikirim hari ini.",
    "sent_by": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
    "sent_by_name": "Admin Toko",
    "sent_by_type": "api",
    "conversation_id": "3a4b5c6d-7e8f-4a0b-9c1d-2e3f4a5b6c7d",
    "business_id": "2f7431e4-cd89-4daf-a40d-a5d779b3dd1e",
    "media_url": null,
    "media_type": "text",
    "status": "sent",
    "error": null,
    "is_deleted": false,
    "additional_data": {
      "billing_mode": "credit_card",
      "is_balance_locked": false
    },
    "action": null,
    "header": null,
    "footer": {
      "text": null
    },
    "location": null
  }
}

Last updated