WhatsApp API: integration guide
v2.1 · 28 pages · Last updated: 11 October 2026
Sending WhatsApp templates, OTP codes, notifications and bulk messages from your own system (website, app, CRM): API key, endpoints, cost, the 24-hour window, webhooks, errors and code samples.
Articles from this document
- Get started with the WhatsApp API: API key, account_id and channel_id The WhatsApp API sends WhatsApp messages to customers from your company's own system (website, app, CRM). You need: a WhatsApp inbox of the Cloud API type, an approved template, an API key, account_id and channel_id. Requests go to https://api.clomni.ai with the Authorization: Bearer <API_ACARI> header.
- WhatsApp API: message cost, the 24-hour window and fallback_template Meta charges per message: a UTILITY or AUTHENTICATION template costs 0.036 AZN, MARKETING 0.165 AZN, and free text inside the 24-hour window is free. Clomni adds no fee. The customer opens the window. Send text together with fallback_template: if the window is open, the text goes out for free (sent_as: session); if it is closed, the template goes out (sent_as: template).
- Send messages with the WhatsApp API: OTP codes, templates and text POST /v1/accounts/{account_id}/whatsapp/messages: send channel_id, phone_number and either template (name, language, parameters) or text. GET /v1/accounts/{account_id}/whatsapp/templates gives the template's name, language and variables. The response is 201 with the message id and sent_as.
- Bulk sending with the WhatsApp API (bulk_messages) POST /v1/accounts/{account_id}/whatsapp/bulk_messages sends one template to up to 1000 numbers in one request, and the response is 202 with a batch_id. You can read the result for 7 days with GET /v1/accounts/{account_id}/whatsapp/bulk_messages/{batch_id}. Only an administrator can send.
- WhatsApp API: track a message's delivery status Read a message's status with GET /v1/accounts/{account_id}/whatsapp/messages/{message_id}: sent, delivered, read, failed. A webhook is the more efficient way: in Settings › Workspace settings › Integrations › Webhook, choose the message_updated (“Message updated”) event. For a report to your own URL per message, add status_callback (url, after_seconds, on_change, secret) to the send.
- WhatsApp API errors: 401, 403, 404, 422 and Meta errors An error comes back with an error field in the JSON. 401: the key is missing or wrong. 403: the key's owner is not a member of the inbox. 404: the channel_id or message id is wrong. 422: something is missing from the request, the window is closed, the template is not found or the number is wrong. If Meta rejects it, the message becomes failed and the reason is in external_error.
- API messages in the dashboard: why the conversation becomes “resolved” A message sent by the API is written to the customer's conversation, and the conversation automatically becomes “resolved”: it does not show among open conversations and plays no sound. As soon as the customer replies, the conversation opens. To keep it open, send conversation_status: open or pending.