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.
The body must repeat the tenant name in confirm. While the tenant has clusters that are not already
terminating the request is refused with 409 (code clusters_exist, the message lists their names) unless
cascade is true, in which case those clusters are deleted first.
Deletion is asynchronous: on 202 the Tenant enters status.phase=Terminating; GET /tenants/{tenant}
reports that phase until the platform has finished tearing the tenant down, then returns 404.
A tenant that was ever billable is held until its final invoice settles (up to 24h).
Rate limited to one request per minute per caller (429 with Retry-After). Every request is
recorded as a Kubernetes Event (TenantDeletionRequested) on the tenant.
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 ManagedCluster in the tenant first. Without it the request is refused (409 clusters_exist) while any cluster is not already terminating.
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 clusters without cascade (code clusters_exist) 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"}