# API reference

The reference is generated from the registered routes and request structs, so an endpoint that does not exist cannot appear in it. Three documents are published:

| Document | Covers | Use it for |
| --- | --- | --- |
| [Platform v1](/docs/platform-v1.json) | `/api/v1/*` public routes, including agents | Integrations and device APIs |
| [Messaging v2](/docs/swagger.json) | `/api/v2/*` messaging and short links | New messaging work |
| [Dashboard](/docs/dashboard.json) | `/api/*` authenticated dashboard routes | Building clients on the dashboard contract |

## Conventions

- Base URL: `https://api.bonga.africa`; HTTPS only.
- Authentication: `Authorization: Bearer <key>` for v1 and v2; an agent key on `/api/v1/agent/*` and `/api/mcp`; a dashboard JWT on `/api/*`.
- Workspace selection: `X-Workspace-ID` on dashboard routes.
- Envelope: `{ success, message, data }`; branch on `data.error.code`.
- Idempotency: `Idempotency-Key` on sends and agent operations.
- Scopes: exact, with no wildcard or prefix grants.
- Statuses: `202` means accepted, not delivered.

## Tags

The dashboard document groups 463 operations under readable tags: AI agents, API keys, Automation, Campaigns, Channels, Contacts, Credits and billing, Drips and forms, Email, Files and media, Flows, Forms, Inbox, Inbound email, Notifications, OTP and Verify, SMS, Short links, Workspace, WhatsApp, Webhooks and more. Every operation has a summary, a description of what it reads or changes, and its request and response types.

## Download

Every document is JSON and can be downloaded for a client generator:

```bash
curl -O https://bonga.africa/docs/platform-v1.json
curl -O https://bonga.africa/docs/swagger.json
curl -O https://bonga.africa/docs/dashboard.json
```

## Agent routes

The agent REST surface is part of the platform document under the `Agent identity`, `Agent inbox`, `Agent sending` and `Agent approvals` tags. MCP is JSON-RPC and is documented in [Agent MCP](/docs/agents-mcp).

## Related

- [Authentication and API keys](/docs/authentication)
- [Errors and retries](/docs/errors-and-retries)
- [Messaging API v2](/docs/messaging-api-v2)
