tenancy
DELETE /v1/orgs/{orgId}
Close an organization.
Xác thực
Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền org.delete; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.
Nơi điền id tổ chức của bạn
Endpoint này nhận mã tổ chức của bạn trực tiếp trong URL dưới dạng orgId. Hãy thay thế nó vào đường dẫn — không có header hoặc query parameter nào có thể thay thế được.
Mã tổ chức của bạn nằm ở màn hình khóa API trong bảng điều khiển, ngay bên cạnh khóa đó. Đây là cùng một mã trong mọi lệnh gọi mà bạn thực hiện.
Dùng thử
Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.
curl -X DELETE https://api.zinndigital.com/v1/orgs/{orgId} \
-H "Authorization: Bearer zdk_live_…"Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API
Chi tiết
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.
Tham số
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
orgId (path) | Uuid | Có | Organization ID (UUIDv7). |
Phản hồi
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
org_id | Uuid | Có | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
sites_torn_down | Uuid[] | Có | — |
orgs_reparented | Uuid[] | Có | — |
domains_retained | Uuid[] | Có | — |
failures | string[][] | Có | [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… |
Các lỗi điểm cuối này có thể trả về
401 · 403 · 404 · 409 · 429