WhatsApp Gateway
API referenceSessions

Start a session

POST
/api/v1/sessions/{session}:start

Start the session. A paired session connects to WhatsApp; an unpaired or logged-out session begins QR pairing.

To use a phone pairing code instead, request the code directly without calling :start first.

The session must be owned by your organization.

Returns updated session row. Calling start repeatedly is idempotent.

Errors: not_found (404), unauthorized (401), forbidden (403).

Authorization

AuthorizationBearer <token>

Send Authorization: Bearer <token>. The token can be a login JWT from the frontend or an api-key for a script. JWT access comes from the person's organization role. Api-key access comes from the permissions saved on the key.

In: header

Path Parameters

session*string

Session ID within your organization. Unknown or cross-organization sessions return not_found (404).

Example"sess_01HZX8K3M9"

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/sessions/sess_01HZX8K3M9:start"
{  "autoRead": false,  "createdAt": 1719662400000,  "createdByUserId": "user_01J9DEF...",  "gatewayId": "gw-sg-1",  "id": "01J9ZX8K2QHV0M3T6R7P4N5W8C",  "isAdminSession": false,  "label": "Support line",  "lastConnectedAt": 1719662400000,  "organizationId": "org_01J9ABC...",  "phoneNumber": "6281234567890",  "presenceTyping": true,  "ratePerHour": 600,  "ratePerMin": 20,  "status": "working",  "updatedAt": 1719662400000,  "waJid": "6281234567890@s.whatsapp.net",  "waLid": "205227043110953@lid"}
{  "error": {    "code": "not_found",    "details": {      "property1": null,      "property2": null    },    "message": "session not found"  }}