Tenancy: realm and billing account
Vluna uses two distinct scopes. Do not mix them up.
Concepts
| Concept | Identifier | Meaning |
|---|---|---|
| Realm | realm_id | Project boundary. All data is isolated by realm. |
| Billing account | billing_account_id | Account boundary for billing data and enforcement decisions. |
Request scoping (HTTP)
Every request must include:
X-Realm-Id: <realm_id>
Account-scoped requests also include account context, typically via:
X-Principal-Id: <principal_id>and/orX-Billing-Account-Id: <billing_account_id>
For public /api/v1 endpoints, the bearer token is typically issued for a principal and implicitly scopes the billing account.
What should be constant vs per request
| Field | Typical source | Changes when |
|---|---|---|
realm_id | app config | only when you switch environments (dev, staging, prod) |
| service key | server config | rotates over time |
principal_id | your app request context | changes per customer |
billing_account_id | your mapping table | changes per customer |
Next
- Mapping rules: Identity mapping: principal to billing account
- Identifiers and lifecycles: Identifiers and lifecycles