Skip to content

Get tenant session context

GET/session/context

Returns contextual information about the current admin session, including the active tenant scope (if impersonating), the admin user's permissions, and session metadata. Use to determine available actions in the current session context.

Request

This endpoint takes no parameters and no request body.

Responses

200 Current admin session context

Content type application/json, object · AdminSessionContextV1.

FieldTypeRequiredDescription
admin_idintegerNo

ID of the authenticated admin user.

emailstringNo

Email of the authenticated admin.

is_impersonatingbooleanNo

Whether the admin is currently in an active impersonation session.

impersonation_scopestring, nullableNo

Scope of the active impersonation session. Null if not impersonating.

One of: "readonly", "limited_write", "full_user"

impersonated_tenantstring, nullableNo

Tenant ID being impersonated. Null if not impersonating.

impersonated_user_idinteger, nullableNo

ID of the impersonated tenant user. Null if not impersonating.

session_expires_atstring (date-time)No

When the current admin session token expires.

Example

{
  "admin_id": 3,
  "email": "admin@faciotech.com",
  "is_impersonating": true,
  "impersonation_scope": "readonly",
  "impersonated_tenant": "acme",
  "impersonated_user_id": 12,
  "session_expires_at": "2026-04-08T17:00:00Z"
}

Example request

Paths are relative to the control-plane API base URL ($BASE_URL below).

curl -X GET "$BASE_URL/session/context" \
  -H "Accept: application/json"
Loading