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. 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. 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. 3

    Find account_id and channel_id

    account_id is in the dashboard's address: in my.clomni.co/panel/accounts/88/..., 88 is your account number.

    channel_id is 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 their channel_id:

    curl -s "https://api.clomni.ai/v1/accounts/{account_id}/whatsapp/channels" \
      -H "Authorization: Bearer <API_ACARI>"

    A channel with sendable: false there is linked by QR, and this API does not send through it.

  4. 4

    General rules for requests

    • Base URL: https://api.clomni.ai, HTTPS only (an HTTP request is redirected with 301)
    • Two headers on every request: Authorization: Bearer <API_ACARI> and Content-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 error field in the JSON:

    { "error": "Invalid phone number: 123" }
  5. 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. 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. 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 is Authorization: Bearer <API_ACARI>. The old api_access_token header and the inbox_id parameter keep working, so you can move over without hurrying.

    The new name of inbox_id is channel_id, and the source_id field in the response is now called whatsapp_message_id.

  8. 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.

Document