Delete Organization
Permanently deletes an organization.
warning
Deleting an organization is permanent and cannot be undone. All cases associated with the organization will lose their organization link.
Endpoint
DELETE /api/organizations/:id
Authentication
Requires API Key authentication.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Organization ID |
Response
Returns a confirmation message.
{
"success": true,
"data": {
"message": "Organization deleted successfully"
}
}
Example
curl -X DELETE "https://api.silentwitness.ai/api/organizations/org_abc123def456" \
-H "X-API-Key: $API_KEY"
Errors
error_code | HTTP | error_type | Meaning |
|---|---|---|---|
org_field_required | 400 | invalid_request_error | Organization ID is missing from the path. |
org_not_found | 404 | invalid_request_error | No organization matches the provided ID. |
org_access_denied | 403 | permission_error | The organization belongs to a different account. |
org_delete_failed | 500 | api_error | Unexpected server error during deletion. Include request_id when contacting support. |
Example Error
{
"success": false,
"error": "Organization not found",
"error_code": "org_not_found",
"error_type": "invalid_request_error",
"error_param": "id",
"request_id": "req_9c1b3a7e4d2f4a80a9b3e7c1f8d2a4b6"
}
Notes
- Deletion is permanent — there is no soft-delete or restore
- Cases previously linked to the organization will retain their data but lose the organization reference
- Consider updating or reassigning cases before deleting an organization