Messaging
Send buttons
Send an interactive message with action buttons
POST
/
message
/
sendButtons
/
:instanceName
Send buttons
curl --request POST \
--url https://api.example.com/message/sendButtons/:instanceName \
--header 'Content-Type: application/json' \
--data '
{
"number": "<string>",
"title": "<string>",
"description": "<string>",
"footer": "<string>",
"buttons": [
{
"type": "<string>",
"displayText": "<string>",
"id": "<string>",
"url": "<string>",
"phoneNumber": "<string>",
"copyCode": "<string>"
}
],
"thumbnailUrl": "<string>",
"delay": 123
}
'import requests
url = "https://api.example.com/message/sendButtons/:instanceName"
payload = {
"number": "<string>",
"title": "<string>",
"description": "<string>",
"footer": "<string>",
"buttons": [
{
"type": "<string>",
"displayText": "<string>",
"id": "<string>",
"url": "<string>",
"phoneNumber": "<string>",
"copyCode": "<string>"
}
],
"thumbnailUrl": "<string>",
"delay": 123
}
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({
number: '<string>',
title: '<string>',
description: '<string>',
footer: '<string>',
buttons: [
{
type: '<string>',
displayText: '<string>',
id: '<string>',
url: '<string>',
phoneNumber: '<string>',
copyCode: '<string>'
}
],
thumbnailUrl: '<string>',
delay: 123
})
};
fetch('https://api.example.com/message/sendButtons/:instanceName', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/message/sendButtons/:instanceName",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'number' => '<string>',
'title' => '<string>',
'description' => '<string>',
'footer' => '<string>',
'buttons' => [
[
'type' => '<string>',
'displayText' => '<string>',
'id' => '<string>',
'url' => '<string>',
'phoneNumber' => '<string>',
'copyCode' => '<string>'
]
],
'thumbnailUrl' => '<string>',
'delay' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/message/sendButtons/:instanceName"
payload := strings.NewReader("{\n \"number\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"footer\": \"<string>\",\n \"buttons\": [\n {\n \"type\": \"<string>\",\n \"displayText\": \"<string>\",\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"copyCode\": \"<string>\"\n }\n ],\n \"thumbnailUrl\": \"<string>\",\n \"delay\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/message/sendButtons/:instanceName")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"footer\": \"<string>\",\n \"buttons\": [\n {\n \"type\": \"<string>\",\n \"displayText\": \"<string>\",\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"copyCode\": \"<string>\"\n }\n ],\n \"thumbnailUrl\": \"<string>\",\n \"delay\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/message/sendButtons/:instanceName")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"footer\": \"<string>\",\n \"buttons\": [\n {\n \"type\": \"<string>\",\n \"displayText\": \"<string>\",\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"copyCode\": \"<string>\"\n }\n ],\n \"thumbnailUrl\": \"<string>\",\n \"delay\": 123\n}"
response = http.request(request)
puts response.read_body{
"key": {},
"message": {}
}Request
Send a message with interactive buttons that users can tap to perform actions.string
required
Name of the instance
Body parameters
string
required
Recipient’s WhatsApp number with country code (e.g., “5511999999999”)
string
required
Main title text of the message
string
Description or body text
string
Footer text displayed at the bottom
array
required
Array of button objects
string
URL of an image thumbnail to display
number
Delay in milliseconds before sending
Response
object
Message key information
object
Button message details
Example request
curl -X POST https://your-api.com/message/sendButtons/my-instance \
-H "apikey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"number": "5511999999999",
"title": "Choose an action",
"description": "Select one of the options below",
"footer": "Powered by Evolution API",
"buttons": [
{
"type": "reply",
"displayText": "Option 1",
"id": "option-1"
},
{
"type": "url",
"displayText": "Visit Website",
"url": "https://evolution-api.com"
},
{
"type": "call",
"displayText": "Call Us",
"phoneNumber": "5511999999999"
}
]
}'
const response = await fetch('https://your-api.com/message/sendButtons/my-instance', {
method: 'POST',
headers: {
'apikey': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
number: '5511999999999',
title: 'Choose an action',
description: 'Select one of the options below',
footer: 'Powered by Evolution API',
buttons: [
{ type: 'reply', displayText: 'Option 1', id: 'option-1' },
{ type: 'url', displayText: 'Visit Website', url: 'https://evolution-api.com' },
{ type: 'call', displayText: 'Call Us', phoneNumber: '5511999999999' }
]
})
});
const data = await response.json();
console.log(data);
Button types
Reply buttons
Reply buttons
Reply buttons send a text response back when clicked. Use the
id field to identify which button was clicked in webhook events.{
"type": "reply",
"displayText": "Yes",
"id": "confirm-yes"
}
URL buttons
URL buttons
URL buttons open a web link when clicked.
{
"type": "url",
"displayText": "Visit Website",
"url": "https://example.com"
}
Call buttons
Call buttons
Call buttons initiate a phone call when clicked.
{
"type": "call",
"displayText": "Call Support",
"phoneNumber": "5511999999999"
}
You can include up to 3 buttons in a single message. Button support varies by WhatsApp client version.
⌘I
Send buttons
curl --request POST \
--url https://api.example.com/message/sendButtons/:instanceName \
--header 'Content-Type: application/json' \
--data '
{
"number": "<string>",
"title": "<string>",
"description": "<string>",
"footer": "<string>",
"buttons": [
{
"type": "<string>",
"displayText": "<string>",
"id": "<string>",
"url": "<string>",
"phoneNumber": "<string>",
"copyCode": "<string>"
}
],
"thumbnailUrl": "<string>",
"delay": 123
}
'import requests
url = "https://api.example.com/message/sendButtons/:instanceName"
payload = {
"number": "<string>",
"title": "<string>",
"description": "<string>",
"footer": "<string>",
"buttons": [
{
"type": "<string>",
"displayText": "<string>",
"id": "<string>",
"url": "<string>",
"phoneNumber": "<string>",
"copyCode": "<string>"
}
],
"thumbnailUrl": "<string>",
"delay": 123
}
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({
number: '<string>',
title: '<string>',
description: '<string>',
footer: '<string>',
buttons: [
{
type: '<string>',
displayText: '<string>',
id: '<string>',
url: '<string>',
phoneNumber: '<string>',
copyCode: '<string>'
}
],
thumbnailUrl: '<string>',
delay: 123
})
};
fetch('https://api.example.com/message/sendButtons/:instanceName', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/message/sendButtons/:instanceName",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'number' => '<string>',
'title' => '<string>',
'description' => '<string>',
'footer' => '<string>',
'buttons' => [
[
'type' => '<string>',
'displayText' => '<string>',
'id' => '<string>',
'url' => '<string>',
'phoneNumber' => '<string>',
'copyCode' => '<string>'
]
],
'thumbnailUrl' => '<string>',
'delay' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/message/sendButtons/:instanceName"
payload := strings.NewReader("{\n \"number\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"footer\": \"<string>\",\n \"buttons\": [\n {\n \"type\": \"<string>\",\n \"displayText\": \"<string>\",\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"copyCode\": \"<string>\"\n }\n ],\n \"thumbnailUrl\": \"<string>\",\n \"delay\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/message/sendButtons/:instanceName")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"footer\": \"<string>\",\n \"buttons\": [\n {\n \"type\": \"<string>\",\n \"displayText\": \"<string>\",\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"copyCode\": \"<string>\"\n }\n ],\n \"thumbnailUrl\": \"<string>\",\n \"delay\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/message/sendButtons/:instanceName")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"footer\": \"<string>\",\n \"buttons\": [\n {\n \"type\": \"<string>\",\n \"displayText\": \"<string>\",\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"copyCode\": \"<string>\"\n }\n ],\n \"thumbnailUrl\": \"<string>\",\n \"delay\": 123\n}"
response = http.request(request)
puts response.read_body{
"key": {},
"message": {}
}