Send buttons (interactive message)
curl --request POST \
--url https://{host}/api/sendButtons \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"chatId": "5511999999999@c.us",
"header": "How are you?",
"body": "Tell us how are you please 🙏",
"footer": "If you have any questions, please send it in the chat",
"buttons": [
{
"type": "reply",
"text": "I am good!"
},
{
"type": "call",
"text": "Call us",
"phoneNumber": "+1234567890"
},
{
"type": "copy",
"text": "Copy code",
"copyCode": "4321"
},
{
"type": "url",
"text": "How did you do that?",
"url": "https://wappfy.com.br"
}
],
"session": "my-session",
"headerImage": {
"mimetype": "image/jpeg",
"url": "https://github.com/stgcompany/wappfy/raw/core/examples/wappfy.jpg",
"filename": "filename.jpg"
}
}
'import requests
url = "https://{host}/api/sendButtons"
payload = {
"chatId": "5511999999999@c.us",
"header": "How are you?",
"body": "Tell us how are you please 🙏",
"footer": "If you have any questions, please send it in the chat",
"buttons": [
{
"type": "reply",
"text": "I am good!"
},
{
"type": "call",
"text": "Call us",
"phoneNumber": "+1234567890"
},
{
"type": "copy",
"text": "Copy code",
"copyCode": "4321"
},
{
"type": "url",
"text": "How did you do that?",
"url": "https://wappfy.com.br"
}
],
"session": "my-session",
"headerImage": {
"mimetype": "image/jpeg",
"url": "https://github.com/stgcompany/wappfy/raw/core/examples/wappfy.jpg",
"filename": "filename.jpg"
}
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chatId: '5511999999999@c.us',
header: 'How are you?',
body: JSON.stringify('Tell us how are you please 🙏'),
footer: 'If you have any questions, please send it in the chat',
buttons: [
{type: 'reply', text: 'I am good!'},
{type: 'call', text: 'Call us', phoneNumber: '+1234567890'},
{type: 'copy', text: 'Copy code', copyCode: '4321'},
{type: 'url', text: 'How did you do that?', url: 'https://wappfy.com.br'}
],
session: 'my-session',
headerImage: {
mimetype: 'image/jpeg',
url: 'https://github.com/stgcompany/wappfy/raw/core/examples/wappfy.jpg',
filename: 'filename.jpg'
}
})
};
fetch('https://{host}/api/sendButtons', 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://{host}/api/sendButtons",
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([
'chatId' => '5511999999999@c.us',
'header' => 'How are you?',
'body' => 'Tell us how are you please 🙏',
'footer' => 'If you have any questions, please send it in the chat',
'buttons' => [
[
'type' => 'reply',
'text' => 'I am good!'
],
[
'type' => 'call',
'text' => 'Call us',
'phoneNumber' => '+1234567890'
],
[
'type' => 'copy',
'text' => 'Copy code',
'copyCode' => '4321'
],
[
'type' => 'url',
'text' => 'How did you do that?',
'url' => 'https://wappfy.com.br'
]
],
'session' => 'my-session',
'headerImage' => [
'mimetype' => 'image/jpeg',
'url' => 'https://github.com/stgcompany/wappfy/raw/core/examples/wappfy.jpg',
'filename' => 'filename.jpg'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$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://{host}/api/sendButtons"
payload := strings.NewReader("{\n \"chatId\": \"5511999999999@c.us\",\n \"header\": \"How are you?\",\n \"body\": \"Tell us how are you please 🙏\",\n \"footer\": \"If you have any questions, please send it in the chat\",\n \"buttons\": [\n {\n \"type\": \"reply\",\n \"text\": \"I am good!\"\n },\n {\n \"type\": \"call\",\n \"text\": \"Call us\",\n \"phoneNumber\": \"+1234567890\"\n },\n {\n \"type\": \"copy\",\n \"text\": \"Copy code\",\n \"copyCode\": \"4321\"\n },\n {\n \"type\": \"url\",\n \"text\": \"How did you do that?\",\n \"url\": \"https://wappfy.com.br\"\n }\n ],\n \"session\": \"my-session\",\n \"headerImage\": {\n \"mimetype\": \"image/jpeg\",\n \"url\": \"https://github.com/stgcompany/wappfy/raw/core/examples/wappfy.jpg\",\n \"filename\": \"filename.jpg\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
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://{host}/api/sendButtons")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chatId\": \"5511999999999@c.us\",\n \"header\": \"How are you?\",\n \"body\": \"Tell us how are you please 🙏\",\n \"footer\": \"If you have any questions, please send it in the chat\",\n \"buttons\": [\n {\n \"type\": \"reply\",\n \"text\": \"I am good!\"\n },\n {\n \"type\": \"call\",\n \"text\": \"Call us\",\n \"phoneNumber\": \"+1234567890\"\n },\n {\n \"type\": \"copy\",\n \"text\": \"Copy code\",\n \"copyCode\": \"4321\"\n },\n {\n \"type\": \"url\",\n \"text\": \"How did you do that?\",\n \"url\": \"https://wappfy.com.br\"\n }\n ],\n \"session\": \"my-session\",\n \"headerImage\": {\n \"mimetype\": \"image/jpeg\",\n \"url\": \"https://github.com/stgcompany/wappfy/raw/core/examples/wappfy.jpg\",\n \"filename\": \"filename.jpg\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/sendButtons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chatId\": \"5511999999999@c.us\",\n \"header\": \"How are you?\",\n \"body\": \"Tell us how are you please 🙏\",\n \"footer\": \"If you have any questions, please send it in the chat\",\n \"buttons\": [\n {\n \"type\": \"reply\",\n \"text\": \"I am good!\"\n },\n {\n \"type\": \"call\",\n \"text\": \"Call us\",\n \"phoneNumber\": \"+1234567890\"\n },\n {\n \"type\": \"copy\",\n \"text\": \"Copy code\",\n \"copyCode\": \"4321\"\n },\n {\n \"type\": \"url\",\n \"text\": \"How did you do that?\",\n \"url\": \"https://wappfy.com.br\"\n }\n ],\n \"session\": \"my-session\",\n \"headerImage\": {\n \"mimetype\": \"image/jpeg\",\n \"url\": \"https://github.com/stgcompany/wappfy/raw/core/examples/wappfy.jpg\",\n \"filename\": \"filename.jpg\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"messageId": "3EB0XXXXXX"
}
Messaging
Send Buttons (List)
Send interactive message with list buttons
POST
/
api
/
sendButtons
Send buttons (interactive message)
curl --request POST \
--url https://{host}/api/sendButtons \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"chatId": "5511999999999@c.us",
"header": "How are you?",
"body": "Tell us how are you please 🙏",
"footer": "If you have any questions, please send it in the chat",
"buttons": [
{
"type": "reply",
"text": "I am good!"
},
{
"type": "call",
"text": "Call us",
"phoneNumber": "+1234567890"
},
{
"type": "copy",
"text": "Copy code",
"copyCode": "4321"
},
{
"type": "url",
"text": "How did you do that?",
"url": "https://wappfy.com.br"
}
],
"session": "my-session",
"headerImage": {
"mimetype": "image/jpeg",
"url": "https://github.com/stgcompany/wappfy/raw/core/examples/wappfy.jpg",
"filename": "filename.jpg"
}
}
'import requests
url = "https://{host}/api/sendButtons"
payload = {
"chatId": "5511999999999@c.us",
"header": "How are you?",
"body": "Tell us how are you please 🙏",
"footer": "If you have any questions, please send it in the chat",
"buttons": [
{
"type": "reply",
"text": "I am good!"
},
{
"type": "call",
"text": "Call us",
"phoneNumber": "+1234567890"
},
{
"type": "copy",
"text": "Copy code",
"copyCode": "4321"
},
{
"type": "url",
"text": "How did you do that?",
"url": "https://wappfy.com.br"
}
],
"session": "my-session",
"headerImage": {
"mimetype": "image/jpeg",
"url": "https://github.com/stgcompany/wappfy/raw/core/examples/wappfy.jpg",
"filename": "filename.jpg"
}
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chatId: '5511999999999@c.us',
header: 'How are you?',
body: JSON.stringify('Tell us how are you please 🙏'),
footer: 'If you have any questions, please send it in the chat',
buttons: [
{type: 'reply', text: 'I am good!'},
{type: 'call', text: 'Call us', phoneNumber: '+1234567890'},
{type: 'copy', text: 'Copy code', copyCode: '4321'},
{type: 'url', text: 'How did you do that?', url: 'https://wappfy.com.br'}
],
session: 'my-session',
headerImage: {
mimetype: 'image/jpeg',
url: 'https://github.com/stgcompany/wappfy/raw/core/examples/wappfy.jpg',
filename: 'filename.jpg'
}
})
};
fetch('https://{host}/api/sendButtons', 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://{host}/api/sendButtons",
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([
'chatId' => '5511999999999@c.us',
'header' => 'How are you?',
'body' => 'Tell us how are you please 🙏',
'footer' => 'If you have any questions, please send it in the chat',
'buttons' => [
[
'type' => 'reply',
'text' => 'I am good!'
],
[
'type' => 'call',
'text' => 'Call us',
'phoneNumber' => '+1234567890'
],
[
'type' => 'copy',
'text' => 'Copy code',
'copyCode' => '4321'
],
[
'type' => 'url',
'text' => 'How did you do that?',
'url' => 'https://wappfy.com.br'
]
],
'session' => 'my-session',
'headerImage' => [
'mimetype' => 'image/jpeg',
'url' => 'https://github.com/stgcompany/wappfy/raw/core/examples/wappfy.jpg',
'filename' => 'filename.jpg'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$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://{host}/api/sendButtons"
payload := strings.NewReader("{\n \"chatId\": \"5511999999999@c.us\",\n \"header\": \"How are you?\",\n \"body\": \"Tell us how are you please 🙏\",\n \"footer\": \"If you have any questions, please send it in the chat\",\n \"buttons\": [\n {\n \"type\": \"reply\",\n \"text\": \"I am good!\"\n },\n {\n \"type\": \"call\",\n \"text\": \"Call us\",\n \"phoneNumber\": \"+1234567890\"\n },\n {\n \"type\": \"copy\",\n \"text\": \"Copy code\",\n \"copyCode\": \"4321\"\n },\n {\n \"type\": \"url\",\n \"text\": \"How did you do that?\",\n \"url\": \"https://wappfy.com.br\"\n }\n ],\n \"session\": \"my-session\",\n \"headerImage\": {\n \"mimetype\": \"image/jpeg\",\n \"url\": \"https://github.com/stgcompany/wappfy/raw/core/examples/wappfy.jpg\",\n \"filename\": \"filename.jpg\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
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://{host}/api/sendButtons")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chatId\": \"5511999999999@c.us\",\n \"header\": \"How are you?\",\n \"body\": \"Tell us how are you please 🙏\",\n \"footer\": \"If you have any questions, please send it in the chat\",\n \"buttons\": [\n {\n \"type\": \"reply\",\n \"text\": \"I am good!\"\n },\n {\n \"type\": \"call\",\n \"text\": \"Call us\",\n \"phoneNumber\": \"+1234567890\"\n },\n {\n \"type\": \"copy\",\n \"text\": \"Copy code\",\n \"copyCode\": \"4321\"\n },\n {\n \"type\": \"url\",\n \"text\": \"How did you do that?\",\n \"url\": \"https://wappfy.com.br\"\n }\n ],\n \"session\": \"my-session\",\n \"headerImage\": {\n \"mimetype\": \"image/jpeg\",\n \"url\": \"https://github.com/stgcompany/wappfy/raw/core/examples/wappfy.jpg\",\n \"filename\": \"filename.jpg\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/sendButtons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chatId\": \"5511999999999@c.us\",\n \"header\": \"How are you?\",\n \"body\": \"Tell us how are you please 🙏\",\n \"footer\": \"If you have any questions, please send it in the chat\",\n \"buttons\": [\n {\n \"type\": \"reply\",\n \"text\": \"I am good!\"\n },\n {\n \"type\": \"call\",\n \"text\": \"Call us\",\n \"phoneNumber\": \"+1234567890\"\n },\n {\n \"type\": \"copy\",\n \"text\": \"Copy code\",\n \"copyCode\": \"4321\"\n },\n {\n \"type\": \"url\",\n \"text\": \"How did you do that?\",\n \"url\": \"https://wappfy.com.br\"\n }\n ],\n \"session\": \"my-session\",\n \"headerImage\": {\n \"mimetype\": \"image/jpeg\",\n \"url\": \"https://github.com/stgcompany/wappfy/raw/core/examples/wappfy.jpg\",\n \"filename\": \"filename.jpg\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"messageId": "3EB0XXXXXX"
}
Description
This endpoint allows you to send interactive messages with buttons organized in lists to individual contacts or groups on WhatsApp. Lists can contain multiple sections with various options each.Body
{
"sessionId": "my-session",
"jid": "5511999999999@s.whatsapp.net",
"list": {
"title": "Options Menu",
"description": "Select one of the options below",
"button": "View Options",
"sections": [
{
"title": "Products",
"rows": [
{
"title": "Basic Plan",
"description": "$29.90/month",
"rowId": "plan_basic"
}
]
}
]
}
}
Body Parameters
| Property | Type | Required | Description |
|---|---|---|---|
sessionId | string | ✅ Yes | Authenticated session ID that will send the message |
jid | string | ✅ Yes | Recipient identifier (WhatsApp JID). Format: 5511999999999@s.whatsapp.net for contacts or 120363XXXXX@g.us for groups |
list | object | ✅ Yes | Object containing the button list information |
list.title | string | ✅ Yes | Message title |
list.description | string | ❌ No | Description or message body |
list.button | string | ✅ Yes | Button text that opens the list (example: “View options”) |
list.sections | array | ✅ Yes | Array of list sections |
list.sections[].title | string | ✅ Yes | Section title |
list.sections[].rows | array | ✅ Yes | Array of section rows (options) |
list.sections[].rows[].title | string | ✅ Yes | Option title |
list.sections[].rows[].description | string | ❌ No | Option description |
list.sections[].rows[].rowId | string | ✅ Yes | Unique option ID (used to identify the response) |
{
"success": true,
"messageId": "3EB0XXXXXX"
}
Status Codes
200- Message with buttons sent successfully400- Invalid parameters401- Unauthorized session404- Session not found
Usage Example
curl -X POST https://api.wappfy.com.br/api/sendButtons \
-H "Content-Type: application/json" \
-d '{
"sessionId": "my-session",
"jid": "5511999999999@s.whatsapp.net",
"list": {
"title": "Options Menu",
"description": "Select one of the options below:",
"button": "View Menu",
"sections": [
{
"title": "Products",
"rows": [
{
"title": "Basic Plan",
"description": "$29.90/month",
"rowId": "plan_basic"
},
{
"title": "Pro Plan",
"description": "$59.90/month",
"rowId": "plan_pro"
}
]
},
{
"title": "Support",
"rows": [
{
"title": "Talk to agent",
"rowId": "support_human"
}
]
}
]
}
}'
const response = await fetch('https://api.wappfy.com.br/api/sendButtons', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
sessionId: 'my-session',
jid: '5511999999999@s.whatsapp.net',
list: {
title: 'Options Menu',
description: 'Select one of the options below:',
button: 'View Menu',
sections: [
{
title: 'Products',
rows: [
{
title: 'Basic Plan',
description: '$29.90/month',
rowId: 'plan_basic'
},
{
title: 'Pro Plan',
description: '$59.90/month',
rowId: 'plan_pro'
}
]
},
{
title: 'Support',
rows: [
{
title: 'Talk to agent',
rowId: 'support_human'
}
]
}
]
}
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://api.wappfy.com.br/api/sendButtons',
json={
'sessionId': 'my-session',
'jid': '5511999999999@s.whatsapp.net',
'list': {
'title': 'Options Menu',
'description': 'Select one of the options below:',
'button': 'View Menu',
'sections': [
{
'title': 'Products',
'rows': [
{
'title': 'Basic Plan',
'description': '$29.90/month',
'rowId': 'plan_basic'
},
{
'title': 'Pro Plan',
'description': '$59.90/month',
'rowId': 'plan_pro'
}
]
},
{
'title': 'Support',
'rows': [
{
'title': 'Talk to agent',
'rowId': 'support_human'
}
]
}
]
}
}
)
data = response.json()
print(data)
Authorizations
Your Wappfy API key (get it at dash.wappfy.com.br)
Body
application/json
Example:
"5511999999999@c.us"
Example:
"How are you?"
Example:
"Tell us how are you please 🙏"
Example:
"If you have any questions, please send it in the chat"
Show child attributes
Show child attributes
Example:
[
{ "type": "reply", "text": "I am good!" },
{
"type": "call",
"text": "Call us",
"phoneNumber": "+1234567890"
},
{
"type": "copy",
"text": "Copy code",
"copyCode": "4321"
},
{
"type": "url",
"text": "How did you do that?",
"url": "https://wappfy.com.br"
}
]
Session name (instanceName)
Example:
"my-session"
- Option 1
- Option 2
Show child attributes
Show child attributes
Response
201 - undefined
⌘I
