Remove a domain
Remove a custom domain no page is using.
DELETE /organizations/{org}/domains/{domainId}
Removes the domain. While a page still uses it as its custom domain, clear the page’s customDomain first.
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) |
domainId | string | The domain, dom_… |
Response
204 No Content
Errors
| Status | error | When |
|---|---|---|
403 | forbidden | You are not an owner of the org |
404 | not_found | No such domain in this org, or the id is not a dom_ id |
409 | conflict | A page still uses the domain. The detail names the pages |
404 | not_found | The org does not exist, or your token cannot manage it |
Example
curl -X DELETE https://loginwith.loginwith.dev/organizations/acme/domains/dom_65f1c2a9e4b0d3f7a1c8e907 \
-H "Authorization: Bearer $TOKEN"