> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zavu.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List Messages

> Send interactive lists via WhatsApp

List messages present a menu with sections and options, perfect for support menus or product selection.

## Send a List Message

<CodeGroup>
  ```typescript TypeScript theme={null}
  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" }
          ]
        }
      ]
    }
  });
  ```

  ```python Python theme={null}
  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"}
                  ]
              }
          ]
      }
  )
  ```

  ```ruby Ruby theme={null}
  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" }
          ]
        }
      ]
    }
  )
  ```

  ```go Go theme={null}
  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")},
                  },
              },
          },
      },
  })
  ```

  ```php PHP theme={null}
  $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'],
                  ],
              ],
          ],
      ],
  ]);
  ```

  ```bash cURL theme={null}
  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" }
            ]
          }
        ]
      }
    }'
  ```
</CodeGroup>

## 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:

```json theme={null}
{
  "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
