Deleting a domain stops all sending from it. Do it when you no longer use a domain, when you want to move it to another team, or when you need to re-add it with a different return path.
What happens when you delete a domain
- Sending stops at once. Any email with a
fromon that domain fails with403 domain_not_found. - API keys limited to the domain are deleted. They could not send anywhere else. Keys not limited to a domain are not touched.
- History is kept. Emails sent from it stay in Emails with their events.
- The name is free. You or another team can add it again straight away.
- It is recorded. The deletion appears in the Audit log as
domain.deleted, and adomain.deletedwebhook fires if you subscribe to it.
Emails already scheduled from the domain are not removed by the deletion. Cancel them first if they should not go out: see Scheduled emails.
Before you delete
- Check which keys are limited to the domain: open API keys and look at the Domain column.
- Make sure no app still sends from the domain, or switch it to another verified domain first.
- If you are re-adding the domain, have DNS access ready: you will publish new records.
To delete in the dashboard
You need the admin or developer role.
- Open Domains and select the domain.
- Choose Delete domain.
- Read the confirmation and choose Delete domain again.
You see “Domain deleted.” and return to the list.
To delete with the API
Use a full-access key:
curl -X DELETE https://api.mailcandor.com/v1/domains/DOMAIN_ID \
-H "Authorization: Bearer $MAILCANDOR_KEY"
The answer is:
{ "object": "domain", "id": "DOMAIN_ID", "deleted": true }
Find the id with GET /v1/domains.
To move a domain to another team
- Delete it from the current team.
- On the other team, add it under Domains with New domain.
- Publish the new records shown there and press Check DNS now. Copy the DKIM values again; do not reuse the old ones.
After deleting
If you will not add the domain back, remove the Mailcandor records at your DNS provider: the three ._domainkey CNAMEs, the TXT and MX on send (or your custom return path), and the DMARC record if you added it only for Mailcandor. Keep DMARC if other services send as your domain.
If it does not work
- No Delete domain button: your role is viewer or billing.
404 not_found: the id is wrong, or the domain belongs to another team.- An app broke after the deletion: it used a key limited to the domain, which was deleted, or it sends from that domain. Create a new key or change its
from.