Active context
PlatformSelect the membership and tenant context used for authorization, attribution and data isolation.
Identity
One user identity
Membership
Tenant affiliation
Role
Functional access
Context
Tenant + membership
Overview
The active context identifies which tenant and membership a request is acting through. This context drives authorization and attribution.
Context headers
| Header | Purpose |
|---|---|
| X-Tenant-Id | Select the active tenant |
| X-Membership-Id | Select the professional / organization membership used for the action |
Token claims
| Claim | Purpose |
|---|---|
| sub | Global user identity |
| tenant_id | Current or default tenant context where present |
| session_id | Session attribution |
| role | Current role hint; authorization remains server-enforced |
Request example
Context-aware requestCopy
GET /v1/appointments
Authorization: Bearer $ACCESS_TOKEN
X-Tenant-Id: tnt_123
X-Membership-Id: mbr_456Security rules
The backend must validate that the membership belongs to the authenticated user and tenant. Client-provided context headers are never trusted by themselves.