Send Buttons with Video
#
Method#
/send-button-listPOST
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/send-button-list
#
HeaderKey | 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.
#
ConceptThis method allows you to send videos with action buttons. The button content, e.g., YES/NO, can be chosen by the user and will be used as a response to the message sent along with the buttons.
#
Attributes#
RequiredAttributes | 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 |
buttonList | buttonList | Button object |
important
The "message" attribute cannot be empty!
#
OptionalAttributes | Type | Description |
---|---|---|
delayMessage | number | This attribute adds a delay to the message. You can choose a range of 1~15 seconds, meaning how many seconds it will wait to send the next message (e.g., "delayMessage": 5). The default delay, if not specified, is 1~3 seconds. |
#
Button ListAttributes | Type | Description |
---|---|---|
video | string | URL or Base64 of the video to be sent |
buttons | button | List of buttons to be sent |
#
ButtonAttributes | Type | Description |
---|---|---|
label | string | Text for the button |
#
Optional ButtonAttributes | Type | Description |
---|---|---|
id | string | Button identifier |
#
Request Body#
Response#
200Attributes | 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
#
405In 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.
#
415If 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 ResponseLink to the webhook response (upon receiving)