Create a tenant
POST /v1/tenants
Creates a new tenant workspace. When authentication is enabled, the calling principal is automatically added as the tenant_owner.
Body parameters
A unique, stable identifier for this tenant. Choose something meaningful to
your organization (e.g.
acme-corp). Cannot be changed after creation.A human-readable display name (e.g.
"Acme Corporation").An optional URL-friendly alias for the tenant.
Response
201 Created
Error responses
| Status | Code | Meaning |
|---|---|---|
409 | conflict | A tenant with this tenant_id already exists. |
Example
Add or update a member
PUT /v1/tenants/:tenant_id/members/:principal_id
Adds a principal to a tenant or updates their existing role. This is an upsert — calling it a second time changes the role in place.
Requires at least the tenant_admin role to call.
Path parameters
The ID of the tenant.
The principal to add or update, formatted as
oidc:{issuer}#{sub}. For
example: oidc:https://auth.example.com#user_abc123.Body parameters
The role to assign. Must be one of the values in the table below.
Roles
| Role | Capabilities |
|---|---|
tenant_reader | Read identity snapshots, grants, owners, and accessible subjects. Create webhook subscriptions and refresh requests. |
tenant_proposer | All tenant_reader capabilities, plus propose entity state updates. |
tenant_editor | All tenant_proposer capabilities, plus apply proposed state updates to produce new snapshots. |
tenant_admin | All tenant_editor capabilities, plus manage grants (create, list, revoke), manage tenant members, and view usage statistics. |
tenant_owner | Full control. All tenant_admin capabilities. The owning principal accountable for the tenant. |
Response
200 OK — the membership record.
Example
URL-encode the
principal_id path segment before sending the request — the
colon and hash characters must be percent-encoded as %3A and %23
respectively.Get usage statistics
GET /v1/tenants/:tenant_id/usage
Returns aggregated usage metrics for your tenant over a configurable time window. Useful for monitoring snapshot write volume and API activity.
Requires at least the tenant_admin role.
Path parameters
The ID of the tenant.
Query parameters
Start of the time window (inclusive). Must be provided together with
to.
Defaults to 30 days before to when omitted.End of the time window (inclusive). Must be provided together with
from.
Defaults to the current time when omitted.from and to must be supplied together. Providing one without the other
returns 400 Bad Request. The from timestamp must not be later than to.Response
200 OK
Example
List subject owners
GET /v1/tenants/:tenant_id/subjects/:subject_type/:subject_id/owners
Returns the owning tenant record for a subject. Every subject has exactly one owning tenant — the tenant that submitted the subject’s first snapshot. This endpoint lets you confirm ownership before attempting write operations.
Requires at least the tenant_reader role.
Path parameters
The ID of the requesting tenant.
Must be
entity or individual.The identifier of the subject.
Response
200 OK