> For the complete documentation index, see [llms.txt](https://docs.cekat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cekat.ai/api-documentation/chat/message/check-or-reserve-service-message-balance.md).

# Check or reserve service-message balance

Returns the billing details for sending one free-form WhatsApp message in a conversation and, on prepaid credit-line inboxes, reserves the cost against `message_id`.

`POST /messages/whatsapp` already does this for you, so you only need this endpoint if you send WhatsApp messages through your own integration and bill through Cekat.

```json
{"openapi":"3.0.3","info":{"title":"Cekat Open API","version":"1.0.0"},"tags":[{"name":"Message","description":"Read the messages in your conversations and send WhatsApp messages from the API.\n\nTo start a new conversation, or to message a contact who hasn't written to you in the last 24 hours, use an approved template with `POST /templates/send`. WhatsApp only allows free-form messages (`POST /messages/whatsapp`) within 24 hours of the contact's last message.\n"}],"servers":[{"url":"https://api.cekat.ai","description":"Production"}],"security":[{"CekatApiKey":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"CekatApiKey":{"type":"apiKey","in":"header","name":"api_key","description":"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."},"BearerAuth":{"type":"http","scheme":"bearer","description":"The same Cekat API key, sent as `Authorization: Bearer YOUR_API_KEY`. Accepted only by endpoints under `/api/...`."}},"schemas":{"ApiError":{"type":"object","description":"Error body returned by the `/api/...` endpoints.","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"statusCode":{"type":"integer"},"error":{"type":"object","properties":{"message":{"type":"string"}}},"correlationId":{"type":"string","description":"Request ID. Include it when contacting Cekat support."}}},"RateLimitError":{"type":"object","properties":{"message":{"type":"string"}}}},"responses":{"ApiUnauthorized":{"description":"The API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"TooManyRequests":{"description":"Rate limit exceeded. Wait and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}}}},"paths":{"/api/messages/lock-balance":{"post":{"tags":["Message"],"operationId":"ReserveServiceMessageBalance","summary":"Check or reserve service-message balance","description":"Returns the billing details for sending one free-form WhatsApp message in a conversation and, on prepaid credit-line inboxes, reserves the cost against `message_id`.\n\n`POST /messages/whatsapp` already does this for you, so you only need this endpoint if you send WhatsApp messages through your own integration and bill through Cekat.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["message_id","conversation_id"],"properties":{"message_id":{"type":"string","format":"uuid","description":"Your unique ID for the message. The reservation is tied to it."},"conversation_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Billing details for the message.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","additionalProperties":true}}}}}},"400":{"description":"A field is missing or invalid, the conversation is not on WhatsApp, or there isn't enough balance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"$ref":"#/components/responses/ApiUnauthorized"},"404":{"description":"The conversation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}}}}
```
