> ## Documentation Index
> Fetch the complete documentation index at: https://developer.z-api.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Reply to action button

> Replies to an action button as if the user had clicked it

## Concept

This endpoint allows you to reply to an action button, simulating a user click on one of the options previously sent via [send-button-actions](/message/send-button-actions).

<Warning>
  Only buttons of type **REPLY** can be answered. Other button types do not support replies via API.
</Warning>

<Info>
  The button must have been previously sent and the **button ID** must be obtained via the message received webhook.
</Info>

#### Example on WhatsApp

<div style={{ display: "flex", justifyContent: "center" }}>
  <img src="https://mintcdn.com/z-api-8aa3bb40/c1Sn38QJwMBwsVRm/images/reply-template-button-eng.jpeg?fit=max&auto=format&n=c1Sn38QJwMBwsVRm&q=85&s=c6d0492a0d45c904d2953ca167a01fd8" width="400" data-path="images/reply-template-button-eng.jpeg" />
</div>

***

## Attributes

<ParamField path="instanceId" type="string" required>
  Your instance ID. Available in the Z-API panel under **Instances**.
</ParamField>

<ParamField path="token" type="string" required>
  Your Z-API instance token.
</ParamField>

### Required

<ParamField body="phone" type="string" required>
  Phone number (or group ID) in the format COUNTRY CODE + AREA CODE + NUMBER. Example: 551199999999
</ParamField>

<ParamField body="responseTemplateButtonId" type="string" required>
  ID of the REPLY-type button. This ID is obtained via the message received webhook.
</ParamField>

<ParamField body="messageId" type="string" required>
  ID of the message that contains the previously sent buttons.
</ParamField>

***

## Request Body

```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
{
  "phone": "5511999999999",
  "responseTemplateButtonId": "1",
  "messageId": "D241XXXX732339502B68"
}
```

## Response

### 200

<ResponseField name="zaapId" type="string">
  Message ID in Z-API
</ResponseField>

<ResponseField name="messageId" type="string">
  Message ID in WhatsApp
</ResponseField>

<ResponseField name="id" type="string">
  Added for Zapier compatibility, it has the same value as messageId
</ResponseField>

```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
{
  "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.
