A session represents a single WhatsApp account connected to Titan. Every message you send or receive flows through a session, and every session has a name you choose — likeDocumentation Index
Fetch the complete documentation index at: https://docs.usetitan.app/llms.txt
Use this file to discover all available pages before exploring further.
support, sales, or user-42 — that you use to identify it across all API calls. Before a session can send or receive messages, you must start it and complete pairing so it authenticates with WhatsApp.
Session lifecycle
A session moves through a predictable series of states from creation to active use:Session statuses
Every session has astatus and an optional statusReason. Poll GET /api/sessions/{session} or subscribe to the session.status webhook to track state changes.
| Status | Reason | What it means |
|---|---|---|
CONNECTING | SCAN_QR | Waiting for the user to scan the QR code |
CONNECTING | AUTO_RECONNECT | Temporarily disconnected; reconnecting automatically |
CONNECTED | — | Authenticated and ready to send and receive messages |
DISCONNECTED | MANUAL_STOP | Stopped via the API |
DISCONNECTED | QR_TIMEOUT | QR code expired before it was scanned |
DISCONNECTED | LOGGED_OUT | The WhatsApp account unlinked this device |
DISCONNECTED | FAILED | Connection error |
DISCONNECTED | TEMPORARY_BAN | Temporary suspension by WhatsApp |
DISCONNECTED | STREAM_ERROR | WebSocket stream error |
AUTO_RECONNECT is normal and expected after transient network issues. Titan
handles reconnection for you; your application does not need to restart the session.Session naming rules
Session names must match the pattern^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}$. In plain terms:
- Start with a letter or digit
- May contain letters, digits, dots (
.), hyphens (-), and underscores (_) - Between 1 and 64 characters total
default, support-team, user.42, prod_bot_1
Operations
Create a session
"start": true to create and start the session in a single request. Without it, the session is created in a stopped state and you must call the start endpoint separately.
List sessions
status and statusReason.
Start a session
CONNECTING with reason SCAN_QR (or AUTO_RECONNECT if credentials already exist). You then need to pair it — see Pairing.
Stop a session
DISCONNECTED with reason MANUAL_STOP. The session and its credentials are preserved; call start again to reconnect.
Restart a session
Get session details
CONNECTED.
Delete a session
Auto-reconnect
When a connected session loses its connection due to a network issue or brief outage, Titan automatically attempts to reconnect it. The session transitions toCONNECTING with reason AUTO_RECONNECT and returns to CONNECTED once the connection is restored. You receive session.status webhook events for each transition.
Per-session proxy
Each session can route its WhatsApp traffic through its own HTTP or HTTPS proxy. Pass the proxy URL in theconfig object when creating or updating a session: