---
title: "API Oficial (Cloud)"
description: "API Oficial do WhatsApp pela Meta Cloud API. O número passa a ser exclusivo da API — o app WhatsApp Business deixa de funcionar nele. Suporte completo a templates, mídia, mensagens interativas, Flows e chamadas."
lang: en
canonical: https://doc.apibrasil.io/apis/planos/fb4b4230-a5d0-11f1-a5b5-878489497951
markdown: https://doc.apibrasil.io/apis/planos/fb4b4230-a5d0-11f1-a5b5-878489497951.md
source: apibrasil-documentation
---

# API Oficial (Cloud)

> API Oficial do WhatsApp pela Meta Cloud API. O número passa a ser exclusivo da API — o app WhatsApp Business deixa de funcionar nele. Suporte completo a templates, mídia, mensagens interativas, Flows e chamadas.

- **Category:** Messaging
- **Billing:** by plan, with Bearer Token and DeviceToken
- **Price:** R$399.90 per month
- **Limit:** 10 per month
- **Registration:** CPF or CNPJ
- **Version:** v2
- **Published by:** APIBrasil
- **OpenAPI specification:** https://doc.apibrasil.io/apis/planos/fb4b4230-a5d0-11f1-a5b5-878489497951/openapi.json

## How to call

**Base address:** `https://gateway.apibrasil.io/api/v2`

Authentication: the `Authorization: Bearer <token>` header AND a `DeviceToken: <device token>` header. This API is billed per plan, and without the second header it refuses.

## Endpoints (95 endpoints)

**Contents**

*Conexão*

1. `POST /waba/start` — Iniciar conexão
2. `POST /waba/qrcode` — QR Code de conexão
3. `POST /waba/connect-url` — URL de conexão (sem imagem)
4. `POST /waba/connect-manual` — Conexão manual (token próprio)
5. `GET /waba/connect-requirements` — Pré-requisitos da conexão
6. `GET /waba/connect-config` — Configuração do Embedded Signup
7. `POST /waba/connect-exchange` — Trocar código do Embedded Signup
8. `POST /waba/status` — Status da conexão
9. `GET /waba/capabilities` — Capacidades da conexão
10. `POST /waba/restart` — Reiniciar sessão
11. `POST /waba/logout` — Desconectar
12. `POST /waba/close` — Desconectar (alias)
13. `POST /waba/deleteSession` — Encerrar sessão (alias)

*Envio*

14. `POST /waba/send-text` — Enviar texto
15. `POST /waba/send-template` — Enviar template
16. `POST /waba/send-media` — Enviar mídia (upload)
17. `POST /waba/send-media-link` — Enviar mídia por link
18. `POST /waba/send-audio` — Enviar áudio
19. `POST /waba/send-location` — Enviar localização
20. `POST /waba/send-contacts` — Enviar contatos
21. `POST /waba/send-interactive` — Enviar mensagem interativa
22. `POST /waba/send-buttons` — Enviar botões de resposta
23. `POST /waba/send-list` — Enviar lista de opções
24. `POST /waba/send-cta` — Enviar botão de link (CTA)
25. `POST /waba/send-flow` — Enviar WhatsApp Flow
26. `POST /waba/send-reaction` — Enviar reação
27. `POST /waba/send-product` — Enviar produto
28. `POST /waba/send-catalog` — Enviar catálogo
29. `POST /waba/send-product-list` — Enviar lista de produtos
30. `POST /waba/send-order-details` — Enviar detalhes do pedido
31. `POST /waba/send-order-status` — Enviar status do pedido

*Envio (aliases)*

32. `POST /waba/sendText` — Enviar texto (alias)
33. `POST /waba/sendFile` — Enviar arquivo (alias)
34. `POST /waba/sendLink` — Enviar mídia por link (alias)
35. `POST /waba/sendButtons` — Enviar botões (alias)
36. `POST /waba/sendLocation` — Enviar localização (alias)

*Mensagem*

37. `POST /waba/mark-read` — Marcar como lida
38. `POST /waba/typing` — Indicador de digitando

*Mídia*

39. `POST /waba/media/upload` — Enviar mídia para a Meta
40. `GET /waba/media/info` — Metadados da mídia
41. `GET /waba/media/download` — Baixar mídia
42. `DELETE /waba/media/delete` — Excluir mídia

*Templates*

43. `GET /waba/templates/list` — Listar templates
44. `POST /waba/templates/create` — Criar template
45. `POST /waba/templates/update` — Atualizar template
46. `DELETE /waba/templates/delete` — Excluir template

*Número e perfil*

47. `GET /waba/phone/info` — Dados do número
48. `POST /waba/phone/request-code` — Solicitar código de verificação
49. `POST /waba/phone/verify-code` — Verificar código
50. `POST /waba/phone/two-step-pin` — Definir PIN de duas etapas
51. `POST /waba/phone/deregister` — Cancelar registro do número
52. `GET /waba/phone/display-name-status` — Status do nome de exibição
53. `GET /waba/profile/get` — Obter perfil comercial
54. `POST /waba/profile/update` — Atualizar perfil comercial

*Bloqueio*

55. `POST /waba/block` — Bloquear números
56. `POST /waba/unblock` — Desbloquear números
57. `GET /waba/blocked/list` — Listar bloqueados

*QR Code comercial*

58. `GET /waba/qr/list` — Listar QR Codes comerciais
59. `POST /waba/qr/create` — Criar QR Code comercial
60. `POST /waba/qr/update` — Atualizar QR Code comercial
61. `DELETE /waba/qr/delete` — Excluir QR Code comercial

*Conta*

62. `GET /waba/account/info` — Dados da conta WhatsApp Business
63. `POST /waba/account/subscribe` — Assinar webhooks na conta
64. `POST /waba/account/unsubscribe` — Cancelar assinatura de webhooks
65. `GET /waba/account/subscriptions` — Conferir assinaturas

*Analytics*

66. `GET /waba/analytics/messages` — Métricas de mensagens
67. `GET /waba/analytics/conversations` — Métricas de conversas

*Preços*

68. `GET /waba/pricing/plan` — Preços da API
69. `POST /waba/pricing/estimate` — Estimar custo do disparo

*Histórico*

70. `GET /waba/messages/list` — Listar mensagens
71. `GET /waba/messages/show` — Detalhe da mensagem
72. `POST /waba/messages/export` — Exportar mensagens
73. `GET /waba/usage/summary` — Resumo de consumo

*Fila*

74. `GET /waba/queue/status` — Status da fila
75. `POST /waba/queue/cancel` — Cancelar mensagem na fila
76. `GET /waba/queue/list` — Listar jobs (compatibilidade)
77. `POST /waba/queue/show` — Consultar jobs (compatibilidade)

*Webhooks*

78. `GET /waba/webhooks/get` — Obter webhooks configurados
79. `POST /waba/webhooks/set` — Configurar webhooks
80. `POST /waba/webhooks/test` — Testar webhook
81. `GET /waba/webhooks/deliveries` — Histórico de entregas

*Flows*

82. `GET /waba/flows/list` — Listar Flows
83. `POST /waba/flows/create` — Criar Flow
84. `POST /waba/flows/update-json` — Atualizar JSON do Flow
85. `POST /waba/flows/publish` — Publicar Flow
86. `POST /waba/flows/register-encryption` — Registrar chave de criptografia

*Chamadas*

87. `POST /waba/call/connect` — Iniciar chamada
88. `POST /waba/call/pre-accept` — Pré-aceitar chamada
89. `POST /waba/call/accept` — Aceitar chamada
90. `POST /waba/call/reject` — Rejeitar chamada
91. `POST /waba/call/terminate` — Encerrar chamada
92. `POST /waba/call/permission-request` — Pedir permissão de chamada
93. `GET /waba/call/settings` — Obter configurações de chamada
94. `POST /waba/call/settings/update` — Atualizar configurações de chamada
95. `GET /waba/call/analytics` — Métricas de chamadas

### 1. POST /waba/start — Iniciar conexão

Abre a sessão de conexão e devolve tudo que os três caminhos precisam: url hospedada, QR, session_token e os parâmetros do Embedded Signup. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/start`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "external_id": "cliente-4471",
  "label": "Pizzaria do João",
  "redirect_url": "https://meusite.com/onboard/ok",
  "expires_in": 3600,
  "branding": {
    "logo": "https://meusite.com/logo.png",
    "color": "#FF6600",
    "name": "Agência X"
  },
  "locale": "pt_BR"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/start" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"external_id":"cliente-4471","label":"Pizzaria do João","redirect_url":"https://meusite.com/onboard/ok","expires_in":3600,"branding":{"logo":"https://meusite.com/logo.png","color":"#FF6600","name":"Agência X"},"locale":"pt_BR"}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Sessão de conexão criada com sucesso",
  "response": {
    "session_token": "s_9f1c8e2a",
    "status": "awaiting_authorization",
    "url": "https://connect.apibrasil.io/c/s_9f1c8e2a",
    "qrcode": "data:image/png;base64,...",
    "expires_at": "2026-08-04T19:30:00Z",
    "embedded": {
      "app_id": "...",
      "config_id": "...",
      "state": "...",
      "graph_version": "v23.0"
    }
  }
}
```

### 2. POST /waba/qrcode — QR Code de conexão

PNG em base64 do QR que leva à autorização na Meta. Mesmo envelope do wppconnect. Não é o QR do WhatsApp Web: ele codifica a URL de autorização. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/qrcode`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/qrcode" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "QRCode gerado com sucesso",
  "device": {
    "status": "DISCONNECTED",
    "device_token": "{DEVICE_TOKEN}",
    "device_name": "MinhaEmpresa01"
  },
  "response": {
    "qrcode": "data:image/png;base64,...",
    "url": "https://connect.apibrasil.io/c/s_9f1c8e2a",
    "expires_at": "2026-08-04T19:30:00Z"
  }
}
```

### 3. POST /waba/connect-url — URL de conexão (sem imagem)

Devolve apenas o link de autorização, para integração server-to-server ou envio por e-mail/SMS. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/connect-url`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "external_id": "cliente-4471",
  "redirect_url": "https://meusite.com/onboard/ok"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/connect-url" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"external_id":"cliente-4471","redirect_url":"https://meusite.com/onboard/ok"}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "url": "https://connect.apibrasil.io/c/s_9f1c8e2a",
    "expires_at": "2026-08-04T19:30:00Z"
  }
}
```

### 4. POST /waba/connect-manual — Conexão manual (token próprio)

Único caminho 100% API, sem browser. O cliente informa waba_id, phone_number_id e um token de System User gerado no Meta Business Suite. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/connect-manual`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "waba_id": "123456789",
  "phone_number_id": "987654321",
  "access_token": "EAAG..."
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/connect-manual" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"waba_id":"123456789","phone_number_id":"987654321","access_token":"EAAG..."}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Conexão provisionada com sucesso",
  "response": {
    "status": "connected",
    "display_phone_number": "+55 11 99999-9999"
  }
}
```

### 5. GET /waba/connect-requirements — Pré-requisitos da conexão

Checklist do que o dono do número precisa ter antes de autorizar. Em CoEx inclui o app WhatsApp Business instalado com aquele número. Não consome saldo.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/connect-requirements`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/connect-requirements" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "requirements": [
      {
        "key": "facebook_account",
        "label": "Conta no Facebook",
        "required": true
      }
    ]
  }
}
```

### 6. GET /waba/connect-config — Configuração do Embedded Signup

Parâmetros para embutir o Embedded Signup no site do próprio cliente (caminho avançado). O padrão recomendado é a página hospedada. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/connect-config`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/connect-config" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "app_id": "...",
    "config_id": "...",
    "graph_version": "v23.0",
    "state": "..."
  }
}
```

### 7. POST /waba/connect-exchange — Trocar código do Embedded Signup

Recebe o code devolvido pelo Embedded Signup rodando no site do cliente e provisiona a conexão. A troca acontece no servidor, nunca no browser. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/connect-exchange`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "code": "AQD...",
  "state": "..."
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/connect-exchange" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"code":"AQD...","state":"..."}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "status": "connected"
  }
}
```

### 8. POST /waba/status — Status da conexão

Estado da conexão e saúde do número: qualidade, tier de mensagens, validade do token e progresso do onboarding. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/status`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/status" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "status": "connected",
    "quality_rating": "GREEN",
    "messaging_limit_tier": "TIER_1K",
    "external_id": "cliente-4471"
  }
}
```

### 9. GET /waba/capabilities — Capacidades da conexão

Lista o que esta conexão suporta e o que está bloqueado, com o motivo. Evita descobrir a limitação errando. Não consome saldo.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/capabilities`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/capabilities" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "mode": "coex",
    "allowed": [
      "send-text",
      "send-template"
    ],
    "blocked": [
      {
        "action": "send-flow",
        "reason": "Flows não disponíveis em Coexistence"
      }
    ]
  }
}
```

### 10. POST /waba/restart — Reiniciar sessão

Renova a sessão de conexão e o token, sem perder o device. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/restart`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/restart" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Sessão reiniciada"
}
```

### 11. POST /waba/logout — Desconectar

Encerra a conexão e remove a assinatura do app na WABA do cliente. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/logout`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/logout" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Desconectado com sucesso"
}
```

### 12. POST /waba/close — Desconectar (alias)

Alias de logout, para compatibilidade com quem já integra o wppconnect. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/close`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/close" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Desconectado com sucesso"
}
```

### 13. POST /waba/deleteSession — Encerrar sessão (alias)

Alias de logout, para compatibilidade com quem já integra o wppconnect. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/deleteSession`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/deleteSession" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Desconectado com sucesso"
}
```

### 14. POST /waba/send-text — Enviar texto

Mensagem de texto simples. Aceita resposta a uma mensagem anterior e preview de link. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-text`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "body": "Olá! Seu pedido foi confirmado.",
  "reply_to": null,
  "preview_url": false
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-text" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","body":"Olá! Seu pedido foi confirmado.","reply_to":null,"preview_url":false}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 15. POST /waba/send-template — Enviar template

Template aprovado pela Meta. Único caminho para iniciar conversa fora da janela de 24h. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-template`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "template": "boas_vindas",
  "language": "pt_BR",
  "components": [
    {
      "type": "body",
      "parameters": [
        {
          "type": "text",
          "text": "João"
        }
      ]
    }
  ]
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-template" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","template":"boas_vindas","language":"pt_BR","components":[{"type":"body","parameters":[{"type":"text","text":"João"}]}]}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 16. POST /waba/send-media — Enviar mídia (upload)

Imagem, vídeo, áudio ou documento enviado por base64 ou multipart. A mídia sobe para a Meta antes do envio. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-media`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "type": "image",
  "base64": "data:image/png;base64,...",
  "caption": "Segue a nota fiscal",
  "filename": "nota.pdf"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-media" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","type":"image","base64":"data:image/png;base64,...","caption":"Segue a nota fiscal","filename":"nota.pdf"}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 17. POST /waba/send-media-link — Enviar mídia por link

Mídia a partir de uma URL pública. A Meta baixa o arquivo — mais rápido que o upload. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-media-link`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "type": "image",
  "link": "https://meusite.com/foto.jpg",
  "caption": "Chegou!"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-media-link" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","type":"image","link":"https://meusite.com/foto.jpg","caption":"Chegou!"}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 18. POST /waba/send-audio — Enviar áudio

Áudio ou mensagem de voz. Aceita base64 ou link. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-audio`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "link": "https://meusite.com/audio.ogg"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-audio" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","link":"https://meusite.com/audio.ogg"}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 19. POST /waba/send-location — Enviar localização

Ponto no mapa com nome e endereço opcionais. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-location`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "latitude": -23.5505,
  "longitude": -46.6333,
  "name": "Loja Centro",
  "address": "Av. Paulista, 1000"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-location" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","latitude":-23.5505,"longitude":-46.6333,"name":"Loja Centro","address":"Av. Paulista, 1000"}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 20. POST /waba/send-contacts — Enviar contatos

Um ou mais cartões de contato. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-contacts`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "contacts": [
    {
      "name": {
        "formatted_name": "Suporte"
      },
      "phones": [
        {
          "phone": "5511888888888"
        }
      ]
    }
  ]
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-contacts" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","contacts":[{"name":{"formatted_name":"Suporte"},"phones":[{"phone":"5511888888888"}]}]}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 21. POST /waba/send-interactive — Enviar mensagem interativa

Objeto interactive cru da Cloud API, para quem quer controle total do payload. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-interactive`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "interactive": {
    "type": "button",
    "body": {
      "text": "Confirma?"
    },
    "action": {
      "buttons": []
    }
  }
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-interactive" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","interactive":{"type":"button","body":{"text":"Confirma?"},"action":{"buttons":[]}}}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 22. POST /waba/send-buttons — Enviar botões de resposta

Até 3 botões de resposta rápida. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-buttons`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "body": "Deseja confirmar o pedido?",
  "buttons": [
    {
      "id": "sim",
      "title": "Sim"
    },
    {
      "id": "nao",
      "title": "Não"
    }
  ]
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-buttons" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","body":"Deseja confirmar o pedido?","buttons":[{"id":"sim","title":"Sim"},{"id":"nao","title":"Não"}]}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 23. POST /waba/send-list — Enviar lista de opções

Menu em lista com seções e itens. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-list`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "body": "Escolha um produto",
  "button": "Ver opções",
  "sections": [
    {
      "title": "Pizzas",
      "rows": [
        {
          "id": "p1",
          "title": "Calabresa"
        }
      ]
    }
  ]
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-list" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","body":"Escolha um produto","button":"Ver opções","sections":[{"title":"Pizzas","rows":[{"id":"p1","title":"Calabresa"}]}]}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 24. POST /waba/send-cta — Enviar botão de link (CTA)

Mensagem com botão que abre uma URL. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-cta`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "body": "Acompanhe seu pedido",
  "display_text": "Rastrear",
  "url": "https://meusite.com/pedido/123"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-cta" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","body":"Acompanhe seu pedido","display_text":"Rastrear","url":"https://meusite.com/pedido/123"}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 25. POST /waba/send-flow — Enviar WhatsApp Flow

Formulário nativo do WhatsApp. Indisponível em Coexistence. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ. Disponível a partir da fase 2.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-flow`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "flow_id": "123",
  "flow_token": "abc",
  "cta": "Preencher",
  "screen": "WELCOME"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-flow" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","flow_id":"123","flow_token":"abc","cta":"Preencher","screen":"WELCOME"}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 26. POST /waba/send-reaction — Enviar reação

Reage a uma mensagem com emoji. Emoji vazio remove a reação. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-reaction`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "message_id": "wamid.HBgN...",
  "emoji": "👍"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-reaction" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","message_id":"wamid.HBgN...","emoji":"👍"}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 27. POST /waba/send-product — Enviar produto

Um produto do catálogo vinculado à conta. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-product`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "catalog_id": "123",
  "product_retailer_id": "SKU-001"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-product" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","catalog_id":"123","product_retailer_id":"SKU-001"}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 28. POST /waba/send-catalog — Enviar catálogo

Mensagem com o catálogo completo. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-catalog`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "body": "Veja nosso catálogo",
  "thumbnail_product": "SKU-001"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-catalog" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","body":"Veja nosso catálogo","thumbnail_product":"SKU-001"}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 29. POST /waba/send-product-list — Enviar lista de produtos

Vários produtos agrupados em seções. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-product-list`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "catalog_id": "123",
  "sections": [
    {
      "title": "Ofertas",
      "product_items": [
        {
          "product_retailer_id": "SKU-001"
        }
      ]
    }
  ]
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-product-list" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","catalog_id":"123","sections":[{"title":"Ofertas","product_items":[{"product_retailer_id":"SKU-001"}]}]}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 30. POST /waba/send-order-details — Enviar detalhes do pedido

Resumo do pedido com valores, para pagamento dentro do WhatsApp. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-order-details`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "order": {
    "reference_id": "PED-123",
    "total_amount": {
      "value": 5990,
      "offset": 100
    }
  }
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-order-details" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","order":{"reference_id":"PED-123","total_amount":{"value":5990,"offset":100}}}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 31. POST /waba/send-order-status — Enviar status do pedido

Atualiza o status de um pedido já enviado. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/send-order-status`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "reference_id": "PED-123",
  "status": "shipped"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/send-order-status" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","reference_id":"PED-123","status":"shipped"}'
```

**Sample response, from the catalog**

```json
{
  "sincrono": {
    "error": false,
    "message": "Mensagem enviada com sucesso",
    "response": {
      "id": "wamid.HBgN...",
      "status": "sent"
    }
  },
  "fila": {
    "error": false,
    "message": "Mensagem enfileirada com sucesso",
    "response": {
      "id": "9f1c8e2a-...",
      "status": "queued",
      "position": 42
    }
  }
}
```

### 32. POST /waba/sendText — Enviar texto (alias)

Alias de send-text. Mantido para quem migra do wppconnect sem reescrever a integração. Mesmo preço e mesmo comportamento. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/sendText`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/sendText" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "id": "wamid.HBgN..."
  }
}
```

### 33. POST /waba/sendFile — Enviar arquivo (alias)

Alias de send-media. Mantido para quem migra do wppconnect sem reescrever a integração. Mesmo preço e mesmo comportamento. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/sendFile`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/sendFile" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "id": "wamid.HBgN..."
  }
}
```

### 34. POST /waba/sendLink — Enviar mídia por link (alias)

Alias de send-media-link. Mantido para quem migra do wppconnect sem reescrever a integração. Mesmo preço e mesmo comportamento. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/sendLink`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/sendLink" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "id": "wamid.HBgN..."
  }
}
```

### 35. POST /waba/sendButtons — Enviar botões (alias)

Alias de send-buttons. Mantido para quem migra do wppconnect sem reescrever a integração. Mesmo preço e mesmo comportamento. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/sendButtons`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/sendButtons" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "id": "wamid.HBgN..."
  }
}
```

### 36. POST /waba/sendLocation — Enviar localização (alias)

Alias de send-location. Mantido para quem migra do wppconnect sem reescrever a integração. Mesmo preço e mesmo comportamento. Cobra R$ 0,007 por chamada bem-sucedida — falha não é cobrada. Aceita o sufixo /queue para envio assíncrono via RabbitMQ.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/sendLocation`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/sendLocation" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "id": "wamid.HBgN..."
  }
}
```

### 37. POST /waba/mark-read — Marcar como lida

Marca uma mensagem recebida como lida (duplo check azul). Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/mark-read`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "message_id": "wamid.HBgN..."
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/mark-read" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"message_id":"wamid.HBgN..."}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Mensagem marcada como lida"
}
```

### 38. POST /waba/typing — Indicador de digitando

Exibe "digitando..." para o destinatário enquanto a resposta é preparada. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/typing`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "message_id": "wamid.HBgN..."
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/typing" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"message_id":"wamid.HBgN..."}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Indicador enviado"
}
```

### 39. POST /waba/media/upload — Enviar mídia para a Meta

Faz upload do arquivo e devolve o media_id reutilizável, evitando subir a mesma mídia várias vezes. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/media/upload`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "type": "image",
  "base64": "data:image/png;base64,...",
  "filename": "foto.png"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/media/upload" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"type":"image","base64":"data:image/png;base64,...","filename":"foto.png"}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "media_id": "123456789"
  }
}
```

### 40. GET /waba/media/info — Metadados da mídia

URL temporária, mime type e tamanho de uma mídia recebida. Não consome saldo.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/media/info`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/media/info" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "url": "https://lookaside.fbsbx.com/...",
    "mime_type": "image/jpeg",
    "file_size": 102400
  }
}
```

### 41. GET /waba/media/download — Baixar mídia

Baixa o conteúdo de uma mídia recebida, já autenticado na Meta. Não consome saldo.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/media/download`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/media/download" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "base64": "data:image/jpeg;base64,..."
  }
}
```

### 42. DELETE /waba/media/delete — Excluir mídia

Remove uma mídia dos servidores da Meta. Não consome saldo.

- **Method:** `DELETE`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/media/delete`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "media_id": "123456789"
}
```

**In cURL**

```bash
curl -X DELETE "https://gateway.apibrasil.io/api/v2/waba/media/delete" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"media_id":"123456789"}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Mídia removida"
}
```

### 43. GET /waba/templates/list — Listar templates

Templates da conta com status de aprovação, categoria e idiomas. Não consome saldo.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/templates/list`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/templates/list" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "data": [
      {
        "name": "boas_vindas",
        "status": "APPROVED",
        "category": "MARKETING"
      }
    ]
  }
}
```

### 44. POST /waba/templates/create — Criar template

Envia um template para aprovação da Meta. O resultado chega pelo webhook message_template_status_update. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/templates/create`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "name": "boas_vindas",
  "language": "pt_BR",
  "category": "MARKETING",
  "components": []
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/templates/create" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"boas_vindas","language":"pt_BR","category":"MARKETING","components":[]}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "id": "123",
    "status": "PENDING"
  }
}
```

### 45. POST /waba/templates/update — Atualizar template

Edita um template existente. Volta para aprovação. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/templates/update`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "template_id": "123",
  "components": []
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/templates/update" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"template_id":"123","components":[]}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Template atualizado"
}
```

### 46. DELETE /waba/templates/delete — Excluir template

Remove um template da conta. Não consome saldo.

- **Method:** `DELETE`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/templates/delete`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "name": "boas_vindas",
  "language": "pt_BR"
}
```

**In cURL**

```bash
curl -X DELETE "https://gateway.apibrasil.io/api/v2/waba/templates/delete" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"boas_vindas","language":"pt_BR"}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Template removido"
}
```

### 47. GET /waba/phone/info — Dados do número

Nome verificado, qualidade, tier de mensagens e platform_type (CLOUD_API ou COEXISTENCE). Não consome saldo.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/phone/info`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/phone/info" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "display_phone_number": "+55 11 99999-9999",
    "quality_rating": "GREEN",
    "platform_type": "CLOUD_API"
  }
}
```

### 48. POST /waba/phone/request-code — Solicitar código de verificação

Pede o código de verificação por SMS ou ligação. Não se aplica a Coexistence, onde o número já está registrado no app. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/phone/request-code`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "method": "SMS",
  "locale": "pt_BR"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/phone/request-code" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"method":"SMS","locale":"pt_BR"}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Código solicitado"
}
```

### 49. POST /waba/phone/verify-code — Verificar código

Confirma o código recebido e conclui o registro do número. Não se aplica a Coexistence. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/phone/verify-code`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "code": "123456"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/phone/verify-code" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"code":"123456"}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Número verificado"
}
```

### 50. POST /waba/phone/two-step-pin — Definir PIN de duas etapas

Define o PIN de verificação em duas etapas exigido pela Cloud API. Não se aplica a Coexistence. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/phone/two-step-pin`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "pin": "123456"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/phone/two-step-pin" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"pin":"123456"}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "PIN definido"
}
```

### 51. POST /waba/phone/deregister — Cancelar registro do número

Remove o registro do número na Cloud API. Não se aplica a Coexistence. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/phone/deregister`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/phone/deregister" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Registro cancelado"
}
```

### 52. GET /waba/phone/display-name-status — Status do nome de exibição

Situação da aprovação do nome comercial que aparece para o destinatário. Não consome saldo.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/phone/display-name-status`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/phone/display-name-status" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "name_status": "APPROVED"
  }
}
```

### 53. GET /waba/profile/get — Obter perfil comercial

Descrição, endereço, e-mail, site e foto do perfil comercial. Não consome saldo.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/profile/get`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/profile/get" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "about": "Atendimento 24h",
    "email": "[omitido]"
  }
}
```

### 54. POST /waba/profile/update — Atualizar perfil comercial

Atualiza os dados do perfil comercial exibidos no WhatsApp. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/profile/update`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "about": "Atendimento 24h",
  "email": "contato@meusite.com",
  "websites": [
    "https://meusite.com"
  ]
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/profile/update" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"about":"Atendimento 24h","email":"contato@meusite.com","websites":["https://meusite.com"]}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Perfil atualizado"
}
```

### 55. POST /waba/block — Bloquear números

Impede que os números informados enviem mensagens para a conta. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/block`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "numbers": [
    "5511999999999"
  ]
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/block" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"numbers":["5511999999999"]}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Números bloqueados"
}
```

### 56. POST /waba/unblock — Desbloquear números

Remove o bloqueio dos números informados. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/unblock`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "numbers": [
    "5511999999999"
  ]
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/unblock" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"numbers":["5511999999999"]}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Números desbloqueados"
}
```

### 57. GET /waba/blocked/list — Listar bloqueados

Números atualmente bloqueados na conta. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/blocked/list`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/blocked/list" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "data": []
  }
}
```

### 58. GET /waba/qr/list — Listar QR Codes comerciais

QR Codes e links curtos que iniciam conversa com a empresa. Diferente do QR de conexão. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/qr/list`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/qr/list" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "data": []
  }
}
```

### 59. POST /waba/qr/create — Criar QR Code comercial

Cria um QR Code com mensagem pré-preenchida. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/qr/create`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "prefilled_message": "Quero saber mais",
  "generate_type": "PNG"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/qr/create" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prefilled_message":"Quero saber mais","generate_type":"PNG"}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "code": "ABC123",
    "qr_image_url": "https://..."
  }
}
```

### 60. POST /waba/qr/update — Atualizar QR Code comercial

Altera a mensagem pré-preenchida de um QR Code existente. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/qr/update`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "code": "ABC123",
  "prefilled_message": "Nova mensagem"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/qr/update" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"code":"ABC123","prefilled_message":"Nova mensagem"}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "QR Code atualizado"
}
```

### 61. DELETE /waba/qr/delete — Excluir QR Code comercial

Remove um QR Code comercial. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `DELETE`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/qr/delete`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "code": "ABC123"
}
```

**In cURL**

```bash
curl -X DELETE "https://gateway.apibrasil.io/api/v2/waba/qr/delete" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"code":"ABC123"}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "QR Code removido"
}
```

### 62. GET /waba/account/info — Dados da conta WhatsApp Business

Informações da WABA: nome, moeda, fuso, status de verificação do negócio. Não consome saldo.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/account/info`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/account/info" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "id": "123",
    "name": "Minha Empresa",
    "currency": "BRL"
  }
}
```

### 63. POST /waba/account/subscribe — Assinar webhooks na conta

Assina o app da APIBrasil aos campos de webhook da WABA. Sem isso a Meta não envia eventos. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/account/subscribe`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "fields": [
    "messages",
    "message_template_status_update"
  ]
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/account/subscribe" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"fields":["messages","message_template_status_update"]}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Assinatura realizada"
}
```

### 64. POST /waba/account/unsubscribe — Cancelar assinatura de webhooks

Remove a assinatura do app na WABA. A conexão para de receber eventos. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/account/unsubscribe`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/account/unsubscribe" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Assinatura cancelada"
}
```

### 65. GET /waba/account/subscriptions — Conferir assinaturas

Mostra quais campos estão realmente assinados na Meta. É a primeira coisa a checar quando um webhook não chega. Não consome saldo.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/account/subscriptions`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/account/subscriptions" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "fields": [
      "messages",
      "statuses"
    ]
  }
}
```

### 66. GET /waba/analytics/messages — Métricas de mensagens

Enviadas e entregues por período, direto da Meta. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/analytics/messages`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/analytics/messages" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "data_points": []
  }
}
```

### 67. GET /waba/analytics/conversations — Métricas de conversas

Conversas e custo por categoria (marketing, utility, authentication, service). Não consome saldo. Disponível a partir da fase 2.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/analytics/conversations`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/analytics/conversations" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "conversation_analytics": []
  }
}
```

### 68. GET /waba/pricing/plan — Preços da API

Valor da conexão e da mensagem. O `setup_price` varia por modo (Cloud R$ 399,90 · Coexistence R$ 129,90) e vem sempre da API que você chamou. Fonte única de preço: nada de valor fixo no código do cliente ou do painel. Não consome saldo.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/pricing/plan`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/pricing/plan" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "setup_price": 399.9,
    "message_price": 0.007,
    "currency": "BRL"
  }
}
```

### 69. POST /waba/pricing/estimate — Estimar custo do disparo

Custo estimado na Meta por categoria e país, antes de disparar a campanha. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/pricing/estimate`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "category": "MARKETING",
  "country_code": "BR",
  "quantity": 1000
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/pricing/estimate" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"category":"MARKETING","country_code":"BR","quantity":1000}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "meta_cost": 300,
    "apibrasil_cost": 3,
    "currency": "BRL"
  }
}
```

### 70. GET /waba/messages/list — Listar mensagens

Histórico paginado por cursor. O filtro de período é obrigatório (padrão 7 dias, teto 90). Não consome saldo. Disponível a partir da fase 2.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/messages/list`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/messages/list" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "data": [],
    "next_cursor": "eyJ..."
  }
}
```

### 71. GET /waba/messages/show — Detalhe da mensagem

Uma mensagem por wamid ou uuid, com a linha do tempo completa de status. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/messages/show`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/messages/show" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "uuid": "9f1c8e2a",
    "status": "delivered",
    "events": []
  }
}
```

### 72. POST /waba/messages/export — Exportar mensagens

Export assíncrono em CSV ou NDJSON. Devolve um link temporário quando pronto. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/messages/export`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "from": "2026-08-01",
  "to": "2026-08-31",
  "format": "csv"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/messages/export" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"from":"2026-08-01","to":"2026-08-31","format":"csv"}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "export_id": "exp_123",
    "status": "processing"
  }
}
```

### 73. GET /waba/usage/summary — Resumo de consumo

Agregado por dia ou mês: enviadas, entregues, falhas, valor cobrado e custo estimado na Meta. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/usage/summary`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/usage/summary" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "sent": 1000,
    "delivered": 980,
    "failed": 20,
    "charged_value": 3
  }
}
```

### 74. GET /waba/queue/status — Status da fila

Profundidade, mensagens em voo, taxa de envio e tempo estimado para escoar. Não consome saldo.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/queue/status`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/queue/status" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "queued": 42,
    "in_flight": 5,
    "rate_per_second": 78,
    "eta_seconds": 120
  }
}
```

### 75. POST /waba/queue/cancel — Cancelar mensagem na fila

Cancela uma mensagem que ainda não saiu e libera a reserva de saldo. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/queue/cancel`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "id": "9f1c8e2a-..."
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/queue/cancel" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"id":"9f1c8e2a-..."}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Mensagem cancelada e saldo liberado"
}
```

### 76. GET /waba/queue/list — Listar jobs (compatibilidade)

Mantém o formato de job_statuses usado pelas demais APIs do gateway. Não consome saldo.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/queue/list`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/queue/list" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "data": []
  }
}
```

### 77. POST /waba/queue/show — Consultar jobs (compatibilidade)

Consulta o status de um ou mais jobs pelo id, no formato já usado pelas outras APIs. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/queue/show`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "id": [
    "9f1c8e2a-..."
  ]
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/queue/show" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"id":["9f1c8e2a-..."]}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": []
}
```

### 78. GET /waba/webhooks/get — Obter webhooks configurados

URLs por evento. Os nomes seguem os campos oficiais da Meta; os eventos da plataforma usam o prefixo apibrasil. Não consome saldo.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/webhooks/get`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/webhooks/get" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "default": "https://meusite.com/webhook",
    "messages": "https://meusite.com/inbox"
  }
}
```

### 79. POST /waba/webhooks/set — Configurar webhooks

Define a URL de cada evento. Apenas default é obrigatório: ele recebe tudo que não tiver URL própria. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/webhooks/set`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "default": "https://meusite.com/webhook",
  "messages": "https://meusite.com/inbox",
  "statuses": "https://meusite.com/entregas"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/webhooks/set" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"default":"https://meusite.com/webhook","messages":"https://meusite.com/inbox","statuses":"https://meusite.com/entregas"}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "message": "Webhooks atualizados"
}
```

### 80. POST /waba/webhooks/test — Testar webhook

Dispara um evento de teste para a URL configurada e devolve a resposta recebida. Não consome saldo.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/webhooks/test`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "event": "messages"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/webhooks/test" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"event":"messages"}'
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "http_status": 200,
    "duration_ms": 142
  }
}
```

### 81. GET /waba/webhooks/deliveries — Histórico de entregas

Últimas entregas de webhook com status, tentativas e resposta do destino. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/webhooks/deliveries`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/webhooks/deliveries" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false,
  "response": {
    "data": []
  }
}
```

### 82. GET /waba/flows/list — Listar Flows

Flows criados na conta, com status de publicação. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/flows/list`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/flows/list" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false
}
```

### 83. POST /waba/flows/create — Criar Flow

Cria um Flow vazio ou clonado de outro. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/flows/create`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "name": "Cadastro",
  "categories": [
    "SIGN_UP"
  ]
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/flows/create" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Cadastro","categories":["SIGN_UP"]}'
```

**Sample response, from the catalog**

```json
{
  "error": false
}
```

### 84. POST /waba/flows/update-json — Atualizar JSON do Flow

Envia a definição de telas e campos do Flow. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/flows/update-json`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "flow_id": "123",
  "json": "{}"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/flows/update-json" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"flow_id":"123","json":"{}"}'
```

**Sample response, from the catalog**

```json
{
  "error": false
}
```

### 85. POST /waba/flows/publish — Publicar Flow

Publica o Flow, tornando-o utilizável em mensagens. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/flows/publish`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "flow_id": "123"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/flows/publish" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"flow_id":"123"}'
```

**Sample response, from the catalog**

```json
{
  "error": false
}
```

### 86. POST /waba/flows/register-encryption — Registrar chave de criptografia

Registra a chave pública usada na troca de dados criptografada do Flow. Não consome saldo. Disponível a partir da fase 2.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/flows/register-encryption`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "public_key": "-----BEGIN PUBLIC KEY-----"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/flows/register-encryption" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"public_key":"-----BEGIN PUBLIC KEY-----"}'
```

**Sample response, from the catalog**

```json
{
  "error": false
}
```

### 87. POST /waba/call/connect — Iniciar chamada

Inicia uma chamada de voz com oferta SDP. Não consome saldo. Disponível a partir da fase 3.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/call/connect`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999",
  "sdp": "v=0..."
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/call/connect" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999","sdp":"v=0..."}'
```

**Sample response, from the catalog**

```json
{
  "error": false
}
```

### 88. POST /waba/call/pre-accept — Pré-aceitar chamada

Pré-aceita a chamada para acelerar o estabelecimento da mídia. Não consome saldo. Disponível a partir da fase 3.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/call/pre-accept`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "call_id": "wacid...",
  "sdp": "v=0..."
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/call/pre-accept" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"call_id":"wacid...","sdp":"v=0..."}'
```

**Sample response, from the catalog**

```json
{
  "error": false
}
```

### 89. POST /waba/call/accept — Aceitar chamada

Aceita a chamada recebida. Não consome saldo. Disponível a partir da fase 3.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/call/accept`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "call_id": "wacid...",
  "sdp": "v=0..."
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/call/accept" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"call_id":"wacid...","sdp":"v=0..."}'
```

**Sample response, from the catalog**

```json
{
  "error": false
}
```

### 90. POST /waba/call/reject — Rejeitar chamada

Rejeita a chamada recebida. Não consome saldo. Disponível a partir da fase 3.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/call/reject`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "call_id": "wacid..."
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/call/reject" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"call_id":"wacid..."}'
```

**Sample response, from the catalog**

```json
{
  "error": false
}
```

### 91. POST /waba/call/terminate — Encerrar chamada

Encerra uma chamada em andamento. Não consome saldo. Disponível a partir da fase 3.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/call/terminate`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "call_id": "wacid..."
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/call/terminate" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"call_id":"wacid..."}'
```

**Sample response, from the catalog**

```json
{
  "error": false
}
```

### 92. POST /waba/call/permission-request — Pedir permissão de chamada

Envia ao usuário o pedido de permissão para receber chamadas. Não consome saldo. Disponível a partir da fase 3.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/call/permission-request`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "to": "5511999999999"
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/call/permission-request" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"5511999999999"}'
```

**Sample response, from the catalog**

```json
{
  "error": false
}
```

### 93. GET /waba/call/settings — Obter configurações de chamada

Configurações de chamada do número. Não consome saldo. Disponível a partir da fase 3.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/call/settings`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/call/settings" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false
}
```

### 94. POST /waba/call/settings/update — Atualizar configurações de chamada

Altera horários, callback e permissões de chamada. Não consome saldo. Disponível a partir da fase 3.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/call/settings/update`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**Request body**

```json
{
  "calling": {
    "status": "ENABLED"
  }
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/waba/call/settings/update" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"calling":{"status":"ENABLED"}}'
```

**Sample response, from the catalog**

```json
{
  "error": false
}
```

### 95. GET /waba/call/analytics — Métricas de chamadas

Volume, duração e taxa de atendimento. Não consome saldo. Disponível a partir da fase 3.

- **Method:** `GET`
- **Address:** `https://gateway.apibrasil.io/api/v2/waba/call/analytics`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |
| `DeviceToken` | `$APIBRASIL_DEVICE_TOKEN` |
| `Content-Type` | `application/json` |

**In cURL**

```bash
curl -X GET "https://gateway.apibrasil.io/api/v2/waba/call/analytics" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "DeviceToken: $APIBRASIL_DEVICE_TOKEN" \
  -H "Content-Type: application/json"
```

**Sample response, from the catalog**

```json
{
  "error": false
}
```

In the sample responses, the fields of the account that generated the sample (`user.first_name`, `user.email`, `user.cellphone`) come out as `[omitido]`. The rest is what the catalog publishes.

## Pitfalls: what an integration gets wrong without warning

Established from the responses the catalog itself publishes. In every one of them the code works on the happy path and fails silently everywhere else:

1. **The error arrives in the BODY, with HTTP 200.**
   The response carries a boolean `error` field and a `message`. Checking only `response.ok` or the HTTP status lets a failure through as a success. ALWAYS check `error === false` before reading `data`.

2. **`balance`, `tax` and `extra_charges.total` are STRINGS in Brazilian format — and the format varies between APIs.**
   Values seen in the catalog: `"154,380"`, `"497,84"`, `"0,000"` and `"0.19"`. Comma in some, dot in another; three decimal places in some, two in another. In JavaScript, `parseFloat("154,380")` returns `154` and drops the cents with no error at all, and `Number("154,380")` returns `NaN`. Write a converter that handles both separators, and never use these fields in a financial decision without converting them.

3. **Every call costs money.**
   Blind retries multiply the bill. Never automatically repeat a 4xx: a bad parameter repeated is still bad, and still charged. Retry only timeouts and 5xx, with exponential backoff and a small attempt ceiling.

4. **HTTP 402 means insufficient balance, and retrying does not fix it.**
   It is the one status that needs a human — a top-up. Treat it as a terminal error with its own message, and do not lump it in with generic 4xx.

5. **`extra_charges` bills on top of the lookup price.**
   When the body asks for add-on services, the response lists each one with its price plus a `total` that is NOT included in the base amount. If you show cost to an end user, add both.

## See also

- OpenAPI specification: https://doc.apibrasil.io/apis/planos/fb4b4230-a5d0-11f1-a5b5-878489497951/openapi.json
- API catalog: [API catalog](https://doc.apibrasil.io/apis.md)
- Official SDKs: [Official SDKs](https://doc.apibrasil.io/sdks.md)
- Documentation index: https://doc.apibrasil.io/llms.txt
- HTML version of this page: https://doc.apibrasil.io/apis/planos/fb4b4230-a5d0-11f1-a5b5-878489497951
