Skip to main content

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​

ParameterTypeRequiredDescription
idstringYesOrganization 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_codeHTTPerror_typeMeaning
org_field_required400invalid_request_errorOrganization ID is missing from the path.
org_not_found404invalid_request_errorNo organization matches the provided ID.
org_access_denied403permission_errorThe organization belongs to a different account.
org_delete_failed500api_errorUnexpected 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