Get started with the WhatsApp API: API key, account_id and channel_id
Last updated: 27 September 2026 · 8 min read
The Clomni WhatsApp API sends WhatsApp messages to customers from your company's own system (website, mobile app, CRM, ERP, warehouse software): verification codes (OTP), order and delivery notifications, reminders, bulk sends. Every message is written to the customer's conversation in Clomni: when the customer replies, the agent sees what was sent before.
Steps
-
1
Check the prerequisites
- The account must have an inbox of the WhatsApp Cloud API type. A WhatsApp number linked by QR does not work with this API: templates exist only on the Cloud API.
- At least one template must have the APPROVED status in Meta Business Manager.
- Bring the templates into Clomni: Settings › Workspace settings › Inboxes, Sync Templates on the WhatsApp inbox's Configuration tab. Without this step, the API cannot find the template.
-
2
Get an API key
Sign in to the dashboard with an administrator account. At the bottom of the left menu, click your profile picture, choose Profile settings and go to the API access section. Create a key with New key and copy it right away: the key is not shown again.
In the document this key is called the Access Token. The steps are described in detail in the article “Create an API key (API access)”.
-
3
Find account_id and channel_id
account_idis in the dashboard's address: inmy.clomni.co/panel/accounts/88/...,88is your account number.channel_idis the number of the WhatsApp inbox: it shows in the address when you open the inbox in Settings › Workspace settings › Inboxes. This request also returns all your WhatsApp numbers with theirchannel_id:curl -s "https://api.clomni.ai/v1/accounts/{account_id}/whatsapp/channels" \ -H "Authorization: Bearer <API_ACARI>"A channel with
sendable: falsethere is linked by QR, and this API does not send through it. -
4
General rules for requests
- Base URL:
https://api.clomni.ai, HTTPS only (an HTTP request is redirected with301) - Two headers on every request:
Authorization: Bearer <API_ACARI>andContent-Type: application/json - Encoding UTF-8, responses in JSON
- Dates are ISO 8601 in UTC, for example
2026-08-07T18:20:28.080Z
An error always has the same shape, an
errorfield in the JSON:{ "error": "Invalid phone number: 123" } - Base URL:
-
5
Who can do what
- The template list, sending a single message and the window status: an administrator, or an agent assigned to that inbox
- Message status: any user of the account
- Bulk send: administrators only
It is best to create a separate user for the integration (for example “API Integration”) and take the key from it: the conversation shows who sent a message, and the integration does not stop when an employee leaves.
-
6
Protect the key
The key gives full access to your account. Keep it only on your own server: not in the browser, in JavaScript or inside a mobile app. Never send the key to anyone or write it in a chat.
If the key leaks, stop it in the API access section with Switch off or Delete and create a new one. If Expires on is left empty, the key does not expire.
-
7
If you connected with the old version
If you integrated with version 1, the new address is
api.clomni.ai/v1/...and the new header isAuthorization: Bearer <API_ACARI>. The oldapi_access_tokenheader and theinbox_idparameter keep working, so you can move over without hurrying.The new name of
inbox_idischannel_id, and thesource_idfield in the response is now calledwhatsapp_message_id. -
8
Testing
There is no separate test environment (sandbox). To test, use your own number as the recipient: a real message is sent and you see the full result.