Outgoing messages#
This section describes the general format of incoming webhooks with the outgoingMessageReceived
type. Description of all incoming webhooks types is given in Incoming webhooks types section.
The system provides for receiving notifications about outgoing messages of the below types:
- Outgoing message status
- Message sent from phone
- Message sent via API
- Outgoing text message
- Outgoing image, video, audio, document message
- Outgoing location message
- Outgoing contact message
- Outgoing message with sticker
- Outgoing message-reaction
- Outgoing message with an invitation to the group
- Outgoing poll message
- Outgoing poll update message
- Outgoing edited message
- Outgoing deleted message
outgoingMessageReceived webhook parameters#
Parameter | Type | Description |
---|---|---|
typeWebhook | string | Incoming webhook type. For a webhook of this type, the paramaeter takes on the value outgoingMessageReceived |
instanceData | object | Instance data |
timestamp | integer | Event timestamp in UNIX format |
idMessage | string | Outgoing message Id |
senderData | object | Message or file sender data |
messageData | object | Received message or file data |
instanceData
object parameters
Parameter | Type | Description |
---|---|---|
idInstance | integer | Instance Id. The size of the integer is int64. Values range include from 1 to 10 digits |
wid | string | Account Id in WhatsApp format |
typeInstance | string | Instance messenger type |
senderData
object parameters
Parameter | Type | Description |
---|---|---|
chatId | string | Chat Id, where a message or file has been received |
sender | string | Message or file sender Id |
chatName | string | chat name |
senderName | string | Sender name |
senderContactName | string | Sender name according to the contact list of the current account |
messageData
object parameters#
messageData
object has different parameters depending on outgoing message type:
- Message sent from phone
- Message sent via API
- Outgoing text message
- Outgoing image, video, audio, document message
- Outgoing location message
- Outgoing contact message
- Outgoing message with sticker
- Outgoing message-reaction
- Outgoing message with an invitation to the group
- Outgoing poll message
- Outgoing poll update message
- Outgoing edited message
- Outgoing deleted message
Webhook body example#
{
"typeWebhook": "outgoingMessageReceived",
"instanceData": {
"idInstance": 1101111111,
"wid": "79876543210@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1588091580,
"idMessage": "F7AEC1B7086ECDC7E6E45825",
"senderData": {
"chatId": "79001234567@c.us",
"sender": "79876543210@c.us",
"chatName": "Jane",
"senderName": "John",
"senderContactName": "John Doe"
},
"messageData":{
// Depending on typeMessage = textMessage || imageMessage || videoMessage || documentMessage || audioMessage || locationMessage || contactMessage || extendedTextMessage || quotedMessage || pollMessage || pollUpdateMessage || editedMessage || deletedMessage
...
...
...
}
}