Deleted message#
This section describes messageData
object incoming webhook format for outgoing deleted message. For a description of the general format of incoming webhooks, refer to Outgoing messages section.
To get incoming webhooks of this type, three conditions must be true:
typeWebhook
= outgoingMessageReceived
|| outgoingAPIMessageReceived
deletedMessageWebhook
= Yes
messageData.typeMessage
= deletedMessage
Configuring an instance
To receive incoming notifications about extended text messages, you need to enable the settings using one of the following options:
-
Through console enable the settings
Get notifications about messages sent from API
,Get notifications about messages sent from the phone
anddeletedMessageWebhook
. -
Through the SetSettings method enable the settings
outgoingAPIMessageWebhook
andoutgoingMessageWebhook
anddeletedMessageWebhook
.
Webhook#
Webhook parameters#
messageData
object parameters
Parameter | Type | Description |
---|---|---|
typeMessage | string | incoming webhook type. For messages of this type, the parameter takes on the value deletedMessage |
deletedMessageData | object | Deleted message data object |
deletedMessageData
object parameters
Parameter | Type | Description |
---|---|---|
stanzaId | string | Deleted message id |
The rest of the fields are filled depending on the type of the quoted message and are identical to the fields of outgoing messages described in Outgoing messages section
Webhook body example#
{
"typeWebhook": "outgoingMessageReceived",
"instanceData": {
"idInstance": 1101000001,
"wid": "71231234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1733146115,
"idMessage": "10ECA1E0D26FAB9CAB",
"senderData": {
"chatId": "71234567890@c.us",
"chatName": "Jane",
"sender": "71231234567@c.us",
"senderName": "John",
"senderContactName": "John Doe"
},
"messageData": {
"typeMessage": "deletedMessage",
"deletedMessageData": {
"stanzaId": "84514217EF972039FC3F68A53C196306" // id deleted message
}
}
}