Skip to content

Set a tenant as the default tenant.

POST
/api/admin/tenants/{id}/set-default
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/admin/tenants/example/set-default \
--header 'Authorization: Bearer <token>'

Set the path tenant as the default tenant. The path parameter identifies the target tenant, so X-Tenant-Id is not required.

id
required
string

Tenant mutation response. Timestamps and lifecycle fields are assigned by the server and are not accepted in the create request body.

Media type application/json

Tenant row returned by create, update, set-default, and other tenant mutation operations.

object
id
required
string
tenant_code
required
string
name
required
string
description
required
string | null
lifecycle_state
required
string
Allowed values: provisioning active suspended frozen migration_read_only deleting deleted restore_pending restore_validating
is_default
required
boolean
created_at
required

Unix timestamp in seconds.

integer format: int64
updated_at
required

Unix timestamp in seconds.

integer format: int64
provisioning

Present on tenant D1 pool create and provisioning retry responses.

object
mode
string
slot_id
string
smoke_test
string
Allowed values: passed
retry
string
Allowed values: succeeded
key
additional properties
key
additional properties
Examples

Tenant created in the shared control-plane database.

{
"id": "acme",
"tenant_code": "acme",
"name": "Acme Corp",
"description": "Production tenant for Acme Corp.",
"lifecycle_state": "active",
"is_default": false,
"created_at": 1770000000,
"updated_at": 1770000000
}