Delete organization
const url = 'http://localhost:3000/api/v1/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'DELETE', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url http://localhost:3000/api/v1/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'X-API-Key: <X-API-Key>'Deletes an organization. When force=true, performs cascading deletion of all users, devices, deployments, and applications. Multi-tenant users keep their account and lose membership in this org only; single-tenant users are hard-deleted. Requires Super Admin privileges.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization UUID
Query Parameters
Section titled “Query Parameters”When set to true, performs cascading deletion across users, devices, deployments, and applications. Optional.
Header Parameters
Section titled “Header Parameters”UUID of the organization (tenant) the request acts in. It selects the tenant and grants nothing: the server checks membership or an open tenant switch. Not needed for global operations. A malformed value returns 400. API keys are fixed to their own organization; another organization returns 403. The x-organization-source header grants nothing.
Responses
Section titled “Responses”Organization force-deleted with cascade summary
object
Number of OrganizationUser memberships removed from this tenant
Number of users hard-deleted because the deleted tenant was their only membership
Number of users that kept their account because they belong to at least one other tenant
Number of devices soft-deleted as part of the cascade
Number of deployments soft-deleted (cancelled) as part of the cascade
Number of application packages soft-deleted as part of the cascade
Examplegenerated
{ "removedMemberships": 1, "deletedUsers": 1, "switchedUsers": 1, "deletedDevices": 1, "cancelledDeployments": 1, "deletedApplications": 1}Organization deleted successfully (no force)
Unauthorized
Forbidden - Super Admin required
Organization not found
Organization has active resources or is your own