# Enviar menu interativo

`POST /send/menu`

Pasta: **Enviar Mensagem**

## Autenticação

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

## Descrição

# Enviar menu interativo

Endpoint unificado que envia botões, lista ou carrossel conforme `type`/`menuType`/`kind`. Se omitir o tipo, a API infere por `sections`, `carousel`/`cards` ou cai em botões.

## Endpoint

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

## 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 |
| type / menuType / kind | string | Não | buttons, list, carousel (poll redireciona para /send/poll) |
| text / title / description | string | Condicional | Corpo da mensagem |
| footer / footerText | string | Não | Rodapé |
| buttonText / listButton | string | Não | Texto do botão da lista |
| buttons | array | Condicional | Botões (type=buttons) |
| choices | string[] | Condicional | Atalho para botões ou lista |
| sections | array | Condicional | Seções da lista |
| carousel / cards | array | Condicional | Cards do carrossel |
| imageButton | string | Não | Texto auxiliar de botão com imagem |
| 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/menu" \
  -H "token: {{token}}" \
  -H "Content-Type: application/json" \
  -d '{"number": "{{remoteJid}}", "type": "buttons", "text": "Selecione uma opção:", "buttons": [{"id": "demo", "text": "Agendar demo", "type": "reply"}, {"id": "site", "text": "Abrir site", "type": "url", "url": "https://gozap.dev"}]}'
```

## Resposta de Sucesso

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

## Erros comuns

- `use POST /send/poll instead of menu type poll`
- Campos obrigatórios do subtipo escolhido ausentes
- Cooldown interativo

## Observações

- Prefira `/send/button`, `/send/list` ou `/send/carousel` quando souber o formato.

## Corpo (exemplo)

```json
{
  "number": "{{remoteJid}}",
  "type": "buttons",
  "text": "Selecione uma opção:",
  "buttons": [
    {
      "id": "demo",
      "text": "Agendar demo",
      "type": "reply"
    },
    {
      "id": "site",
      "text": "Abrir site",
      "type": "url",
      "url": "https://gozap.dev"
    }
  ]
}
```

## cURL

```bash
curl -X POST "{{baseUrl}}/send/menu" \
  -H "token: {{token}}" \
  -H "Content-Type: application/json" \
  -d '{
  "number": "{{remoteJid}}",
  "type": "buttons",
  "text": "Selecione uma opção:",
  "buttons": [
    {
      "id": "demo",
      "text": "Agendar demo",
      "type": "reply"
    },
    {
      "id": "site",
      "text": "Abrir site",
      "type": "url",
      "url": "https://gozap.dev"
    }
  ]
}'
```

---

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