GuidesMessaging

Send messages

One endpoint sends every kind of message: text, media, templates and interactive messages.

Choose the recipient

Every send goes to POST /v1/messages. Name the recipient one of two ways.

conversation_id
Reply in a conversation that already exists.
channel_id with customer_id or phone
Reach a contact on one of your channels. With a template, this also starts a conversation with someone who never wrote.

Message types

type is always required. Each type takes its own fields.

typeFields
textcontent.text
image video audio document stickercontent.media_key or content.media_url. Optional caption and file_name.
templatetemplate.name, optional language and variables. No content.
interactivecontent.kind with buttons, list or cta_url.
Request body
{
  "conversation_id": "b1c7e0a4-52a3-4a3c-8d0e-6c1b9e5f7a20",
  "type": "text",
  "content": {
    "text": "Your order 4821 ships Thursday."
  }
}

A reaction has its own endpoint, React to a message, and takes an emoji.

Message status

A send answers 202 with the message queued. From there the status only moves forward.

queued
Stored by Omnio, on its way to WhatsApp.
submitted
WhatsApp accepted it.
sent
WhatsApp sent it.
delivered
It reached the customer's phone.
read
The customer opened it.
rejected failed
It did not go through. error holds the reason. See Failed sends.

Follow it with Get a message or the message.status_updated webhook.

Retry safely

Send an Idempotency-Key header and reuse it on every retry of the same send. Without one, a retry after a timeout can send twice. See Idempotency.