Outgoing message status#
Incoming webhook of this type contains the status of a previously sent message: sent, delivered, read, etc.
To receive notifications regarding the statuses of sending/delivery/read receipts of messages sent from a mobile phone, it is necessary to enable the following settings:
outgoingMessageWebhook
outgoingWebhook
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. Chat with a message for which you received the status. |
instanceData | object | Account data |
timestamp | integer | Event timestamp in UNIX format |
idMessage | string | Outgoing message or file Id. Outgoing message Id is returned by methods: SendMessage, SendTemplate |
status | string | Outgoing message or file status. Status takes on the values: |
sent - message sent | ||
delivered - message delivered to the recipient | ||
read - message read/viewed/heard by the recipient | ||
noActiveSession - the recipient does not have a WhatsApp account on this number | ||
failed - an error occurred while sending a message to WhatsApp server (this status cannot be disabled in the settings SetSettings, it is necessary to implement the processing of this notification) | ||
description | string | Error description (it is recommended to inform the operator about system errors) |
sendByApi | boolean | Is the message sent through API: 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
}