Skip to content

Delete a domain

Remove a sending domain. It can no longer be sent from.

http
DELETE /v1/domains/{id}

Requires a Full access API key.

Path parameters

ParameterTypeRequiredDescription
idstringYesThe domain id.

Example

bash
curl -X DELETE "https://api.sendgrail.com/v1/domains/$DOMAIN_ID" \
  -H "Authorization: Bearer $SENDGRAIL_API_KEY"
js
await fetch(`https://api.sendgrail.com/v1/domains/${id}`, {
  method: 'DELETE',
  headers: { Authorization: `Bearer ${process.env.SENDGRAIL_API_KEY}` },
});

Response

json
{
  "object": "domain",
  "id": "5f1c3a9e-0d42-4b7c-9a63-2e8b41d7c015",
  "deleted": true
}

What deleting does

Deleting removes the sending identity: the domain can no longer be sent from, and the identity is torn down at the mail provider so it isn't left orphaned. The DNS records you added at your registrar are yours — deleting the domain here doesn't touch them, so remove them yourself if you no longer want them.

Re-adding the domain later gives it a new DKIM key and a fresh set of records to publish; the old ones won't verify it. If you only want to stop tracking or change TLS, update the domain instead of deleting it.

Errors

A domain belonging to another team answers 404. A Sending access key answers 403. See Errors.

Transactional email on your own domain.