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

DELETE
/organizations/:id

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.

CodeCondition
NOT_OWNERCaller must be org owner or superadmin
ACTIVE_SUBSCRIPTIONCancel Stripe subscription (active, trialing, past_due, or incomplete)
WALLET_AUTO_RECHARGE_ENABLEDDisable wallet auto-recharge and clear pending schedule
ACTIVE_WHATSAPP_CHANNELSSoft-delete / disconnect all WhatsApp channels
ACTIVE_INSTAGRAM_CHANNELSSoft-delete / disconnect all Instagram channels
ACTIVE_MESSENGER_CHANNELSSoft-delete / disconnect all Messenger channels
ACTIVE_EMAIL_CHANNELSSoft-delete / disconnect all email channels
WEBCHAT_ENABLEDDisable webchat and clear webchat API key
ACTIVE_VOICE_PHONESRelease / soft-delete all voice phone numbers
ACTIVE_API_KEYSRevoke all organization API keys
AGENCY_HAS_CLIENTSReassign partner clients that point at this org
MCP_ENABLEDDisable MCP

Members, wallet balance, contacts, deals, and other CRM rows do not block deletion.

Preflight (recommended)

Inspect blockers before calling delete:

GET
/organizations/:id?delete_preflight=true

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_at is 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.