Create a tenant.
curl --request POST \ --url https://auth.example.com/api/admin/tenants \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": "acme", "name": "Acme Corp", "isolation_policy": "tenant_exclusive" }'Create a tenant as a platform-level administrator. The server assigns lifecycle state, default status, and timestamps; callers provide only the tenant identifier and display metadata. This endpoint does not use X-Tenant-Id because the target tenant is being created.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Tenant creation input. The server sets lifecycle_state, is_default, created_at, and updated_at; those fields must not be supplied by callers.
object
Stable tenant identifier. Must be a DNS-label-style lowercase value.
Optional human-facing tenant code. Defaults to id when omitted.
Physical tenant data placement. Shared pool databases may host multiple tenants; tenant-exclusive databases accept only this tenant. Both modes expand automatically.
Examples
Create a tenant with the default tenant code.
{ "id": "acme", "name": "Acme Corp", "isolation_policy": "tenant_exclusive"}Create a tenant with an explicit tenant code.
{ "id": "acme-prod", "tenant_code": "acme", "name": "Acme Corp", "description": "Production tenant for Acme Corp.", "isolation_policy": "tenant_exclusive"}Responses
Section titled “ Responses ”Tenant mutation response. Timestamps and lifecycle fields are assigned by the server and are not accepted in the create request body.
Tenant row returned by create, update, set-default, and other tenant mutation operations.
object
Physical placement scope. Both modes expand automatically.
Unix timestamp in seconds.
Unix timestamp in seconds.
Present when tenant creation is accepted for asynchronous Control provisioning.
object
object
object
object
object
Examples
Tenant accepted for asynchronous Control Worker provisioning.
{ "id": "acme", "tenant_code": "acme", "name": "Acme Corp", "description": "Production tenant for Acme Corp.", "isolation_policy": "tenant_exclusive", "lifecycle_state": "provisioning", "is_default": false, "created_at": 1770000000, "updated_at": 1770000000, "provisioning": { "operation_id": "tenant_create_018f3f7c85b07c5da6b61c3a6e6b9e01", "tenant_id": "acme", "operation_kind": "create", "isolation_policy": "tenant_exclusive", "status": "queued", "current_step": "request_accepted", "attempt_count": 0, "next_attempt_at": null, "last_error_code": null, "created_at": 1770000000, "updated_at": 1770000000, "completed_at": null, "capacity_operation_ids": {}, "steps": [] }}Tenant creation was accepted for asynchronous Control Worker provisioning.
object
Physical placement scope. Both modes expand automatically.
Unix timestamp in seconds.
Unix timestamp in seconds.
Present when tenant creation is accepted for asynchronous Control provisioning.
object
object
object
object
object
Example
{ "id": "acme", "tenant_code": "acme", "name": "Acme Corp", "description": "Production tenant for Acme Corp.", "isolation_policy": "tenant_exclusive", "lifecycle_state": "active", "is_default": false, "created_at": 1770000000, "updated_at": 1770000000}