Send Button Message
curl --request POST \
--url https://api.example.com/api/v1/messages/send/interactive/buttons \
--header 'Content-Type: application/json' \
--data '
{
"body": "Choose your preferred slot",
"buttons": [
{
"id": "slot_morning",
"title": "Morning"
},
{
"id": "slot_afternoon",
"title": "Afternoon"
}
],
"phone_number": "6281234567890",
"whatsapp_account_id": "c053d8ef-6c19-4ecb-9cc5-a4a64be79d92"
}
'import requests
url = "https://api.example.com/api/v1/messages/send/interactive/buttons"
payload = {
"body": "Choose your preferred slot",
"buttons": [
{
"id": "slot_morning",
"title": "Morning"
},
{
"id": "slot_afternoon",
"title": "Afternoon"
}
],
"phone_number": "6281234567890",
"whatsapp_account_id": "c053d8ef-6c19-4ecb-9cc5-a4a64be79d92"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('Choose your preferred slot'),
buttons: [
{id: 'slot_morning', title: 'Morning'},
{id: 'slot_afternoon', title: 'Afternoon'}
],
phone_number: '6281234567890',
whatsapp_account_id: 'c053d8ef-6c19-4ecb-9cc5-a4a64be79d92'
})
};
fetch('https://api.example.com/api/v1/messages/send/interactive/buttons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"run_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}interactive
Send Button Message
Send a message with interactive buttons.
POST
/
api
/
v1
/
messages
/
send
/
interactive
/
buttons
Send Button Message
curl --request POST \
--url https://api.example.com/api/v1/messages/send/interactive/buttons \
--header 'Content-Type: application/json' \
--data '
{
"body": "Choose your preferred slot",
"buttons": [
{
"id": "slot_morning",
"title": "Morning"
},
{
"id": "slot_afternoon",
"title": "Afternoon"
}
],
"phone_number": "6281234567890",
"whatsapp_account_id": "c053d8ef-6c19-4ecb-9cc5-a4a64be79d92"
}
'import requests
url = "https://api.example.com/api/v1/messages/send/interactive/buttons"
payload = {
"body": "Choose your preferred slot",
"buttons": [
{
"id": "slot_morning",
"title": "Morning"
},
{
"id": "slot_afternoon",
"title": "Afternoon"
}
],
"phone_number": "6281234567890",
"whatsapp_account_id": "c053d8ef-6c19-4ecb-9cc5-a4a64be79d92"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('Choose your preferred slot'),
buttons: [
{id: 'slot_morning', title: 'Morning'},
{id: 'slot_afternoon', title: 'Afternoon'}
],
phone_number: '6281234567890',
whatsapp_account_id: 'c053d8ef-6c19-4ecb-9cc5-a4a64be79d92'
})
};
fetch('https://api.example.com/api/v1/messages/send/interactive/buttons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"run_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
Body
application/json
Request to send a button reply message.
Recipient phone number.
Required string length:
5 - 50Primary interactive message body.
Required string length:
1 - 1024Up to three quick-reply buttons.
Required array length:
1 - 3 elementsShow child attributes
Show child attributes
Optional footer text shown under the buttons.
Maximum string length:
60