Outgoing message status#
An incoming webhook of this type contains the status of a previously sent message: sent, delivered, read, etc.
Instance settings
To receive incoming webhooks about the statuses of sent messages, you need to enable the settings in one of the following ways:
-
Enable the
Receive notifications about messages sent from a phone,Receive notifications about messages sent from APIandReceive notifications about the statuses of sent messagessettings via the console -
Enable the
outgoingMessageWebhook,outgoingAPIMessageWebhookandoutgoingWebhooksettings via the SetSettings method
Webhook#
Webhook parameters#
| Parameter | Type | Description |
|---|---|---|
typeWebhook | string | Incoming webhook type. For webhooks of this type, the parameter takes on the value outgoingMessageStatus |
chatId | string | Chat Id. The chat with the message the status has been received for. |
instanceData | object | Account data |
timestamp | integer | Event timestamp in UNIX format |
idMessage | string | Sent message or file Id. The sent message Id is returned by the methods: SendMessage, SendTemplate |
status | string | Sent message or file status. The status takes on the values: |
sent - message sent | ||
delivered - message delivered to the recipient | ||
read - message read/viewed/listened to by the recipient | ||
noActiveSession - the 24-hour window for sending messages is closed | ||
failed - an error occurred while sending the message to the WhatsApp server Possible reasons: - The recipient number is not registered in WhatsApp - The limits for sending template messages have run out This status cannot be disabled in the SetSettings settings | ||
description | string | Error description (it is recommended to notify the operator about system errors) |
sendByApi | boolean | The flag indicates whether the message was sent from the API or not, takes the values: true , false |
instanceData object parameters
| Parameter | Type | Description |
|---|---|---|
idInstance | integer | Account Id |
wid | string | Account Id in WhatsApp format |
typeInstance | string | Account messenger type |
Webhook body example#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "11001234567890@c.us",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1586700802,
"idMessage": "3EB0608D6A2901063D63",
"status": "failed",
"description": "Parameter value is not valid, Invalid phone number or wa_id",
"sendByApi": true
}