Remove a domain
Removes the domain from the workspace. Its addresses stop receiving, mail from it can no longer be sent, its tracking and files domains stop answering, and `domain.deleted` fires. Mail already received stays in the mailbox.
Runs the real call against your workspace, with your own key.
DELETE /domains/{id}
Removes the domain from the workspace. Its addresses stop receiving, mail from it can no longer be sent, its tracking and files domains stop answering, and domain.deleted fires. Mail already received stays in the mailbox.
Example
Needs domains:write. A key limited to particular addresses or domains needs to hold the whole domain.
curl -X DELETE "$OE/domains/b3e1f0a4-6c2d-4e8a-9f17-2d5c8a0b4e6f" -H "$AUTH"{ "object": "domain", "id": "b3e1f0a4-6c2d-4e8a-9f17-2d5c8a0b4e6f", "domain": "acme.com", "deleted": true, "leftBehind": []}Records OpenEmail wrote for you through a connected DNS account are withdrawn. Anything it could not withdraw is listed in leftBehind, and records you published by hand stay where they are until you remove them.
The last domain in a workspace cannot be removed through the API and answers 409 last_domain, because removing it in the app deletes the whole mailbox with it. Do that in the app, where it is confirmed first.
A domain that holds reserved account addresses answers 409 domain_holds_reserved_addresses.