When a user interacts with a buttons message or a list menu sent by your workspace, Wazapin triggers a webhook event. Follow this guide to identify interactive replies and extract the exact choice the customer made.

When this matters

Interactive replies are critical for:
  • Routing customers to different support flows (e.g. Sales vs Support).
  • Confirming transaction actions (e.g., tapping “Confirm Order” or “Reschedule”).
  • Implementing automated chatbot menus and FAQ navigators.

Processing flow

Handling an interactive choice involves three steps:

1. Receive interactive webhook

Wazapin POSTs a lightweight message.new webhook containing msg_type: "interactive". Here is an example webhook payload:
Interactive webhook payload
{
  "message_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "conversation_id": "0f89b0f9-74b4-44f9-b9b6-48f6d4de57aa",
  "contact_id": "c1a2b3c4-d5e6-7890-abcd-ef1234567890",
  "channel_id": "wzp_abc123",
  "direction": "inbound",
  "from_phone": "6281234567890",
  "msg_type": "interactive"
}

2. Fetch selection details

Call GET /v1/messages/ using the message_id from the payload. The API response will contain an interactive object within the content block detailing the user’s input.

Interactive structures

Depending on the message type, the returned details will have one of two shapes:

Quick-reply buttons (button_reply)

If the user tapped a button, the interactive block will have a type of "button_reply":
{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "interactive",
    "content": {
      "interactive": {
        "type": "button_reply",
        "button_reply": {
          "id": "confirm_yes",
          "title": "Yes, I confirm"
        }
      }
    }
  }
}

List menu row (list_reply)

If the user picked an option from a list menu, the interactive block will have a type of "list_reply":
{
  "data": {
    "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "type": "interactive",
    "content": {
      "interactive": {
        "type": "list_reply",
        "list_reply": {
          "id": "support_agent",
          "title": "Talk to Support",
          "description": "Connect to a live agent"
        }
      }
    }
  }
}

Code example

Here is how to handle the webhook and process the user’s choice:
# Fetch the message details to check what choice the user made
curl -X GET "https://api.wazapin.com/v1/messages/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Accept: application/json"

Troubleshooting

Webhook arrives but interactive is empty

Ensure you query the message by ID via GET /v1/messages/{messageID}. Webhook bodies are intentionally slimmed down and do not include the interactive reply block inline.

User pressed multiple buttons

WhatsApp does not allow multiple choice selections on a single message. Tap events are atomic and arrive as individual webhooks. If a user tries to tap buttons on older messages, your system will receive a new webhook event with a unique message_id. You can track the original message ID via the conversation timeline or message parent headers if applicable.