Skip to main content

Single WhatsApp sends

Quick guideโ€‹

One message per call

This API sends one WhatsApp message to one recipient per call. To send to many recipients, use a campaign.

The WhatsApp API sends a message from one of your WhatsApp Business numbers.

  1. Find your number: GET /message-server/whatsapp/phone-numbers returns its id, the phoneNumberId of every send. A campaign takes its number from GET /whatsapp/phone-numbers, at the top of the WhatsApp section, instead.
  2. Send with POST /message-server/whatsapp/send. An approved template (template) can be sent at any time; free content (body: text, images, documents and so on) only within 24 hours of the contact's last message, or WhatsApp does not deliver it. With simulation: true the request is validated, but nothing is sent.
  3. Add a fallback if you need one: fallbackRcs and fallbackSms, used when your account can send on several channels.
  4. Check the delivery by the messageId of the answer: GET /whatsapp/messages/{messageId} returns the status of the message, and its readDate tells when it was read. GET /messages/status/{customerMessageId} with channel=WHATSAPP returns the same data, GET /messages/status the status of several messages. The webhook sends you the statuses without polling, tells you when a message is read, and brings the contact's replies.
  5. Read the history with GET /messages/history and channel=WHATSAPP, one date range at a time. POST /messages/history/export puts every channel in a CSV file: see Exports.

After a 500, the message may have been sent anyway: do not send it again blindly (see Retry strategy).

The send and the numbers are served by the messaging API, under https://api.qlara.ai/api, which accepts the API key in the X-Api-Key header or Basic Auth: see Authentication. The status and history endpoints are those of the Platform API, with the API key only. They cover the WhatsApp messages sent one at a time, not campaign messages, which you follow from Campaigns. The last three are the same for every channel: their pages here are written for WhatsApp, and each links to the same endpoint for SMS and RCS.

Use cases: UC-019: Analyze Message History ยท UC-018: Export Delivery Reports