Skip to content

Button selection#

This section describes messageData object incoming webhook format for regular buttons. For a description of the general format of incoming webhooks, refer to Incoming messages section.

Webhook parameters#

messageData object parameters

Parameter Type Description
typeMessage string Received message type. For messages of this type, the parameter takes on the value templateButtonsReplyMessage
templateButtonsReplyMessage object Data object on the user's button selection

templateButtonsReplyMessage object parameters

Parameter Type Description
stanzaId string Button message ID
selectedIndex string Selected button digital index
selectedButtonId string Selected button identifier
selectedDisplayText string Selected button text

Webhook body example#

{
    "typeWebhook": "incomingMessageReceived",
    "instanceData": {
        "idInstance": 1234,
        "wid": "11001234567@c.us",
        "typeInstance": "whatsapp"
    },
    "timestamp": 1588091580,
    "idMessage": "3EB0040D2CCE22623A71",
    "senderData": {
        "chatId": "79001234568@c.us",
        "chatName": "Derek",
        "sender": "79001234568@c.us",
        "senderName": "Derek"
    },
    "messageData": {
        "typeMessage": "templateButtonsReplyMessage",
        "templateButtonReplyMessage": {
            "stanzaId": "BAE58BBDF16164E5",
            "selectedIndex": 1,
            "selectedId": "",
            "selectedDisplayText": "I want a discount"
        }
    }
}