Two scoping models
Lamba has two HTTP surfaces with different context rules:
- Customer public surface
- Hosts:
id.uselamba.comandapi.uselamba.com - Context comes from the customer session token.
- Do not send
X-Tenant-IdorX-Project-Id.
- Internal platform surface
- Host:
platformapi.uselamba.com - Used by the Lamba app and console.
- Tenant and project headers still scope platform reads and writes.
Customer public scoping
- Unauthenticated auth flows resolve their default workspace/project/environment from the auth host and configured bindings.
- Authenticated runtime/admin flows resolve active
workspace + project + environmentfrom the issued session token. - Password, register, magic-link, phone, refresh, and
switch-contextall issue that customer session token shape. - OIDC Authorization Code flow signs the user in on
id.*, but you should exchange into a scoped customer session before callingapi.*. - If your app pins users to a specific project, call
POST /v1/sessions/switch-contextafter login or register.
Internal platform scoping
Internal platform requests still use:
Authorization: Bearer <access-token>
X-Tenant-Id: <workspace-guid>
X-Project-Id: <project-guid>
This is an internal console/app contract, not a customer runtime contract.
Best practices
- Customer products should talk only to
idandapi. - Lamba app and console should talk only to
platformapi. - Keep
X-Correlation-Idon both surfaces for traceability. - Never infer workspace or project from untrusted client input without membership validation.
Related docs
- Workspace/project model:
/docs/concepts/tenant-project - API contract:
/docs/reference/api-overview - Error handling:
/docs/reference/errors