Delete an Organization
Soft-delete an organization by setting deleted_at. Associated CRM data is retained but the organization becomes inaccessible through normal API and abilities filtering.
Endpoint
Authorization
Only the organization owner or a platform superadmin may delete an organization.
Preconditions
The delete fails with 400 Bad Request (or 403 Forbidden for ownership) until every blocker is resolved. Resolve each blocker using existing product flows (billing, channels, API keys, etc.), then retry.
| Code | Condition |
|---|---|
NOT_OWNER | Caller must be org owner or superadmin |
ACTIVE_SUBSCRIPTION | Cancel Stripe subscription (active, trialing, past_due, or incomplete) |
WALLET_AUTO_RECHARGE_ENABLED | Disable wallet auto-recharge and clear pending schedule |
ACTIVE_WHATSAPP_CHANNELS | Soft-delete / disconnect all WhatsApp channels |
ACTIVE_INSTAGRAM_CHANNELS | Soft-delete / disconnect all Instagram channels |
ACTIVE_MESSENGER_CHANNELS | Soft-delete / disconnect all Messenger channels |
ACTIVE_EMAIL_CHANNELS | Soft-delete / disconnect all email channels |
WEBCHAT_ENABLED | Disable webchat and clear webchat API key |
ACTIVE_VOICE_PHONES | Release / soft-delete all voice phone numbers |
ACTIVE_API_KEYS | Revoke all organization API keys |
AGENCY_HAS_CLIENTS | Reassign partner clients that point at this org |
MCP_ENABLED | Disable MCP |
Members, wallet balance, contacts, deals, and other CRM rows do not block deletion.
Preflight (recommended)
Inspect blockers before calling delete:
json
Request
Success response
Returns the soft-deleted organization record (includes deleted_at).
json
Error response (blockers remaining)
json
Notes
- Soft delete only — there is no hard delete cascade of tenant tables.
- After
deleted_atis set, the organization is excluded from user org lists and abilities. - Inbound WhatsApp / Instagram / Messenger webhooks skip processing for deleted organizations (and for canceled subscriptions).
Report an issue with this documentation
Please log in to report issues with our documentation.