1. Whatsapp
  2. Buttons Message

Whatsapp

Buttons Message

Explains WhatsApp button messages. Useful for interactive choices, guided responses, approvals, and quick user actions.

Basic Usage

loading...

Parameters

Everything inside platforms.meta_whatsapp should be considered parameters for this notification. There are top level parameters that describe the message type and other general message behaviors, and then there are nested parameters dependent on the message type.

Only nested parameters for message_type: buttons is explained here, for all top level parameters, see the top level Whatsapp documentation

message_type
required
string

Indicates the type of message that is going to be sent. This also will determine what the contents of the params object should be.

Available message types are:


params
required
object

Contains the parameters for the message and will depend on the message_type setting. See the message_type specific documentation above for the message type specific parameters.

Show child attributes
buttons
required
object

Object is required if the message_type is buttons. This object should change to match what message_type is set to.

Show child attributes
body
required
string

The body text displayed above the buttons.

buttons
required
array

Contains the button objects displayed below the message body. Meta allows a maximum of three reply buttons in a button message. If the user needs to choose from more than three options, use a list message instead.

Show child attributes
id
required
string

The id is the value that will be available in the incoming response data when the user clicks the button. The id needs to be a string and can be up to 20 characters long. Spaces in the id value will result in a Meta error, so use a unique snake_case value.

title
required
string

The title is the text that will be displayed on the button. The title needs to be a string and can be up to 20 characters long.

Button object example

editor
        {
  "id": "car",
  "title": "Car Damage",
}

      

Result

The recipient sees the body text with up to three buttons beneath it. When they select a button, WhatsApp sends the button title as their visible reply and makes the corresponding id available in the incoming response data. Use this stable id, rather than the user-facing title, when deciding which action or workflow should run next.

Examples

Three-way confirmation

This example uses the maximum of three buttons allowed:

loading...

Using substitution in the message

The body can include substituted data while the button IDs remain predictable for downstream routing:

loading...