Incoming messages#
This section describes the general format of incoming webhooks with the incomingMessageReceived type. Description of all incoming webhooks types is given in Incoming webhooks types section.
The system provides for receiving notifications about incoming messages of the below types:
incomingMessageReceived webhook parameters#
| Parameter | Type | Description |
|---|---|---|
typeWebhook | string | Incoming webhook type. For a webhook of this type, the parameter takes on the value incomingMessageReceived |
instanceData | object | Account data |
instanceData object parameters
| Parameter | Type | Description |
|---|---|---|
idInstance | integer | Account Id |
wid | string | Account Id in WhatsApp format |
typeInstance | string | Account 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. Takes an empty value by default |
senderName | string | Sender name |
senderContactName | string | Sender name from the current account's contact list |
messageData object parameters#
messageData object has different parameters depending on incoming message type:
- Incoming text message
- Incoming image, video, audio, document message
- Incoming location message
- Incoming contact message
- Template buttons reply message
Webhook body example#
{
"typeWebhook": "incomingMessageReceived",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1790141455,
"idMessage": "3EB0A3191C8BB8437537",
"senderData": {
"chatId": "79001234568@c.us",
"chatName": "GREEN-API",
"sender": "79001234568@c.us",
"senderName": "GREEN-API"
},
"messageData": {
"typeMessage": "textMessage",
"textMessageData": {
"textMessage": "Hello"
}
}
}