Send Button Message
Send interactive messages with quick response buttons
Reading time: 1 minute
Send Button Message
Send interactive messages with buttons for quick responses.
POST
{{base_url}}/w/message/buttonQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
phone_number_id | string | Yes | Phone number ID of the sender |
Request Body (JSON)
| Parameter | Type | Required | Description |
|---|---|---|---|
phone | string | Yes | Recipient phone number |
body_text | string | Yes | Message text (max 1024 characters) |
buttons | array | Yes | Array of buttons (1-3 buttons) |
header_text | string | No | Header text (max 60 characters) |
footer_text | string | No | Footer text (max 60 characters) |
Button Specifications
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique button identifier (max 256 characters) |
title | string | Yes | Button text (max 20 characters) |
Important Limits:
- Maximum buttons: 3 buttons
- Button text length: 20 characters max
- Message text length: 1024 characters max
Example Request
Example Requestbash
curl -X POST "{{base_url}}/w/message/button?phone_number_id=123456" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Awal-Signature-256: sha256=abc..." \
-H "X-Timestamp: 1704124800" \
-H "X-Domain: your-workspace" \
-H "X-Client-ID: your-client-id" \
-d '{
"phone": "96650000000",
"header_text": "š Special Offer",
"body_text": "Get 20% off on all products! Offer valid for 24 hours only.",
"footer_text": "Limited Offer",
"buttons": [
{
"id": "btn_view_products",
"title": "View Products"
},
{
"id": "btn_contact",
"title": "Contact Us"
},
{
"id": "btn_cancel",
"title": "Later"
}
]
}'Example Response
Response200 OK
{
"status": true,
"message": {
"id": 12346,
"messageId": "wamid.HBgNOTY2NTA...",
"status": "sent"
}
}Related
ā Back to Messages
View Guide