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.
| Field | Type | Required | Description |
|---|---|---|---|
admin_id | integer | No | ID of the authenticated admin user. |
email | string | No | Email of the authenticated admin. |
is_impersonating | boolean | No | Whether the admin is currently in an active impersonation session. |
impersonation_scope | string, nullable | No | Scope of the active impersonation session. Null if not impersonating. One of: |
impersonated_tenant | string, nullable | No | Tenant ID being impersonated. Null if not impersonating. |
impersonated_user_id | integer, nullable | No | ID of the impersonated tenant user. Null if not impersonating. |
session_expires_at | string (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"