# Enviar botões interativos

`POST /send/button`

Pasta: **Enviar Mensagem**

## Autenticação

```http
token: {{token}}
```

## Descrição

# Enviar botões interativos

Envia mensagem com botões de resposta rápida, link, chamada, copiar código ou PIX. Ideal para menus curtos (até 3 reply).

## Endpoint

```http
POST {{baseUrl}}/send/button
```

## Autenticação

Envie o token da instância no header:

```http
token: {{token}}
```

## Corpo da requisição

| Campo | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- |
| number | string | Sim* | Destinatário |
| chatid | string | Sim* | Alternativa a number |
| text | string | Sim* | Corpo da mensagem |
| title | string | Não | Alias/complemento do texto |
| description | string | Não | Alias/complemento do texto |
| footer / footerText | string | Não | Rodapé |
| buttons | array | Sim* | Lista de botões interativos |
| choices | string[] | Sim* | Formato curto: `Texto|id` ou `Texto|url:https://...` (alternativa a buttons) |
| type / menuType / kind | string | Não | Ignorado neste endpoint (sempre botões) |
| buttons[].type | string | Não | reply, url, call, copy, pix (padrão: reply) |
| buttons[].displayText / text | string | Sim* | Texto exibido no botão |
| buttons[].id | string | Não | ID da ação (reply) ou fallback |
| buttons[].url | string | Não | URL (type=url) |
| buttons[].phoneNumber | string | Não | Telefone (type=call) |
| buttons[].copyCode | string | Não | Código a copiar (type=copy) |
| buttons[].currency | string | Não | Moeda PIX (padrão BRL) |
| buttons[].name | string | Não | Nome do merchant (PIX) / item |
| buttons[].key | string | Não | Chave PIX |
| buttons[].keyType | string | Não | PHONE, EMAIL, CPF, CNPJ, EVP |
| buttons[].amount / value | int | Não | Valor em centavos (PIX) |
| buttons[].itemName | string | Não | Nome do item no pedido PIX |

## Exemplo de Requisição

```bash
curl -X POST "{{baseUrl}}/send/button" \
  -H "token: {{token}}" \
  -H "Content-Type: application/json" \
  -d '{"number": "{{remoteJid}}", "text": "Como podemos ajudar?", "footer": "GoZAP", "buttons": [{"id": "vendas", "text": "Vendas", "type": "reply"}, {"id": "suporte", "text": "Suporte", "type": "reply"}]}'
```

## Resposta de Sucesso

```json
{
  "success": true,
  "message": {
    "id": "3EB0A1B2C3D4E5F6",
    "timestamp": "2026-07-17T12:34:56Z",
    "sender": "5511888888888@s.whatsapp.net"
  }
}
```

## Erros comuns

- `buttons or choices are required`
- `text, title, or description is required`
- `at most 3 reply buttons are allowed`
- `reply buttons cannot be mixed with other button types`

## Observações

- Há cooldown por contato para mensagens interativas (evita spam).
- PIX: no máximo 1 botão e não misture com outros tipos.

## Corpo (exemplo)

```json
{
  "number": "{{remoteJid}}",
  "text": "Como podemos ajudar?",
  "footer": "GoZAP",
  "buttons": [
    {
      "id": "vendas",
      "text": "Vendas",
      "type": "reply"
    },
    {
      "id": "suporte",
      "text": "Suporte",
      "type": "reply"
    }
  ]
}
```

## cURL

```bash
curl -X POST "{{baseUrl}}/send/button" \
  -H "token: {{token}}" \
  -H "Content-Type: application/json" \
  -d '{
  "number": "{{remoteJid}}",
  "text": "Como podemos ajudar?",
  "footer": "GoZAP",
  "buttons": [
    {
      "id": "vendas",
      "text": "Vendas",
      "type": "reply"
    },
    {
      "id": "suporte",
      "text": "Suporte",
      "type": "reply"
    }
  ]
}'
```

---

[Índice da pasta](./index.md) · [Índice geral](../index.md) · [UI](https://gozap.dev/docs?op=enviar-mensagem/enviar-botoes-interativos)
