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_idwithcustomer_idorphone- 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.
| type | Fields |
|---|---|
text | content.text |
image video audio document sticker | content.media_key or content.media_url. Optional caption and file_name. |
template | template.name, optional language and variables. No content. |
interactive | content.kind with buttons, list or cta_url. |
{
"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.
rejectedfailed- It did not go through.
errorholds 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.