Check or reserve template-message balance
Returns the billing details for sending one template message to a phone number and, on prepaid credit-line inboxes, reserves the estimated cost against message_id.
POST /templates/send and campaigns already do this for you, so you only need this endpoint if you send templates through your own WhatsApp integration and bill through Cekat. Calling it with the same message_id again returns the existing reservation.
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.
Your unique ID for the message. The reservation is tied to it.
Recipient's number, digits only with country code. Used to price the message.
62812345678901234567890123456Optional conversation to bill against. Found from the phone number if left out.
Billing details for the message.
A required field is missing or invalid, or there is not enough balance.
The API key is missing or invalid.
The template or inbox was not found.
Rate limit exceeded. Wait and retry.
POST /api/templates/lock-balance HTTP/1.1
Host: api.cekat.ai
api_key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 195
{
"message_id": "text",
"phone_number": "6281234567890",
"inbox_id": "123e4567-e89b-12d3-a456-426614174000",
"wa_template_id": "1234567890123456",
"conversation_id": "123e4567-e89b-12d3-a456-426614174000"
}{
"success": true,
"data": {
"billing_mode": "credit_line_prepaid",
"is_balance_locked": true,
"estimated_price": 586.5,
"currency_code": "IDR",
"to_country_code": "62",
"template_id": "1234567890123456",
"template_category": "marketing",
"inbox_id": "0f9e8d7c-6b5a-4c3d-2e1f-0a9b8c7d6e5f",
"wa_business_id": "109876543210987",
"billing_settlement_status": "pending",
"billing_lock_reference_type": "single_send",
"billing_lock_reference_id": "msg-20261012-0001"
}
}Last updated