Skip to main content
← All documentation

Authentication and sessions

Getting started

A session belongs to one account and one organization. An account that belongs to several organizations holds several live sessions at once — switching does not revoke the one you were using.

Endpoints

  • POST /api/auth/register — create an account and its first organization.
  • POST /api/auth/login — exchange credentials for a token.
  • GET /api/auth/me — the account, its organizations, and the active one.
  • POST /api/auth/switch-organization — get a token for another organization you belong to.
  • GET /api/auth/sessions — every live session, with device and last-seen.
  • DELETE /api/auth/sessions/:session — end one; DELETE /api/auth/sessions ends the rest.
  • POST /api/auth/password/forgot and /reset — the recovery pair.