The Titan API is a RESTful HTTP API that lets you connect WhatsApp accounts, send and receive messages, manage groups and contacts, and receive real-time events via webhooks. Every request uses JSON, and every response wraps its data in a consistent envelope so you can handle success and errors the same way throughout your application.Documentation Index
Fetch the complete documentation index at: https://docs.usetitan.app/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
If you are on Titan Cloud, your base URL is provided in your dashboard. If you are self-hosting, use your own instance URL:/docs.
Authentication
All API requests require a bearer token in theAuthorization header:
Request format
Send all request bodies as JSON with theContent-Type: application/json header:
Response format
Successful responses wrap the result in adata envelope:
data:
Error format
Errors return anerror string and, where applicable, a docs link to the relevant documentation:
HTTP status codes
| Code | Meaning |
|---|---|
200 | Success |
201 | Created |
202 | Accepted (async mode — see below) |
400 | Bad request — invalid input |
401 | Unauthorized — missing or invalid API key |
403 | Forbidden — insufficient scope |
404 | Not found |
409 | Conflict — resource already exists |
429 | Too many requests — rate limit exceeded |
500 | Internal server error |
502 | Bad gateway — runner or media worker unreachable |
503 | Service unavailable — rate limiter overload or dependency failure |
Rate limiting
Titan uses a sliding-window rate limiter scoped to your API key. Every response includes these headers:| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the window |
X-RateLimit-Remaining | Requests remaining in the current window |
Retry-After | Seconds to wait before retrying (present on 429) |
429, wait the number of seconds in Retry-After before retrying.
Async mode
Any endpoint that forwards a command to the WhatsApp runner supports async mode. Add thePrefer: respond-async header to get an immediate 202 Accepted instead of waiting for the result:
202 response includes a requestId. When the operation completes, Titan fires a command.result webhook event with that same requestId and the result payload. This is useful for high-throughput workloads where you do not want to block on each request.
JID reference format
WhatsApp uses JIDs (Jabber IDs) to address chats and participants. The API exposes JIDs through aJIDRef object that normalizes both phone-number and linked-device-ID addressing:
Individual contact:
chatId field expects a JID string directly:
- Individual:
{e164_number_without_plus}@s.whatsapp.net— for example,[email protected] - Group:
{group_id}@g.us— for example,[email protected] - Status broadcast:
status@broadcast
Pagination
Endpoints that return lists include acursor field in the response when more results are available. Pass the cursor value as a cursor query parameter to fetch the next page.
Permission scopes
Every API key is issued with one or more scopes that restrict its access. The available scopes are:* sessions:read sessions:manage messages:write chats:read chats:manage contacts:read contacts:manage groups:read groups:manage channels:read channels:manage status:write presence:read presence:write labels:read labels:manage profile:read profile:write webhooks:manage media:read media:manage
If your key lacks the required scope for an endpoint, the API returns 403 Forbidden with a message indicating which scope is needed.