---
title: "APIBrasil Documentation"
description: "Official documentation of APIBrasil's Brazilian APIs: 213 APIs behind the same gateway and the same token, plus the SDKs, the webhooks, Socket.IO and the MCP guide. This index and the pages linked from it are plain text, open to AI assistants and agents, with no login."
lang: en
canonical: https://doc.apibrasil.io
markdown: https://doc.apibrasil.io/index.md
source: apibrasil-documentation
---

# APIBrasil Documentation

> Official documentation of APIBrasil's Brazilian APIs: 213 APIs behind the same gateway and the same token, plus the SDKs, the webhooks, Socket.IO and the MCP guide. This index and the pages linked from it are plain text, open to AI assistants and agents, with no login.

- Every page of this documentation exists in Markdown: append `.md` to the address of the HTML page (the home is `/index.md`). A request with `Accept: text/markdown` to any page receives the same version.
- The language comes from the `idioma` parameter (`pt-BR`, `en` or `es-419`) or from the Accept-Language header. Without either, Portuguese.
- To find a page without reading the whole index: `/busca.md?q=term` returns the pages matching the term, with link and summary.
- Every API has an OpenAPI 3.1 specification at `/openapi.json` after the page address (for example `/apis/creditos/…/openapi.json`), with methods, headers and sample request and response bodies.
- `llms-full.txt` gathers the fixed sections into a single file. The API pages stay out of it because of their size: each one has its own address below, with the endpoints, the request bodies and the sample responses.
- Nothing here is guessed. The API catalog, the endpoints and the server fleet come from the gateway on every read; SDKs, webhooks, Socket.IO and MCP come from content verified in the services' source code.

## Start here

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

**Authentication**

- `Authorization: Bearer $APIBRASIL_TOKEN` on every call. It is the same token for every API, issued in the APIBrasil panel or by the login route of the platform's authentication API.
- `DeviceToken: $APIBRASIL_DEVICE_TOKEN` only on the APIs billed by plan, which are the WhatsApp ones. The ones billed per query do not ask for it.

Calls are POST with a JSON body, except where the endpoint declares another method.

**Sandbox:** With `homolog: true` in the body, the gateway answers from a fixed base, with the real shape of the response, and does not charge. The CPF 00000000000 belongs to that base and to nobody: use it in tests, never in production.

**The first call, in cURL**

```bash
curl -X POST https://gateway.apibrasil.io/api/v2/dados/cpf \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"cpf": "00000000000", "homolog": true}'
```

**The response:** Besides the result in `data`, the success body carries `error` (boolean), `message`, `balance` (remaining balance), `tax` (what the query cost), `valor_consulta` and `api_limit_for`. The error can arrive with HTTP 200: check `error === false` before reading `data`.

## API catalog (213)

The full catalog, with the description, the price and the link of every API, is on a single page:

- [API catalog](https://doc.apibrasil.io/apis.md): The 213 APIs of the gateway, by category, with the first sentence of the description, the price and the link to each one's page.

- [Credit Analysis (46)](https://doc.apibrasil.io/apis.md#credit-analysis-46)
- [Vehicle Security (34)](https://doc.apibrasil.io/apis.md#vehicle-security-34)
- [CRLV (Vehicle Registration) (26)](https://doc.apibrasil.io/apis.md#crlv-vehicle-registration-26)
- [Fraud Analysis (24)](https://doc.apibrasil.io/apis.md#fraud-analysis-24)
- [Company Lookup (CNPJ) (16)](https://doc.apibrasil.io/apis.md#company-lookup-cnpj-16)
- [Messaging (10)](https://doc.apibrasil.io/apis.md#messaging-10)
- [Vehicle Pricing (10)](https://doc.apibrasil.io/apis.md#vehicle-pricing-10)
- [Search & Collections (9)](https://doc.apibrasil.io/apis.md#search-collections-9)
- [Asynchronous Lookups (7)](https://doc.apibrasil.io/apis.md#asynchronous-lookups-7)
- [Certificate Issuance (7)](https://doc.apibrasil.io/apis.md#certificate-issuance-7)
- [Whitelabel Reports (5)](https://doc.apibrasil.io/apis.md#whitelabel-reports-5)
- [Geolocation & Logistics (4)](https://doc.apibrasil.io/apis.md#geolocation-logistics-4)
- [Professional Councils (3)](https://doc.apibrasil.io/apis.md#professional-councils-3)
- [Digital Services (3)](https://doc.apibrasil.io/apis.md#digital-services-3)
- [Data & Utilities (2)](https://doc.apibrasil.io/apis.md#data-utilities-2)
- [Tax Compliance (2)](https://doc.apibrasil.io/apis.md#tax-compliance-2)
- [Automação Empresarial (1)](https://doc.apibrasil.io/apis.md#automacao-empresarial-1)
- [Open Data (1)](https://doc.apibrasil.io/apis.md#open-data-1)
- [Governance & Due Diligence (1)](https://doc.apibrasil.io/apis.md#governance-due-diligence-1)
- [Cybersecurity (1)](https://doc.apibrasil.io/apis.md#cybersecurity-1)
- [Notary Services (1)](https://doc.apibrasil.io/apis.md#notary-services-1)

## Platform APIs

The account and operation routes of the gateway (login, devices, plans, servers), at the same address as the APIs.

- [Authentication](https://doc.apibrasil.io/apis/plataforma/autenticacao.md): Authentication system
- [Requests](https://doc.apibrasil.io/apis/plataforma/requests.md): Request management
- [Devices](https://doc.apibrasil.io/apis/plataforma/dispositivos.md): Device control
- [APIs](https://doc.apibrasil.io/apis/plataforma/apis.md): API management
- [User](https://doc.apibrasil.io/apis/plataforma/usuario.md): User profile
- [Servers](https://doc.apibrasil.io/apis/plataforma/servidores.md): Server infrastructure
- [Status](https://doc.apibrasil.io/apis/plataforma/status.md): Status monitoring
- [Workflow](https://doc.apibrasil.io/apis/plataforma/workflow.md): Chaining batch queries together

## Official SDKs

- [Official SDKs](https://doc.apibrasil.io/sdks.md): The official libraries wrap the same gateway: one command to install, the token in the right place, and the whole API catalogue.
- [C++](https://doc.apibrasil.io/sdks/cpp.md): `git clone https://github.com/APIBrasil/apigratis-sdk-cpp`
- [Python](https://doc.apibrasil.io/sdks/python.md): `pip install api-brasil`
- [Lua](https://doc.apibrasil.io/sdks/lua.md): `luarocks install apibrasil`
- [PHP](https://doc.apibrasil.io/sdks/php.md): `composer require jhowbhz/apigratis-sdk-php`
- [Java](https://doc.apibrasil.io/sdks/java.md): `mvn dependency:get -Dartifact=br.com.apibrasil:apigratis-sdk-java:0.0.1`
- [Ruby](https://doc.apibrasil.io/sdks/ruby.md): `gem install apigratis-sdk-ruby`
- [C# / .NET](https://doc.apibrasil.io/sdks/csharp.md): `dotnet add package ApiBrasil`
- [Scala](https://doc.apibrasil.io/sdks/scala.md): public code, no package yet
- [Node.js / TypeScript](https://doc.apibrasil.io/sdks/javascript.md): `npm install apigratis-sdk-nodejs`
- [Go](https://doc.apibrasil.io/sdks/go.md): `go get github.com/APIBrasil/apigratis-sdk-go`
- [Rust](https://doc.apibrasil.io/sdks/rust.md): `cargo add apibrasil`
- [Dart / Flutter](https://doc.apibrasil.io/sdks/flutter.md): `flutter pub add apigratis_sdk_flutter`
- [Elixir](https://doc.apibrasil.io/sdks/elixir.md): `mix deps.get  # com {:apibrasil, "~> 0.0.1"} no mix.exs`

Announced, with no public code yet: Erlang, Haskell, Delphi, F#, Clojure, Nim, Kotlin, Crystal, Zig. For those languages the way out is the HTTP API, below.

## Webhooks

- [Webhooks](https://doc.apibrasil.io/webhooks.md): The index of channels and the asynchronous sending, with the routes that end in `/queue`.
- [SMS webhook](https://doc.apibrasil.io/webhooks/api-sms.md): Notifications for each message's journey — and, when someone replies, the text of that reply.
- [WhatsApp Wpp webhook](https://doc.apibrasil.io/webhooks/api-whatsapp-wpp.md): Messages coming in and going out, read receipts, calls, and the session lifecycle.
- [WhatsApp Baileys webhook](https://doc.apibrasil.io/webhooks/api-whatsapp-baileys.md): Messages, read receipts, contacts and the connection lifecycle — in an envelope that never says which event it is.
- [WhatsApp WhatsMeow webhook](https://doc.apibrasil.io/webhooks/api-whatsapp-whatsmeow.md): Messages, read receipts, calls, groups and connection — with the event name included, and a filter to choose what arrives.

## Socket.IO

- [Socket.IO](https://doc.apibrasil.io/socket-io.md): The connection, the frames that arrive, sending over the same connection and the service's pitfalls.
- [Socket.IO: Server](https://doc.apibrasil.io/socket-io/server.md): The `server` event exists in the service, but no producer was found in the repositories — it does not fire today.
- [Socket.IO: Platform](https://doc.apibrasil.io/socket-io/platform.md): Your account's notifications in real time: balance, plans, invoices, devices, logins and tickets.
- [Socket.IO: Send text (WPP)](https://doc.apibrasil.io/socket-io/send-text-wpp.md): Fire a text message through the WPP engine without opening an HTTP request per send.
- [Socket.IO: Send files (WPP)](https://doc.apibrasil.io/socket-io/send-files-wpp.md): Send media or a document by public URL, through the WPP engine.
- [Socket.IO: Send text (Baileys)](https://doc.apibrasil.io/socket-io/send-text-baileys.md): Fire a text message through the Baileys engine, with presence and delay control.
- [Socket.IO: Send files (Base64)](https://doc.apibrasil.io/socket-io/send-files-base64.md): Send a file with no public URL, embedded as Base64 in the body itself — useful for content generated on the fly.
- [Socket.IO: All devices](https://doc.apibrasil.io/socket-io/all-devices.md): Follow ALL the devices under your Profile ID over a single connection.
- [Socket.IO: Single device](https://doc.apibrasil.io/socket-io/unique-device.md): Receive the events of ONE device only.

## MCP guide (10, 6 MCP)

- [MCP guide](https://doc.apibrasil.io/mcp.md): The MCP server, the per-tool guides and the comparison with the REST gateway.
- [IDEs and editors](https://doc.apibrasil.io/mcp/ide-editores.md): Wire the MCP server into your favorite code editor and reach the Brazilian APIs while you write code
  - [Cursor IDE](https://doc.apibrasil.io/mcp/ide-editores/cursor.md): AI-first IDE with native MCP support (connects to the MCP server)
  - [Visual Studio Code](https://doc.apibrasil.io/mcp/ide-editores/vscode.md): The world's most popular editor, with MCP through an extension (connects to the MCP server)
  - [Zed Editor](https://doc.apibrasil.io/mcp/ide-editores/zed.md): Ultra-fast code editor with native MCP support (connects to the MCP server)
- [Chatbots](https://doc.apibrasil.io/mcp/chatbots.md): Build smart chatbots that reach Brazilian data in real time
  - [Dify.ai](https://doc.apibrasil.io/mcp/chatbots/dify.md): LLMOps platform for building AI applications (calls the REST gateway over HTTP)
  - [Typebot](https://doc.apibrasil.io/mcp/chatbots/typebot.md): Open-source platform for building conversational chatbots (calls the REST gateway over HTTP)
- [Programming languages](https://doc.apibrasil.io/mcp/programacao.md): Code samples in several languages for integrating over MCP
  - [Node.js / TypeScript](https://doc.apibrasil.io/mcp/programacao/nodejs.md): Official TypeScript SDK, fully typed (connects to the MCP server)
  - [Python](https://doc.apibrasil.io/mcp/programacao/python.md): Official Python SDK, with asyncio for modern apps (connects to the MCP server)
- [AI clients](https://doc.apibrasil.io/mcp/clientes-ai.md): Connect AI assistants such as Claude Desktop and ChatGPT straight to the APIBrasil APIs
  - [Claude Desktop](https://doc.apibrasil.io/mcp/clientes-ai/claude-desktop.md): Anthropic's AI assistant, with native MCP support (connects to the MCP server)
- [Automation](https://doc.apibrasil.io/mcp/automacao.md): Automate workflows with low-code and no-code tools over MCP
  - [n8n](https://doc.apibrasil.io/mcp/automacao/n8n.md): Open-source workflow automation platform (calls the REST gateway over HTTP)
- [Cloud platforms](https://doc.apibrasil.io/mcp/plataformas-cloud.md): Ship to and integrate with cloud services such as AWS, Azure, Vercel and Cloudflare
  - [Vercel](https://doc.apibrasil.io/mcp/plataformas-cloud/vercel.md): Deployment platform for Next.js and serverless (calls the REST gateway over HTTP)

## Servers

- [Servers](https://doc.apibrasil.io/servidores.md): The fleet that serves the gateway, with the state of each server at the minute of reading.

## Optional

- [llms-full.txt](https://doc.apibrasil.io/llms-full.txt): The fixed sections of this documentation in a single file, to load all at once.
- [Documentation search](https://doc.apibrasil.io/busca.md?q=cpf): The search covers the name, description and category of the APIs, the SDKs, the webhook channels, the Socket.IO destinations and the MCP guides. Accents and case are ignored.
- [HTML version of this page](https://doc.apibrasil.io): The same documentation for people, with a request simulator. Requires login.
