Skip to content

Message sent from phone#

The format of a message sent from a phone is identical to the format of an incoming message, while the incoming webhook type takes on the value outgoingMessageReceived.

Instance settings

To receive incoming webhooks about messages sent from a phone, the web version and the desktop version, you need to enable the settings in one of the following ways:

  1. Enable the Receive notifications about messages sent from a phone setting via the console (additionally Receive notifications about the statuses of sent messages to receive webhooks about sent message statuses)

  2. Enable the outgoingMessageWebhook setting via the SetSettings method (additionally outgoingWebhook to receive webhooks about sent message statuses)

Webhook body example#

{
    "typeWebhook": "outgoingMessageReceived",
    "instanceData": {
        "idInstance": 1234,
        "wid": "11001234567@c.us",
        "typeInstance": "whatsapp"
    },
    "timestamp": 1588091580,
    "idMessage": "F7AEC1B7086ECDC7E6E45923F5EDB825",
    "senderData": {
        "chatId": "79001234568@c.us",
        "sender": "79001234568@c.us",
        "chatName": "GREEN-API",
        "senderName": "GREEN-API",
        "senderContactName": "GREEN-API"
    },
    "messageData":{
       // Depending on typeMessage = textMessage 
       ...
       ...
       ...
        }
    }
}