Skip to main content
WSAPI can send two kinds of interactive message:
  • Buttons — POST /messages/buttons. A message with 1 to 3 buttons under the text. Use them for short, closed choices: confirm or cancel an appointment, yes or no, or a link, a code to copy or a number to call.
  • Lists — POST /messages/list. A message with one button that opens a list of up to 10 options, grouped into sections. Use it when there are more than three options, or when each option needs a short description: time slots, menu items, departments.
When the recipient taps a reply button or picks a row, you receive a message event with what they chose. See Button and list replies.

Send buttons

Reply buttons send the choice back to you. Give each one an id — it is what you receive in the event, so make it something your code can route on.
The response is 201 Created with the ID of the message:
Keep that ID. The reply event carries it as replyTo.id, which is how you tell which message — and so which appointment, order or ticket — the recipient answered. Buttons of different types can be mixed in one message. These three act on the recipient’s device and send nothing back:

Button types

type can be omitted for reply buttons.

Send a list

A list shows one button (buttonText) under the message. Tapping it opens the options, grouped into titled sections. The recipient picks one.
A list with a single section does not need a section title.

The AI label

Set aiLabel: true on either endpoint to show WhatsApp’s AI badge on the message — useful when the message comes from an assistant or bot and you want to say so.
The badge only applies to 1:1 chats. In a group, aiLabel is ignored and the message is sent without it.

Limits

The limits follow the ones WhatsApp publishes for its Cloud API. Both endpoints Buttons Lists A request that breaks a limit is rejected with 400 Bad Request and a message naming the field, and nothing is sent:

Handling the reply

A reply arrives as a message event with type: "button_reply" or type: "list_reply". Route on the id you set on the button or row, and use replyTo.id — the ID returned by the send call — to find the message it answers. Only reply buttons and list rows produce events.

Button and list replies

Payloads, correlation, and what to watch for in your handler

Good to know

  • WhatsApp controls how they are displayed. Interactive messages use WhatsApp features that may change as the app evolves. A 201 means WhatsApp accepted the message, so accepting a typed answer as well (for example, “confirm”) is a good habit.
  • The AI label applies to 1:1 chats only, and is ignored in groups.
  • Header and footer are text only. Images, videos and documents in the header are not supported.
  • The common send options are not available. These endpoints do not take mentions, replyTo, isForwarded or ephemeralExpiration.