Skip to main content

Rename Tenant

Required role: owner.

Change a tenant's name. Only the name changes: pipelines, API keys, members and OIDC trust relationships all reference the tenant by its identifier and are unaffected.

Set displace_existing to replace a tenant atomically with one that's currently in use. This renames the conflicting tenant to <name> (<id>) in the same transaction, with everything it had. Two calls potentially lose to another user request, which could re-create the name in between.

Path Parameters
tenant_id uuid REQUIRED

Tenant identifier

Request Body REQUIRED
displace_existing boolean

Take the name from the tenant that currently holds it, instead of failing with a conflict. That tenant is renamed to <name> (<id>) and keeps everything it had; nothing is merged or deleted.

name string REQUIRED

The tenant's new name.

Responses
200

Tenant renamed

Schema OPTIONAL
displaced object OPTIONAL

A tenant, as returned by the platform (owner-only) tenant list.

id uuid
initial_provider string

The OIDC issuer this tenant was first provisioned under. Provenance only: a tenant is resolved by name, so this does not affect which tenant a login reaches.

name string
403

Caller is not a platform owner

Schema OPTIONAL
details

Detailed error metadata. The contents of this field is determined by error_code.

error_code string

Error code is a string that specifies this error type.

message string

Human-readable error message.

404

No tenant with that identifier

Schema OPTIONAL
details

Detailed error metadata. The contents of this field is determined by error_code.

error_code string

Error code is a string that specifies this error type.

message string

Human-readable error message.

409

A tenant with that name already exists, and displace_existing was not set

Schema OPTIONAL
details

Detailed error metadata. The contents of this field is determined by error_code.

error_code string

Error code is a string that specifies this error type.

message string

Human-readable error message.

500
Schema OPTIONAL
details

Detailed error metadata. The contents of this field is determined by error_code.

error_code string

Error code is a string that specifies this error type.

message string

Human-readable error message.