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

# Enviar Lista

> Envia mensagem com lista de opções

Envia uma mensagem com uma lista de opções organizadas em seções. O usuário pode selecionar uma opção da lista.

<Warning>
  Este recurso pode não funcionar em todas as versões do WhatsApp devido a restrições da plataforma.
</Warning>

## Request Body

<ParamField body="sessionId" type="string" required>
  ID da sessão WhatsApp.
</ParamField>

<ParamField body="to" type="string" required>
  Número do destinatário ou JID de grupo.
</ParamField>

<ParamField body="text" type="string" required>
  Texto principal da mensagem.
</ParamField>

<ParamField body="buttonText" type="string" required>
  Texto do botão que abre a lista.
</ParamField>

<ParamField body="title" type="string">
  Título da lista (opcional).
</ParamField>

<ParamField body="footer" type="string">
  Texto de rodapé (opcional).
</ParamField>

<ParamField body="sections" type="array" required>
  Array de seções da lista.

  <Expandable title="Propriedades da seção">
    <ParamField body="title" type="string" required>
      Título da seção.
    </ParamField>

    <ParamField body="rows" type="array" required>
      Itens da seção.

      <Expandable title="Propriedades do item">
        <ParamField body="rowId" type="string" required>
          ID único do item.
        </ParamField>

        <ParamField body="title" type="string" required>
          Título do item.
        </ParamField>

        <ParamField body="description" type="string">
          Descrição do item.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

## Resposta

<ResponseField name="messageId" type="string">
  ID único da mensagem enviada.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X POST "https://api.oxenty.api.br/api/messages/list" \
    -H "X-API-Key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "sessionId": "550e8400-e29b-41d4-a716-446655440000",
      "to": "5511999999999",
      "text": "Escolha uma opção:",
      "buttonText": "Ver opções",
      "title": "Menu Principal",
      "sections": [
        {
          "title": "Serviços",
          "rows": [
            { "rowId": "srv1", "title": "Suporte Técnico", "description": "Ajuda com problemas" },
            { "rowId": "srv2", "title": "Vendas", "description": "Falar com vendedor" }
          ]
        },
        {
          "title": "Informações",
          "rows": [
            { "rowId": "info1", "title": "Horários", "description": "Ver horário de funcionamento" },
            { "rowId": "info2", "title": "Localização", "description": "Como chegar" }
          ]
        }
      ]
    }'
  ```

  ```typescript TypeScript theme={"system"}
  const result = await client.messages.sendList({
    sessionId: '550e8400-e29b-41d4-a716-446655440000',
    to: '5511999999999',
    text: 'Escolha uma opção:',
    buttonText: 'Ver opções',
    title: 'Menu Principal',
    sections: [
      {
        title: 'Serviços',
        rows: [
          { rowId: 'srv1', title: 'Suporte Técnico', description: 'Ajuda com problemas' },
          { rowId: 'srv2', title: 'Vendas', description: 'Falar com vendedor' },
        ],
      },
    ],
  });
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={"system"}
  {
    "messageId": "3EB0A1B2C3D4E5F6",
    "status": "sent"
  }
  ```
</ResponseExample>
