احراز هویت
یک کلید API را به عنوان یک توکن حامل ارسال کنید. این کلید باید دارای مجوز 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