curl --request POST \
--url https://api.omni.z-api.io/channels/{channel_id}/token/{channel_token}/send-button-actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "5511999999999",
"message": "Hello! How can we help?",
"title": "Omni Z-API",
"footer": "Choose an option",
"buttonActions": [
{
"id": "1",
"type": "CALL",
"phone": "5511999999999",
"label": "Contact us"
},
{
"id": "2",
"type": "URL",
"url": "https://www.omni.z-api.io",
"label": "Visit our website"
}
]
}
'{
"zaapId": "3999984263738042930CD6ECDE9VDWSA",
"messageId": "D241XXXX732339502B68",
"id": "D241XXXX732339502B68"
}{
"error": 405,
"message": "Method not allowed"
}{
"error": 415,
"message": "Unsupported media type"
}Messages
Send action buttons
Send messages with action buttons (call, URL, quick reply)
POST
/
send-button-actions
curl --request POST \
--url https://api.omni.z-api.io/channels/{channel_id}/token/{channel_token}/send-button-actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "5511999999999",
"message": "Hello! How can we help?",
"title": "Omni Z-API",
"footer": "Choose an option",
"buttonActions": [
{
"id": "1",
"type": "CALL",
"phone": "5511999999999",
"label": "Contact us"
},
{
"id": "2",
"type": "URL",
"url": "https://www.omni.z-api.io",
"label": "Visit our website"
}
]
}
'{
"zaapId": "3999984263738042930CD6ECDE9VDWSA",
"messageId": "D241XXXX732339502B68",
"id": "D241XXXX732339502B68"
}{
"error": 405,
"message": "Method not allowed"
}{
"error": 415,
"message": "Unsupported media type"
}Overview
Method for sending messages with action buttons. There are three button types:- CALL — Button to call a phone number
- URL — Button to open a link
- REPLY — Quick reply button
Do not combine all three button types in the same message. Send CALL + URL buttons together, and REPLY buttons separately. Combining all of them causes errors on WhatsApp Web.
For copy-code buttons, use the URL format:
https://www.whatsapp.com/otp/code/?otp_type=COPY_CODE&code=YOUR_CODEAuthorizations
Secret Key generated in the Omni Z-API Security panel
Body
application/json
Recipient phone number (country code + area code + number)
Example:
"5511999999999"
Message text
List of action buttons
Show child attributes
Show child attributes
Message title
Message footer
Delay in seconds before sending (1-15)
Required range:
1 <= x <= 15