Whatsapp API
  • Getting Started
    • Dashboard API Overview
    • Register WhatsApp Business API Number
    • Get Channel ID & Link Your App
    • Get Access Token
    • Create WhatsApp Template
  • Whatsapp API
    • WhatsApp API's Overview
    • Media
      • Upload Media
      • Download Media
    • Send Messages
      • Text Mesage
      • Reaction Message
      • Media Message
      • Contact Message
      • Interactive Message
      • Template Message
      • Reply Message
    • Mark Message as Read
    • Set-up Webhook
      • Received Messages
      • Message Status
    • Error Codes
Powered by GitBook
On this page
  1. Whatsapp API
  2. Send Messages

Interactive Message

To send a Interactive message, make POST it to /{{Channel-ID}}/messages and attach a message interactive object, Whatsapp Business API supports messages of interactive type as in the list below:

  1. Button list

  2. Interactive list

A successful response includes an object with an identifier prefixed with wamid. Use the wamid to track your message status.

Button list payload sample

{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "{{Recipient-Phone-Number}}",
    "type": "interactive",
    "interactive": {
        "type": "button",
        "body": {
            "text": "Please confirm your order"
        },
        "action": {
            "buttons": [
                {
                    "type": "reply",
                    "reply": {
                        "id": "yesID",
                        "title": "Yes, Confirm"
                    }
                },
                {
                    "type": "reply",
                    "reply": {
                        "id": "noID",
                        "title": "Not this time"
                    }
                }
            ]
        }
    }
}

Interactive list payload sample

{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "{{Recipient-Phone-Number}}",
    "type": "interactive",
    "interactive": {
        "type": "list",
        "header": {
            "type": "text",
            "text": "<HEADER_TEXT>"
        },
        "body": {
            "text": "<BODY_TEXT>"
        },
        "footer": {
            "text": "<FOOTER_TEXT>"
        },
        "action": {
            "button": "<BUTTON_TEXT>",
            "sections": [
                {
                    "title": "<LIST_SECTION_1_TITLE>",
                    "rows": [
                        {
                            "id": "<LIST_SECTION_1_ROW_1_ID>",
                            "title": "<SECTION_1_ROW_1_TITLE>",
                            "description": "<SECTION_1_ROW_1_DESC>"
                        },
                        {
                            "id": "<LIST_SECTION_1_ROW_2_ID>",
                            "title": "<SECTION_1_ROW_2_TITLE>",
                            "description": "<SECTION_1_ROW_2_DESC>"
                        }
                    ]
                },
                {
                    "title": "<LIST_SECTION_2_TITLE>",
                    "rows": [
                        {
                            "id": "<LIST_SECTION_2_ROW_1_ID>",
                            "title": "<SECTION_2_ROW_1_TITLE>",
                            "description": "<SECTION_2_ROW_1_DESC>"
                        },
                        {
                            "id": "<LIST_SECTION_2_ROW_2_ID>",
                            "title": "<SECTION_2_ROW_2_TITLE>",
                            "description": "<SECTION_2_ROW_2_DESC>"
                        }
                    ]
                }
            ]
        }
    }
}

PreviousContact MessageNextTemplate Message

Last updated 2 years ago

please refer to this as well to see the possible of Interactive object

document