curl -X DELETE https://allomia.com/api/organization/3f6c1d2e-8a4b-4f7e-9c21-5b0d7e4a9f13 \
-H "Authorization: Bearer sk-your-partner-key"
{
"message": "Organization deleted successfully",
"organizationId": "3f6c1d2e-8a4b-4f7e-9c21-5b0d7e4a9f13"
}
{
"error": "Organization not found"
}
Organizations (partner keys)
Delete organization
Deactivates a clinic in your partner account.
DELETE
/
api
/
organization
/
{id}
curl -X DELETE https://allomia.com/api/organization/3f6c1d2e-8a4b-4f7e-9c21-5b0d7e4a9f13 \
-H "Authorization: Bearer sk-your-partner-key"
{
"message": "Organization deleted successfully",
"organizationId": "3f6c1d2e-8a4b-4f7e-9c21-5b0d7e4a9f13"
}
{
"error": "Organization not found"
}
Deactivates a clinic. AlloMia keeps the clinic’s records but marks it inactive and deleted. After that:
If you retry a delete after a timeout and get
- The clinic no longer appears in List organizations, and Get organization returns
404. - Call endpoints used with a partner key return
404for the clinic and its calls. - Create outbound call with one of the clinic’s phone numbers returns
422.
Headers
Path parameters
The clinic’s organization ID, a UUID. See Finding IDs.
Response
Errors
| Status | Body | When |
|---|---|---|
400 | {"error": "Invalid Organization ID format. Must be a valid UUID."} | id isn’t a UUID. |
401 | {"error": "Invalid authorization"} | The key is a clinic key. Use a partner key. |
401 | {"error": "Unauthorized"} | The key is missing, malformed, unknown or deleted. |
403 | {"error": "Insufficient permissions"} | The key’s creator isn’t the partner account owner or a Tenant Admin. |
404 | {"error": "Organization not found"} | No active clinic with this ID in your partner account. This includes a clinic you already deleted. |
429 | {"error": "Too many requests", "retryAfter": 60} | See Rate limits. |
500 | {"error": "Failed to delete organization"} or {"error": "An unexpected error occurred. Please try again later."} | Unexpected server error. |
404, the first attempt most likely deleted the clinic already.
See Errors for the full list.
curl -X DELETE https://allomia.com/api/organization/3f6c1d2e-8a4b-4f7e-9c21-5b0d7e4a9f13 \
-H "Authorization: Bearer sk-your-partner-key"
{
"message": "Organization deleted successfully",
"organizationId": "3f6c1d2e-8a4b-4f7e-9c21-5b0d7e4a9f13"
}
{
"error": "Organization not found"
}