Tenancy

The X-Tenant-Id header and how keys are bound to one customer or to the operator.

Every tenant-scoped call carries X-Tenant-Id: the id of the customer the key belongs to (customer-level keys) or the operator id (operator-level keys, Operator getting started). The contract marks each operation with x-tenant (customer, operator or any), shown as a badge in the reference and the operator reference.

  • A customer API key is bound to exactly one customer. Another X-Tenant-Id is 403 tenant-forbidden.
  • An operator API key is bound to its operator: a customer id or another operator's id in X-Tenant-Id is 403. Operations about one customer name it in the path. On x-tenant: any operations (audit events, webhooks) each key level is served its own tenant.
  • Ids of other customers are 404 not-found: the API never reveals whether a resource of another tenant exists.
  • Operators run many customers on one platform; each operator's data is isolated by row-level security in the database, so a key can never read another operator's or another customer's data even through a bug in a query.

Markdown version: tenancy.md