HomeUser GuidesAPI Reference
Get Started
HomeAPI Reference
Authentication
Branches
Contact Groups
Contacts
Conversations
Error HandlingInvoices
Messages
Orders
Rate LimitingSDKs & Code ExamplesTemplatesTicketsAPI VersioningWABA NumbersWebhooks
User GuideAPI ReferenceMessagesSend Button Message

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/button

Query Parameters

ParameterTypeRequiredDescription
phone_number_idstringYesPhone number ID of the sender

Request Body (JSON)

ParameterTypeRequiredDescription
phonestringYesRecipient phone number
body_textstringYesMessage text (max 1024 characters)
buttonsarrayYesArray of buttons (1-3 buttons)
header_textstringNoHeader text (max 60 characters)
footer_textstringNoFooter text (max 60 characters)

Button Specifications

ParameterTypeRequiredDescription
idstringYesUnique button identifier (max 256 characters)
titlestringYesButton 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
View