Skip to content
looot docs
Esc
↑↓navigate↵open⌘Jpreview

Get session context

Returns the bounded context of the authenticated local session: only the server-derived local organization, authentication class, canonical granted scopes and local mode. It never returns tokens, token hashes, principal identifiers, vault references or session identifiers.

GET/v1/session-context
Authorization
AuthorizationBearer token · headerrequired
Query parameters
includestring

expiresAt adds the token's own expiry to the response; organizationName adds the organization's display name. Comma-separated or repeated.

Responses
200

Authenticated local session context

modeanyrequired
authenticationClassanyrequired
Allowed:local_static_tokenmachine_session
organizationIdstringrequired
Show properties
One of:
string
string
string
string
scopesstring[]required
max items 100
deploymentModeanyrequired

Operator-facing deployment mode: fixture_demo/authenticated_sandbox in local_alpha, approved_production in production, degraded whenever live readiness fails regardless of mode.

Allowed:fixture_demoauthenticated_sandboxapproved_productiondegraded
roleanyrequired

The resolved principal's organization role; null for a resolver that never set one.

Allowed:owneradminmemberviewernull
expiresAtstring<date-time> | null

Present only for ?include=expiresAt: the presenting token's own expiry (ISO 8601 UTC), or null when it has none.

organizationNamestring | null

Present only for ?include=organizationName: the organization's display name, or null when the gateway could not read one.

min length 1 · max length 120
401

Authentication required

403

local-product:read scope required

405

Method not allowed

503

Session context unavailable

Try it
Server
Authorization
Parameters
Request
curl -X GET "https://api.looot.ai/v1/session-context" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "mode": "local_alpha",
  "authenticationClass": "local_static_token",
  "organizationId": "string",
  "scopes": [
    "string"
  ],
  "deploymentMode": "fixture_demo",
  "role": "owner",
  "expiresAt": "2019-08-24T14:15:22Z",
  "organizationName": "string"
}