Delete tenant API Reference
const url = 'https://api.kupe.cloud/api/v1/tenants/acme';const options = { method: 'DELETE', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"cascade":false,"confirm":"acme"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.kupe.cloud/api/v1/tenants/acme \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "cascade": false, "confirm": "acme" }'Request deletion of the tenant. Only the tenant owner (the contactEmail on the tenant) may call this,
and only with an OIDC bearer token. API keys are refused (403, code owner_required), as are other admins.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Tenant name
Request Body
Section titled “ Request Body ”Confirmation (and optional cascade)
object
Delete every cluster in the tenant first. Without it the request is refused (409 clusters_exist) while any cluster is not already terminating. Clusters are deleted one at a time, and deletion stops at the first cluster an app environment still uses (409 cluster_in_use), so some clusters may already be deleted. Delete apps first, and wait until they are gone. Never deletes databases or the registry: those always refuse the request (409 databases_exist, registries_exist) until deleted on their own.
Example
falseMust equal the tenant name in the path; guards against accidental deletion.
Example
acmeResponses
Section titled “ Responses ”Deletion accepted; tenant is Terminating
object
object
Always “Terminating” on acceptance; GET /tenants/{tenant} reports the same phase until the tenant is gone (then 404).
Example
{ "name": "acme", "status": { "phase": "Terminating" }}Confirm does not match the tenant name (code confirm_mismatch) or invalid body
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Missing or invalid authentication
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}API key or non-owner caller (code owner_required); not a member of this tenant
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Tenant not found (already gone)
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Active apps (code apps_exist), active databases (code databases_exist), a registry (code registries_exist), active clusters without cascade (code clusters_exist), a cluster an app environment still uses (code cluster_in_use) or already terminating (code already_terminating)
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Rate limit exceeded (one deletion request per minute per caller; see Retry-After)
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}