E015: Delete organization
DELETE /api/organizations/current
Tears down a tenant organization and all its data. Triggered from the Organization page by the owner. This is the most destructive workflow in the platform; everything in the tenant goes, GCS objects included.
Authentication
Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Owner.
Request
No body. Targets the org carried in X-Org-Id.
Response — 200 OK
{ "deletedId": "uuid" }
Echo of the deleted current's id.
Errors
| HTTP | code | Condition |
|---|---|---|
| 403 | forbidden | Caller is not the org owner. |
| 409 | in_use | Org still has dependent records that block hard delete (see L3 for the exact list). |
Workflow
Calls W015 Delete organization.