tenancy

DELETE /v1/orgs/{orgId}

Close an organization.

All tenancy endpoints

Authentication

Send an API key as a bearer token. The key must carry the org.delete permission; a key without it is refused with 403, not 404.

Where your organisation id goes

This endpoint takes your organisation id in the URL itself, as orgId. Substitute it into the path — there is no header or query parameter that will do instead.

Your organisation id is on the API keys screen in your dashboard, beside the key itself. It is the same id in every call you make.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X DELETE https://api.zinndigital.com/v1/orgs/{orgId} \
  -H "Authorization: Bearer zdk_live_…"

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

Closes the account: re-parents its client orgs to Zinn® (D-W15-11), tears every one of its own sites down through the ordinary `SiteTeardownWorkflow` (so they land in `DeletedSite` and stay restorable for the whole retention window), and **keeps its domains renewing** (D-W15-12). Requires `org.delete` **on that org** — held by the customer `owner` and by `super_admin`, so this is a customer's own decision as well as a staff one. ⛔ **An org that owes money is suspended, never torn down** (D-W15-13): the balance check runs first, performs the suspension itself, and answers **409**. Closing is not a route out of an unpaid invoice. ⛔ Answers **200 with the result**, not 204: `failures` is what says a run was partial and left the org OPEN for a retry, and the counts are what an operator reconciles a vendor invoice against.

Parameters

NameTypeRequiredWhat it is
orgId (path)UuidYesOrganization ID (UUIDv7).

Response

NameTypeRequiredWhat it is
org_idUuidYesUUIDv7 identifier — sortable by creation time (docs/02 §8).
sites_torn_downUuid[]Yes
orgs_reparentedUuid[]Yes
domains_retainedUuid[]Yes
failuresstring[][]Yes`[site_id, error_class]` pairs for sites whose teardown could not be armed. ⛔ **Non-empty means the org is still OPEN** and the closure should be retried — it is never silently…

Errors this endpoint can return

401 · 403 · 404 · 409 · 429