Skip to content

Sessions ​

A session is one linked WhatsApp number. Linking is easiest from the dashboard; these endpoints are for automating it.

List sessions ​

http
GET /session
json
{
  "data": [
    { "session": "sales", "status": "connected", "details": { "name": "Acme Store", "phoneNumber": "14155550100" } },
    { "session": "support", "status": "connecting", "details": { "name": "", "phoneNumber": "" } }
  ]
}

status is connecting, connected or disconnected.

Start a session ​

http
POST /session/start
content-type: application/json

{ "session": "sales" }

Returns the QR code to scan as a string. Turn it into an image with any QR library, or use the GET variant below.

json
{ "qr": "2@uGcdVWG80nTaAp6Vx7UZQIttVQLrq…" }

If the session links without a QR code (it was linked before), the response is { "data": { "message": "Connected" } }. Starting a session that already exists fails with 400 Session already exist.

http
GET /session/start?session=sales&key=wag_your_key

Same, but returns an HTML page with the QR code as an image. Handy to open in a browser.

Session details ​

http
GET /session/:session
json
{
  "success": true,
  "data": {
    "session": "sales",
    "status": "connected",
    "details": { "name": "Acme Store", "phoneNumber": "14155550100" },
    "connection": { "isConnected": true, "lastUpdate": "2026-12-01T10:21:00.000Z" },
    "metadata": { "platform": "smba", "deviceManufacturer": "unknown", "deviceModel": "unknown" }
  }
}

Unknown sessions return 404 with { "message": "Session 'sales' not found" }.

Delete a session ​

http
DELETE /session/:session

Logs the linked device out on the phone and deletes the session's credentials and stored chats.

json
{
  "success": true,
  "message": "Session 'sales' deleted successfully",
  "data": { "session": "sales", "deletedAt": "2026-12-01T10:21:00.000Z" }
}

GET /session/logout?session=sales (or POST with { "session": "sales" }) does the same and returns { "data": "success" }. It's kept for v4 compatibility.

Uses the unofficial WhatsApp Web protocol. Not affiliated with WhatsApp or Meta.