Skip to main content

Connect token

Starts the WhatsApp runtime in the background. Use this for first-time pairing and for reconnecting a paired token after the runtime becomes inactive.
POST /api/v1/sessions/{sessionId}/connect
Authorization: Bearer <access_token>

Reconnect a paired token

Reconnect is the same API call as connect:
POST /api/v1/sessions/{sessionId}/connect
Authorization: Bearer <access_token>
Use reconnect when a token is already paired but not ready to send:
{
  "paired": true,
  "active": false,
  "connected": false,
  "connectionState": "inactive"
}
WADial reuses the existing WhatsApp credentials. You do not need to scan QR or request a pairing code again unless the token was logged out or unpaired.

Get QR

GET /api/v1/sessions/{sessionId}/auth/qr
Authorization: Bearer <access_token>

Connect by pairing code

Pairing code is only for tokens that are not paired yet. Start the runtime with connect, then request a code.
POST /api/v1/sessions/{sessionId}/auth/pairing-code
Authorization: Bearer <access_token>
Content-Type: application/json
{
  "phoneNumber": "15551234567"
}
If the token is already paired, use reconnect instead of requesting another pairing code.

Disconnect

Disconnects the runtime while keeping reusable credentials.
POST /api/v1/sessions/{sessionId}/disconnect
Authorization: Bearer <access_token>

Logout

Logs out the linked device. Use this when the token should be unpaired.
POST /api/v1/sessions/{sessionId}/logout
Authorization: Bearer <access_token>

Status events

GET /api/v1/sessions/{sessionId}/events
Authorization: Bearer <access_token>
Accept: text/event-stream