Skip to content
API docsOpen the app
ContentsNumber sessions

Number sessions

A session is one WhatsApp number in the workspace and its connection state.

List sessions#

curl https://mcp.wagent.sh/v1/sessions \
  -H "Authorization: Bearer wg_live_…"

Each session has id, phone_number, state, status, sync_progress, external_ref (your user reference for numbers connected through the widget) and connected_at.

The six states#

Session states
stateMeaning
not_startedThe number is added but linking has not begun.
startingLinking is starting.
qrWaiting for the owner to scan the QR code or enter the code.
authorizedConnected and working.
errorLinking failed, the number is in use elsewhere, or it was banned.
sync_errorConnected, but chat sync failed.

status is the plain summary: connected, syncing, logged_out, banned or not_yet (never linked).

Session events#

  • session.state (channel family): every state change, with from and to.
  • session.syncing and session.banned (channel family).
  • session.connected and session.logged_out (users family): the number signed in or out.