🖥️ Sessions

List all sessions

get/api/sessions

Request

  • Base URL: http://localhost:3000
  • URL: http://localhost:3000/api/sessions
  • Auth: one of:
    • API key in header X-Api-Key
    • oauth2 (a scheme the document does not define)

Query parameters

expandstring[]

Expand additional session details.

allboolean

Return all sessions, including those that are in the STOPPED state.

Response

namestring required

Session name (id)

assignedWorkerstring
presenceobject required
status'STOPPED' | 'STARTING' | 'SCAN_QR_CODE' | 'PASSKEY_REQUIRED' | 'PASSKEY_CONFIRMATION_REQUIRED' | 'WORKING' | 'FAILED' required

Example response

[
  {
    "name": "default",
    "me": {
      "id": "11111111111@c.us",
      "lid": "123123@lid",
      "jid": "123123:123@s.whatsapp.net",
      "reachoutTimelock": {
        "enforcementType": "RESTRICT_ALL_COMPANIONS",
        "isActive": true,
        "timeEnforcementEnds": 1784477333
      },
      "messageCapping": {
        "cappingStatus": "FIRST_WARNING",
        "totalQuota": 1000,
        "usedQuota": 640,
        "cycleStart": 1782874800,
        "cycleEnd": 1785553199,
        "mvStatus": "NOT_ELIGIBLE",
        "oteStatus": "NOT_ELIGIBLE"
      }
    },
    "config": {
      "metadata": {
        "user.id": "123",
        "user.email": "email@example.com"
      },
      "proxy": {
        "server": "localhost:3128"
      },
      "noweb": {
        "store": {
          "enabled": true
        }
      },
      "gows": {
        "storage": {
          "messages": true,
          "groups": true,
          "chats": true,
          "labels": true,
          "contacts": true,
          "messageSecrets": true
        }
      },
      "webhooks": [
        {
          "url": "https://webhook.site/11111111-1111-1111-1111-11111111",
          "events": [
            "message",
            "session.status"
          ],
          "hmac": {
            "key": "your-secret-key"
          },
          "retries": {
            "delaySeconds": 2,
            "attempts": 15,
            "policy": "linear"
          },
          "customHeaders": [
            {
              "name": "X-My-Custom-Header",
              "value": "Value"
            }
          ]
        }
      ]
    }
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.