Аутентификация
Отправьте ключ API в качестве токена носителя (bearer token). Ключ должен иметь разрешение org.delete; ключ без него отклоняется с кодом 403, а не 404.
Идентификатор вашей организации
Этот эндпоинт принимает идентификатор вашей организации прямо в URL в качестве orgId. Подставьте его в путь — другие заголовки или параметры запроса не могут его заменить.
Идентификатор вашей организации находится на экране ключей API в вашей панели управления, рядом с самим ключом. Это один и тот же идентификатор для каждого вашего запроса.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X DELETE https://api.zinndigital.com/v1/orgs/{orgId} \
-H "Authorization: Bearer zdk_live_…"Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли
Подробнее
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.
Параметры
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
orgId (path) | Uuid | Да | Organization ID (UUIDv7). |
Ответ
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
org_id | Uuid | Да | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
sites_torn_down | Uuid[] | Да | — |
orgs_reparented | Uuid[] | Да | — |
domains_retained | Uuid[] | Да | — |
failures | string[][] | Да | `[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… |
Ошибки, которые может возвращать этот эндпоинт
401 · 403 · 404 · 409 · 429