> ## 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 Botões

> Envia mensagem com botões interativos

Envia uma mensagem com botões interativos. O usuário pode clicar em um dos botões para responder.

<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="buttons" type="array" required>
  Array de botões (máximo 3).

  <Expandable title="Propriedades do botão">
    <ParamField body="buttonId" type="string" required>
      ID único do botão.
    </ParamField>

    <ParamField body="buttonText" type="string" required>
      Texto exibido no botão.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="footer" type="string">
  Texto de rodapé (opcional).
</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/buttons" \
    -H "X-API-Key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "sessionId": "550e8400-e29b-41d4-a716-446655440000",
      "to": "5511999999999",
      "text": "Como posso ajudá-lo hoje?",
      "buttons": [
        { "buttonId": "btn1", "buttonText": "Suporte" },
        { "buttonId": "btn2", "buttonText": "Vendas" },
        { "buttonId": "btn3", "buttonText": "Outros" }
      ],
      "footer": "Oxenty API"
    }'
  ```

  ```typescript TypeScript theme={"system"}
  const result = await client.messages.sendButtons({
    sessionId: '550e8400-e29b-41d4-a716-446655440000',
    to: '5511999999999',
    text: 'Como posso ajudá-lo hoje?',
    buttons: [
      { buttonId: 'btn1', buttonText: 'Suporte' },
      { buttonId: 'btn2', buttonText: 'Vendas' },
      { buttonId: 'btn3', buttonText: 'Outros' },
    ],
    footer: 'Oxenty API',
  });
  ```
</RequestExample>

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