Skip to content

Update a tenant.

PATCH
/api/admin/tenants/{id}
Code sample: Shell / cURL
curl --request PATCH \
--url https://auth.example.com/api/admin/tenants/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "Acme Corporation", "description": "Primary production tenant for Acme Corporation.", "lifecycle_state": "active" }'

Update mutable tenant metadata or operator-controlled lifecycle state. The path parameter identifies the target tenant, so X-Tenant-Id is not required.

id
required
string
Media type application/json
object
>= 1 properties
name
string
>= 1 characters <= 200 characters
tenant_code
string
>= 1 characters <= 63 characters /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/
description
string | null
<= 500 characters
lifecycle_state
string
Allowed values: active suspended frozen migration_read_only
key
additional properties
Example
{
"name": "Acme Corporation",
"description": "Primary production tenant for Acme Corporation.",
"lifecycle_state": "active"
}

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
}