Outgoing Messages
Webhook
Outgoing messages webhooks are only relevant to
coexistence WhatsApp accounts
(hook "outgoing"). They show outgoing messages sent by the user themselves
from their mobile phone WhatsApp Business app (or WhatsApp Web), outside of
the API. This is only relevant to let you know the user sent a message, in
case you want to show it as an outgoing message in your platform.
- Note: any outgoing message sent from the API will not trigger an outgoing message webhook.
- Outgoing messages webhooks are turned on by default.
- Note 2: outgoing messages to groups are not supported.
- The acknowledges of these messages arrive as
Acknowledge webhooks (
hook"update") with the sameunique.
Settings:
| Setting | Value |
|---|---|
| URL | Your URL — set it with Set Webhook |
| Method | JSON via POST |
With every outgoing message, you will get the following:
{
"status": "OK",
"hook": "outgoing",
"unique": "HBgMOTcyNTAxMjM0NTY3FQIAEhgUOEY0QzE2N0E5RDNCMDA5RkQ1QjIA",
"from": "972771234567",
"to": "972501234567",
"type": "text",
"body": "Sure, we are open until 20:00",
"caption": "",
"isForwarded": false,
"timestamp": "1789900120",
"timestampMS": 102938,
"media": false,
"quote": false,
"quoteUnique": false
}
Response explained
| Parameter | Description / Example |
|---|---|
status | "OK" always. |
hook | "outgoing" always, for a new outgoing message. |
unique | Unique ID for the outgoing message. Its acknowledges arrive with the same unique. |
from | Your WhatsApp account. |
to | The end user WhatsApp account that received the message. |
type | Message type. Can be one of the following: text, image, audio, video, location, ptt, document, button, contacts, list, reaction. |
body | The content of the 'body' depends on the 'type' of the message — see the table below. |
caption | The content of the 'caption' depends on the 'type' of the message — see the table below. |
isForwarded | Shows if the outgoing message is forwarded — true or false. |
timestamp | Time stamp of the outgoing message (Unix time, in seconds, as a string). |
timestampMS | The sub-second part of the timestamp (of the time we processed the message, in microseconds), in case you need it. |
media | If this message contains any media file, it will be true; otherwise false. |
quote | If this message is a quoted message, it will be true; otherwise false. |
quoteUnique | In case the message is quoted (it means that the user replied to an incoming message), this will be the original message unique ID. If the message is not quoted, this will be false. |
body by message type
| Type | The data that will come |
|---|---|
| text | Outgoing text message |
| image | Link |
| audio | Link |
| video | Link |
| location | lat,lng |
| ptt | Link |
| document | Link |
| button | Button text |
| contacts | Phone number |
| list | The selection text |
| reaction | The emoji |
You must download the link files to your server: we delete all files within 7 days.
caption by message type
| Type | The data that will come |
|---|---|
| text | Nothing, empty |
| image | Caption text with the image |
| audio | Nothing, empty |
| video | Caption text with the video |
| location | The name and address of the place (name - address), if any |
| ptt | Nothing, empty |
| document | Caption text with the document |
| button | Nothing, empty |
| contacts | Name of the contact |
| list | The item list ID that was selected |
| reaction | Nothing, empty |
Webhook payload
Your response
- 200
- default
Received. Answer with any 2xx status (200, 201, 204 …) — we wait up to 5 seconds to connect and up to 15 seconds for your answer. The body of your answer is ignored.
Any other status, or no answer in time, counts as a failed delivery. With retry 1 in Set Webhook we try again: immediately, then after 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours. Without it, the webhook is not sent again.