Send OTP Button
Method#
/send-button-otp#
POST https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/send-button-otp
Header#
| Key | Value |
|---|---|
| Client-Token | ACCOUNT SECURITY TOKEN |
Warning
Button sending is currently available, but there are some decisive factors for operation. For more details visit the Button Status topic.
Concept#
This method allows you to send text messages with a button to copy a value.

Attributes#
Required#
| Attributes | Type | Description |
|---|---|---|
| phone | string | Phone number (or group ID in the case of group sending) of the recipient in the format DDI DDD NUMBER e.g., 551199999999. IMPORTANT Send only numbers, without formatting or masking |
| message | string | Text to be sent |
| code | string | Value to be copied when the button is clicked |
Optional#
| Attributes | Type | Description |
|---|---|---|
| image | string | URL or Base64 of the image that will be sent with button |
| buttonText | string | Button text (example: "Click here to copy"). The default value is "Copiar código". |
Request Body#
Response#
200#
| Attributes | Type | Description |
|---|---|---|
| zaapId | string | ID on Z-API |
| messageId | string | ID on WhatsApp |
| id | string | Added for compatibility with Zapier, it has the same value as messageId |
Example
405#
In this case, ensure that you are correctly sending the method specification, i.e., verify if you sent POST or GET as specified at the beginning of this topic.
415#
If you receive a 415 error, ensure to add the "Content-Type" header to the request object you are sending, which in most cases is "application/json".
Webhook Response#
Link to the webhook response (upon receiving)