Delete a tenant
Delete a tenant, unless it is the organization's last.
DELETE /organizations/{org}/tenants/{tenantId}
Deletes the tenant. An org must keep at least one, so the last one cannot be deleted.
Authorization
Org owner. Anyone else gets 403 forbidden.
Path parameters
| Name | Type | Description |
|---|---|---|
org | string | The organization: its id (org_…) or its slug. It has to be an org your token can manage (see Who can call it) |
tenantId | string | The tenant, tnt_… |
Response
204 No Content
Errors
| Status | error | When |
|---|---|---|
403 | forbidden | You are not an owner of the org |
404 | not_found | No such tenant in this org, or the id is not a tnt_ id |
409 | conflict | It is the org’s last tenant |
404 | not_found | The org does not exist, or your token cannot manage it |
Example
curl -X DELETE https://loginwith.loginwith.dev/organizations/acme/tenants/tnt_65f1c2a9e4b0d3f7a1c8e908 \
-H "Authorization: Bearer $TOKEN"