Send a List Message
const message = await zavu.messages.send({
to: "+14155551234",
text: "Choose a support topic:",
channel: "whatsapp",
messageType: "list",
content: {
listButton: "View Options",
sections: [
{
title: "Account",
rows: [
{ id: "password", title: "Reset Password", description: "Change or reset your password" },
{ id: "billing", title: "Billing Issue", description: "Questions about charges" }
]
},
{
title: "Orders",
rows: [
{ id: "track", title: "Track Order", description: "Check delivery status" },
{ id: "return", title: "Return Item", description: "Start a return request" }
]
}
]
}
});
message = zavu.messages.send(
to="+14155551234",
text="Choose a support topic:",
channel="whatsapp",
message_type="list",
content={
"list_button": "View Options",
"sections": [
{
"title": "Account",
"rows": [
{"id": "password", "title": "Reset Password", "description": "Change or reset your password"},
{"id": "billing", "title": "Billing Issue", "description": "Questions about charges"}
]
},
{
"title": "Orders",
"rows": [
{"id": "track", "title": "Track Order", "description": "Check delivery status"},
{"id": "return", "title": "Return Item", "description": "Start a return request"}
]
}
]
}
)
message = client.messages.send_(
to: "+14155551234",
text: "Choose a support topic:",
channel: "whatsapp",
message_type: "list",
content: {
list_button: "View Options",
sections: [
{
title: "Account",
rows: [
{ id: "password", title: "Reset Password", description: "Change or reset your password" },
{ id: "billing", title: "Billing Issue", description: "Questions about charges" }
]
},
{
title: "Orders",
rows: [
{ id: "track", title: "Track Order", description: "Check delivery status" },
{ id: "return", title: "Return Item", description: "Start a return request" }
]
}
]
}
)
message, err := client.Messages.Send(context.TODO(), zavudev.MessageSendParams{
To: zavudev.String("+14155551234"),
Text: zavudev.String("Choose a support topic:"),
Channel: zavudev.String("whatsapp"),
MessageType: zavudev.String("list"),
Content: &zavudev.MessageContentParams{
ListButton: zavudev.String("View Options"),
Sections: []zavudev.SectionParams{
{
Title: zavudev.String("Account"),
Rows: []zavudev.RowParams{
{ID: zavudev.String("password"), Title: zavudev.String("Reset Password"), Description: zavudev.String("Change or reset your password")},
{ID: zavudev.String("billing"), Title: zavudev.String("Billing Issue"), Description: zavudev.String("Questions about charges")},
},
},
{
Title: zavudev.String("Orders"),
Rows: []zavudev.RowParams{
{ID: zavudev.String("track"), Title: zavudev.String("Track Order"), Description: zavudev.String("Check delivery status")},
{ID: zavudev.String("return"), Title: zavudev.String("Return Item"), Description: zavudev.String("Start a return request")},
},
},
},
},
})
$message = $client->messages->send([
'to' => '+14155551234',
'text' => 'Choose a support topic:',
'channel' => 'whatsapp',
'messageType' => 'list',
'content' => [
'listButton' => 'View Options',
'sections' => [
[
'title' => 'Account',
'rows' => [
['id' => 'password', 'title' => 'Reset Password', 'description' => 'Change or reset your password'],
['id' => 'billing', 'title' => 'Billing Issue', 'description' => 'Questions about charges'],
],
],
[
'title' => 'Orders',
'rows' => [
['id' => 'track', 'title' => 'Track Order', 'description' => 'Check delivery status'],
['id' => 'return', 'title' => 'Return Item', 'description' => 'Start a return request'],
],
],
],
],
]);
curl -X POST https://api.zavu.dev/v1/messages \
-H "Authorization: Bearer zv_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"to": "+14155551234",
"text": "Choose a support topic:",
"channel": "whatsapp",
"messageType": "list",
"content": {
"listButton": "View Options",
"sections": [
{
"title": "Account",
"rows": [
{ "id": "password", "title": "Reset Password", "description": "Change or reset your password" },
{ "id": "billing", "title": "Billing Issue", "description": "Questions about charges" }
]
},
{
"title": "Orders",
"rows": [
{ "id": "track", "title": "Track Order", "description": "Check delivery status" },
{ "id": "return", "title": "Return Item", "description": "Start a return request" }
]
}
]
}
}'
Specifications
| Property | Requirement |
|---|---|
| Max sections | 10 |
| Max rows per section | 10 |
| Section title | Max 24 chars |
| Row ID | Max 200 chars, unique per message |
| Row title | Max 24 chars |
| Row description | Optional, max 72 chars |
List button (listButton) | Required, max 20 chars |
Body text (text) | Required |
Handling List Responses
When a user selects an option, you receive a webhook:{
"event": "message.received",
"data": {
"from": "+14155551234",
"type": "list_reply",
"list": {
"id": "track",
"title": "Track Order",
"description": "Check delivery status"
}
}
}
Use Cases
- Support menus
- Product categories
- Service selection
- FAQ navigation
- Multi-step workflows
