Docs
API · domains

Delete a domain

Remove a domain and tear down its DKIM identity. Allowed only when the domain has never been used to send — history is kept immutable.

DELETE/v1/domains/{id}

Deleting a domain removes it from the project and, when no sibling project still uses the same domain name, releases the underlying sending identity. This is the path to take when you mistyped a domain and want to re-add it cleanly.

01 Path parameters

idstringRequired
The domain id to delete, for example dom_01HZ8K3M9P.

02 Request

curl -X DELETE https://api.drin.run/v1/domains/dom_01HZ8K3M9P \
  -H "Authorization: Bearer $DRIN_API_KEY"

03 Response

204 No Content on success — there is no response body.

409 on sending historyA domain that has ever sent mail cannot be deleted — the request is refused with 409 Conflict so the audit trail stays intact. Disable receiving or stop sending from it instead.
JSON
{
  "error": {
    "type": "conflict",
    "message": "Domain has sending history and cannot be deleted."
  }
}