Mensaje de lista
curl --request POST \
--url https://whatsapp.heybot.cloud/api/v2/message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": 123,
"type": "<string>",
"interactive": {
"type": "<string>",
"header": {
"type": "<string>",
"text": "<string>"
},
"body": {
"text": "<string>"
},
"footer": {
"text": "<string>"
},
"action": {
"button": "<string>",
"sections": [
{
"title": "<string>",
"rows": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
]
}
]
}
}
}
'import requests
url = "https://whatsapp.heybot.cloud/api/v2/message"
payload = {
"to": 123,
"type": "<string>",
"interactive": {
"type": "<string>",
"header": {
"type": "<string>",
"text": "<string>"
},
"body": { "text": "<string>" },
"footer": { "text": "<string>" },
"action": {
"button": "<string>",
"sections": [
{
"title": "<string>",
"rows": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
]
}
]
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: 123,
type: '<string>',
interactive: {
type: '<string>',
header: {type: '<string>', text: '<string>'},
body: JSON.stringify({text: '<string>'}),
footer: {text: '<string>'},
action: {
button: '<string>',
sections: [
{
title: '<string>',
rows: [{id: '<string>', title: '<string>', description: '<string>'}]
}
]
}
}
})
};
fetch('https://whatsapp.heybot.cloud/api/v2/message', 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://whatsapp.heybot.cloud/api/v2/message",
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([
'to' => 123,
'type' => '<string>',
'interactive' => [
'type' => '<string>',
'header' => [
'type' => '<string>',
'text' => '<string>'
],
'body' => [
'text' => '<string>'
],
'footer' => [
'text' => '<string>'
],
'action' => [
'button' => '<string>',
'sections' => [
[
'title' => '<string>',
'rows' => [
[
'id' => '<string>',
'title' => '<string>',
'description' => '<string>'
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://whatsapp.heybot.cloud/api/v2/message"
payload := strings.NewReader("{\n \"to\": 123,\n \"type\": \"<string>\",\n \"interactive\": {\n \"type\": \"<string>\",\n \"header\": {\n \"type\": \"<string>\",\n \"text\": \"<string>\"\n },\n \"body\": {\n \"text\": \"<string>\"\n },\n \"footer\": {\n \"text\": \"<string>\"\n },\n \"action\": {\n \"button\": \"<string>\",\n \"sections\": [\n {\n \"title\": \"<string>\",\n \"rows\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://whatsapp.heybot.cloud/api/v2/message")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to\": 123,\n \"type\": \"<string>\",\n \"interactive\": {\n \"type\": \"<string>\",\n \"header\": {\n \"type\": \"<string>\",\n \"text\": \"<string>\"\n },\n \"body\": {\n \"text\": \"<string>\"\n },\n \"footer\": {\n \"text\": \"<string>\"\n },\n \"action\": {\n \"button\": \"<string>\",\n \"sections\": [\n {\n \"title\": \"<string>\",\n \"rows\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://whatsapp.heybot.cloud/api/v2/message")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": 123,\n \"type\": \"<string>\",\n \"interactive\": {\n \"type\": \"<string>\",\n \"header\": {\n \"type\": \"<string>\",\n \"text\": \"<string>\"\n },\n \"body\": {\n \"text\": \"<string>\"\n },\n \"footer\": {\n \"text\": \"<string>\"\n },\n \"action\": {\n \"button\": \"<string>\",\n \"sections\": [\n {\n \"title\": \"<string>\",\n \"rows\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_bodyEnvío de mensajes
Mensaje de lista
POST
/
api
/
v2
/
message
Mensaje de lista
curl --request POST \
--url https://whatsapp.heybot.cloud/api/v2/message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": 123,
"type": "<string>",
"interactive": {
"type": "<string>",
"header": {
"type": "<string>",
"text": "<string>"
},
"body": {
"text": "<string>"
},
"footer": {
"text": "<string>"
},
"action": {
"button": "<string>",
"sections": [
{
"title": "<string>",
"rows": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
]
}
]
}
}
}
'import requests
url = "https://whatsapp.heybot.cloud/api/v2/message"
payload = {
"to": 123,
"type": "<string>",
"interactive": {
"type": "<string>",
"header": {
"type": "<string>",
"text": "<string>"
},
"body": { "text": "<string>" },
"footer": { "text": "<string>" },
"action": {
"button": "<string>",
"sections": [
{
"title": "<string>",
"rows": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
]
}
]
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: 123,
type: '<string>',
interactive: {
type: '<string>',
header: {type: '<string>', text: '<string>'},
body: JSON.stringify({text: '<string>'}),
footer: {text: '<string>'},
action: {
button: '<string>',
sections: [
{
title: '<string>',
rows: [{id: '<string>', title: '<string>', description: '<string>'}]
}
]
}
}
})
};
fetch('https://whatsapp.heybot.cloud/api/v2/message', 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://whatsapp.heybot.cloud/api/v2/message",
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([
'to' => 123,
'type' => '<string>',
'interactive' => [
'type' => '<string>',
'header' => [
'type' => '<string>',
'text' => '<string>'
],
'body' => [
'text' => '<string>'
],
'footer' => [
'text' => '<string>'
],
'action' => [
'button' => '<string>',
'sections' => [
[
'title' => '<string>',
'rows' => [
[
'id' => '<string>',
'title' => '<string>',
'description' => '<string>'
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://whatsapp.heybot.cloud/api/v2/message"
payload := strings.NewReader("{\n \"to\": 123,\n \"type\": \"<string>\",\n \"interactive\": {\n \"type\": \"<string>\",\n \"header\": {\n \"type\": \"<string>\",\n \"text\": \"<string>\"\n },\n \"body\": {\n \"text\": \"<string>\"\n },\n \"footer\": {\n \"text\": \"<string>\"\n },\n \"action\": {\n \"button\": \"<string>\",\n \"sections\": [\n {\n \"title\": \"<string>\",\n \"rows\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://whatsapp.heybot.cloud/api/v2/message")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to\": 123,\n \"type\": \"<string>\",\n \"interactive\": {\n \"type\": \"<string>\",\n \"header\": {\n \"type\": \"<string>\",\n \"text\": \"<string>\"\n },\n \"body\": {\n \"text\": \"<string>\"\n },\n \"footer\": {\n \"text\": \"<string>\"\n },\n \"action\": {\n \"button\": \"<string>\",\n \"sections\": [\n {\n \"title\": \"<string>\",\n \"rows\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://whatsapp.heybot.cloud/api/v2/message")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": 123,\n \"type\": \"<string>\",\n \"interactive\": {\n \"type\": \"<string>\",\n \"header\": {\n \"type\": \"<string>\",\n \"text\": \"<string>\"\n },\n \"body\": {\n \"text\": \"<string>\"\n },\n \"footer\": {\n \"text\": \"<string>\"\n },\n \"action\": {\n \"button\": \"<string>\",\n \"sections\": [\n {\n \"title\": \"<string>\",\n \"rows\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body- Los mensajes de lista interactiva te permiten presentar a los usuarios de WhatsApp una lista de opciones para elegir.
- Cuando un usuario toca el botón en el mensaje, se muestra un cuadro de diálogo con las opciones disponibles.
- Luego, el usuario puede elegir una opción y su selección se enviará como respuesta.



integer
default:5219876543210
required
Número de WhatsApp del destinatario en formato internacional, sin símbolos ni espacios.
string
required
Tipo de mensaje a enviar. Para este endpoint debe ser
interactive.object
required
The interactive message payload configuration.
Hide interactive properties
Hide interactive properties
string
default:"list"
required
The specific type of interactive message you are sending.
object
object
required
The main content of the message.
Show body properties
Show body properties
string
required
The primary text content that appears above the list menu button.
object
Optional smaller text displayed beneath the main body.
Show footer properties
Show footer properties
string
The footer text content.
object
required
The configuration for the list button and the menu items it opens.
Show action properties
Show action properties
string
required
The text displayed on the button that opens the list (e.g., “View Options”).
array
required
An array defining the categories (sections) within your list.
Show section object
Show section object
string
The title of the section (required if you have more than one section).
array
required
Ejemplo
{
"to": 5219876543210,
"type": "interactive",
"interactive": {
"type": "list",
"header": {
"type": "text",
"text": "<MESSAGE_HEADER_TEXT>"
},
"body": {
"text": "<MESSAGE_BODY_TEXT>"
},
"footer": {
"text": "<MESSAGE_FOOTER_TEXT>"
},
"action": {
"button": "<BUTTON_TEXT>",
"sections": [
{
"title": "<SECTION_TITLE_TEXT>",
"rows": [
{
"id": "<ROW_ID>",
"title": "<ROW_TITLE_TEXT>",
"description": "<ROW_DESCRIPTION_TEXT>"
}
<!-- Additional rows would go here -->
]
}
<!-- Additional sections would go here -->
]
}
}
}