Skip to main content
POST
/
instances
/
{instanceId}
/
token
/
{token}
/
reply-button
Reply to button list
curl --request POST \
  --url https://api.z-api.io/instances/{instanceId}/token/{token}/reply-button \
  --header 'Client-Token: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "phone": "<string>",
  "responseButtonId": "<string>",
  "messageId": "<string>"
}
'
{
  "zaapId": "<string>",
  "messageId": "<string>",
  "id": "<string>"
}

Concept

This endpoint allows you to reply to a button list option, simulating a user click on one of the options previously sent via send-button-list.
The button must have been previously sent and the button ID must be obtained via the message received webhook.

Attributes

instanceId
string
required
Your instance ID. Available in the Z-API panel under Instances.
token
string
required
Your Z-API instance token.

Required

phone
string
required
Phone number (or group ID) in the format COUNTRY CODE + AREA CODE + NUMBER. Example: 551199999999
responseButtonId
string
required
Selected button ID. This ID is obtained via the message received webhook.
messageId
string
required
ID of the message that contains the previously sent buttons.

Request Body

{
  "phone": "5511999999999",
  "responseButtonId": "1",
  "messageId": "D241XXXX732339502B68"
}

Response

200

zaapId
string
Message ID in Z-API
messageId
string
Message ID in WhatsApp
id
string
Added for Zapier compatibility, it has the same value as messageId
{
  "zaapId": "3999984263738042930CD6ECDE9VDWSA",
  "messageId": "D241XXXX732339502B68",
  "id": "D241XXXX732339502B68"
}

405

Make sure you are using the correct HTTP method (POST).

415

Make sure to include the Content-Type: application/json header.