Delete a tenant
DELETE
/tenants/{id}
const url = 'https://localhost:3000/api/v1/tenants/example';const options = { method: 'DELETE', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"transfer_triggers":true}'};
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://localhost:3000/api/v1/tenants/example \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "transfer_triggers": true }'Deletes a tenant. Owner only. With transfer_triggers=true its triggers move to the owner’s personal account (private, out of any group); with false (the default when the body is omitted) they are deleted with their events, panes and access grants. Returns 409 trigger_name_conflict, with the colliding names, when a transferred trigger shares its name with one the owner already has; nothing is changed.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Tenant ID (UUID)
Request Body
Section titled “Request Body”Delete options
Media typeapplication/json
object
transfer_triggers
required
TransferTriggers moves the tenant’s triggers to the owner’s personal account (private, out of any group) instead of deleting them with their events. Defaults to false.
boolean
Example
trueResponses
Section titled “Responses”No Content
Media typeapplication/json
Invalid request
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Unauthorized
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Not the owner
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Tenant not found
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Trigger name conflict on transfer
Media typeapplication/json
object
error
required
string
message
string
names
required
Array<string>
Example
{ "error": "trigger_name_conflict", "message": "trigger names already used by the owner", "names": [ "signups", "deploys" ]}Internal error
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}