Bulk delete organizations
const url = 'http://localhost:3000/api/v1/organizations/bulk';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/bulk \ --header 'X-API-Key: <X-API-Key>'Purges multiple organizations, cascading through each org’s devices, deployments and applications (soft-deleted) before removing the org itself. The organization the caller is currently operating in (active tenant) is never deleted — it is dropped from the request and reported in the errors array as skipped. The response reports how many organizations were purged, the aggregated cascade counts, and a per-organization error for any that could not be removed. Requires Super Admin privileges.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Bulk delete completed
object
Number of organizations successfully purged
Per-organization error messages for any that could not be purged (e.g. the active tenant, which is always skipped)
Total devices soft-deleted across all purged organizations
Total deployments soft-deleted (cancelled) across all purged organizations
Total application packages soft-deleted across all purged organizations
Example generated
{ "deleted": 1, "errors": [ "example" ], "devices": 1, "deployments": 1, "applications": 1}Unauthorized
Forbidden - Super Admin required