Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão org.delete; uma chave sem ela é recusada com 403, e não 404.
Onde vai o ID da sua organização
Este endpoint aceita o ID da sua organização diretamente na URL, como orgId. Substitua-o no caminho — não há cabeçalho ou parâmetro de consulta que sirva como alternativa.
O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
curl -X DELETE https://api.zinndigital.com/v1/orgs/{orgId} \
-H "Authorization: Bearer zdk_live_…"Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
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.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
orgId (path) | Uuid | Sim | Organization ID (UUIDv7). |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
org_id | Uuid | Sim | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
sites_torn_down | Uuid[] | Sim | — |
orgs_reparented | Uuid[] | Sim | — |
domains_retained | Uuid[] | Sim | — |
failures | string[][] | Sim | `[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… |
Erros que este endpoint pode retornar
401 · 403 · 404 · 409 · 429