Skip to main content

Get Current Session

Returns information about the authenticated user, their organization, and the current license.
GET /api/session

Response

{
  "user": {
    "id": "usr_01hx...",
    "email": "alice@acme.com",
    "name": "Alice Smith",
    "role": "ORG_ADMIN",
    "dashboard_access": true
  },
  "org": {
    "id": "org_01hx...",
    "name": "Acme Corp",
    "domain": "acme.com"
  },
  "license": {
    "plan": "pro",
    "status": "active",
    "billing_cycle": "monthly",
    "expires_at": "2025-11-14T00:00:00Z"
  }
}

Fields

user
FieldTypeDescription
idstringInternal user ID
emailstringAuth0 email
namestringDisplay name
rolestringORG_ADMIN, ANALYST, or APP_USER
dashboard_accessbooleanWhether the user is allowed dashboard access
org
FieldTypeDescription
idstringOrganization ID
namestringDisplay name
domainstringEmail domain (null for personal orgs)
license
FieldTypeDescription
planstringnone, basic, pro, or enterprise
statusstringpending, onboarding, active, or canceled
billing_cyclestringmonthly or annual
expires_atstringISO 8601 expiration timestamp

Errors

CodeDescription
401Missing or invalid Authorization header
403User’s dashboard access is disabled