curl --request POST \
--url https://api.wsapi.chat/messages/list \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Instance-Id: <x-instance-id>' \
--data '
{
"to": "1234567890@s.whatsapp.net",
"header": "Book a table",
"text": "Pick a time slot for your reservation.",
"footer": "Example Bistro",
"buttonText": "See times",
"sections": [
{
"title": "Lunch",
"rows": [
{
"id": "slot-1200",
"title": "12:00",
"description": "Terrace available"
},
{
"id": "slot-1330",
"title": "13:30"
}
]
},
{
"title": "Dinner",
"rows": [
{
"id": "slot-1900",
"title": "19:00"
},
{
"id": "slot-2030",
"title": "20:30",
"description": "Indoor seating only"
}
]
}
]
}
'import requests
url = "https://api.wsapi.chat/messages/list"
payload = {
"to": "1234567890@s.whatsapp.net",
"header": "Book a table",
"text": "Pick a time slot for your reservation.",
"footer": "Example Bistro",
"buttonText": "See times",
"sections": [
{
"title": "Lunch",
"rows": [
{
"id": "slot-1200",
"title": "12:00",
"description": "Terrace available"
},
{
"id": "slot-1330",
"title": "13:30"
}
]
},
{
"title": "Dinner",
"rows": [
{
"id": "slot-1900",
"title": "19:00"
},
{
"id": "slot-2030",
"title": "20:30",
"description": "Indoor seating only"
}
]
}
]
}
headers = {
"X-Instance-Id": "<x-instance-id>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Instance-Id': '<x-instance-id>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
to: '1234567890@s.whatsapp.net',
header: 'Book a table',
text: 'Pick a time slot for your reservation.',
footer: 'Example Bistro',
buttonText: 'See times',
sections: [
{
title: 'Lunch',
rows: [
{id: 'slot-1200', title: '12:00', description: 'Terrace available'},
{id: 'slot-1330', title: '13:30'}
]
},
{
title: 'Dinner',
rows: [
{id: 'slot-1900', title: '19:00'},
{id: 'slot-2030', title: '20:30', description: 'Indoor seating only'}
]
}
]
})
};
fetch('https://api.wsapi.chat/messages/list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.wsapi.chat/messages/list");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Instance-Id", "<x-instance-id>");
request.AddHeader("X-Api-Key", "<api-key>");
request.AddJsonBody("{\n \"to\": \"1234567890@s.whatsapp.net\",\n \"header\": \"Book a table\",\n \"text\": \"Pick a time slot for your reservation.\",\n \"footer\": \"Example Bistro\",\n \"buttonText\": \"See times\",\n \"sections\": [\n {\n \"title\": \"Lunch\",\n \"rows\": [\n {\n \"id\": \"slot-1200\",\n \"title\": \"12:00\",\n \"description\": \"Terrace available\"\n },\n {\n \"id\": \"slot-1330\",\n \"title\": \"13:30\"\n }\n ]\n },\n {\n \"title\": \"Dinner\",\n \"rows\": [\n {\n \"id\": \"slot-1900\",\n \"title\": \"19:00\"\n },\n {\n \"id\": \"slot-2030\",\n \"title\": \"20:30\",\n \"description\": \"Indoor seating only\"\n }\n ]\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "01234567890123456"
}{
"status": 400,
"detail": "invalid request body"
}{
"status": 401,
"detail": "unauthorized"
}{
"status": 409,
"detail": "device not paired"
}{
"status": 503,
"detail": "instance not available"
}Send a list message (beta)
Beta. Send a message with a button (buttonText) that opens a single-select list. Rows are grouped into titled sections. The response contains the message ID.
Picking a row produces a message event of type list_reply with the row’s id, title and description.
A list has at most 10 sections and at most 10 rows in total across all sections. Row ids must be unique across the whole list. Header and footer are text only. Set aiLabel to show WhatsApp’s “AI” badge on the message; it applies to 1:1 chats only and is ignored in groups.
Rendering: currently renders on phones only. WhatsApp Web shows “open your phone to view this message” instead; this is a temporary limitation.
Interactive messages rely on WhatsApp behaviour that is not an official contract and may change without notice. WhatsApp accepts the message even if a client does not render it, so a 201 response does not guarantee the list is displayed.
Limits mirror the WhatsApp Cloud API: text up to 1024 characters, header and footer up to 60, buttonText up to 20, section title up to 24, row title up to 24, row description up to 72, row id up to 200.
curl --request POST \
--url https://api.wsapi.chat/messages/list \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Instance-Id: <x-instance-id>' \
--data '
{
"to": "1234567890@s.whatsapp.net",
"header": "Book a table",
"text": "Pick a time slot for your reservation.",
"footer": "Example Bistro",
"buttonText": "See times",
"sections": [
{
"title": "Lunch",
"rows": [
{
"id": "slot-1200",
"title": "12:00",
"description": "Terrace available"
},
{
"id": "slot-1330",
"title": "13:30"
}
]
},
{
"title": "Dinner",
"rows": [
{
"id": "slot-1900",
"title": "19:00"
},
{
"id": "slot-2030",
"title": "20:30",
"description": "Indoor seating only"
}
]
}
]
}
'import requests
url = "https://api.wsapi.chat/messages/list"
payload = {
"to": "1234567890@s.whatsapp.net",
"header": "Book a table",
"text": "Pick a time slot for your reservation.",
"footer": "Example Bistro",
"buttonText": "See times",
"sections": [
{
"title": "Lunch",
"rows": [
{
"id": "slot-1200",
"title": "12:00",
"description": "Terrace available"
},
{
"id": "slot-1330",
"title": "13:30"
}
]
},
{
"title": "Dinner",
"rows": [
{
"id": "slot-1900",
"title": "19:00"
},
{
"id": "slot-2030",
"title": "20:30",
"description": "Indoor seating only"
}
]
}
]
}
headers = {
"X-Instance-Id": "<x-instance-id>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Instance-Id': '<x-instance-id>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
to: '1234567890@s.whatsapp.net',
header: 'Book a table',
text: 'Pick a time slot for your reservation.',
footer: 'Example Bistro',
buttonText: 'See times',
sections: [
{
title: 'Lunch',
rows: [
{id: 'slot-1200', title: '12:00', description: 'Terrace available'},
{id: 'slot-1330', title: '13:30'}
]
},
{
title: 'Dinner',
rows: [
{id: 'slot-1900', title: '19:00'},
{id: 'slot-2030', title: '20:30', description: 'Indoor seating only'}
]
}
]
})
};
fetch('https://api.wsapi.chat/messages/list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.wsapi.chat/messages/list");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Instance-Id", "<x-instance-id>");
request.AddHeader("X-Api-Key", "<api-key>");
request.AddJsonBody("{\n \"to\": \"1234567890@s.whatsapp.net\",\n \"header\": \"Book a table\",\n \"text\": \"Pick a time slot for your reservation.\",\n \"footer\": \"Example Bistro\",\n \"buttonText\": \"See times\",\n \"sections\": [\n {\n \"title\": \"Lunch\",\n \"rows\": [\n {\n \"id\": \"slot-1200\",\n \"title\": \"12:00\",\n \"description\": \"Terrace available\"\n },\n {\n \"id\": \"slot-1330\",\n \"title\": \"13:30\"\n }\n ]\n },\n {\n \"title\": \"Dinner\",\n \"rows\": [\n {\n \"id\": \"slot-1900\",\n \"title\": \"19:00\"\n },\n {\n \"id\": \"slot-2030\",\n \"title\": \"20:30\",\n \"description\": \"Indoor seating only\"\n }\n ]\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "01234567890123456"
}{
"status": 400,
"detail": "invalid request body"
}{
"status": 401,
"detail": "unauthorized"
}{
"status": 409,
"detail": "device not paired"
}{
"status": 503,
"detail": "instance not available"
}Authorizations
Instance or customer-level API key. Either the instance's own API key or the customer's API key is accepted. Must be paired with the X-Instance-Id header to identify the target instance.
Headers
The ID of the WhatsApp instance to use
Body
Message body
1024Label of the button that opens the list
20Sections of the list. At most 10 rows in total across all sections, with row ids unique across the whole list.
1 - 10 elementsShow child attributes
Show child attributes
Optional header text shown above the body
60Optional footer text shown below the body
60Show WhatsApp's "AI" badge on the message. 1:1 chats only; ignored in groups.
Response
Resource created
ID of the created resource