---
title: "Delete custom domain"
method: DELETE
path: "/v1/domains/{id}"
tags: ["domains"]
---

# Delete custom domain

`DELETE /v1/domains/{id}`

## Request

- Base URL: `https://api.openmail.sh`
- URL: `https://api.openmail.sh/v1/domains/{id}`
- Auth: HTTP bearer

Remove a custom domain from your account. The domain must have no inboxes — delete those first. This does not remove the DNS records from your registrar. An account-wide key may delete any domain; a pod-scoped key may delete only a domain scoped to its own pod, never an account-wide domain. Inbox-scoped keys cannot manage domains.

## Path parameters

- `id` string, required

## Response `204`

Domain deleted

## Other responses

- `403`: The API key is scoped and cannot manage domains (`forbidden`)
- `404`: Not found
- `422`: The domain still has inboxes (`domain_has_inboxes`)

---

[API](https://skmtc.dev/openmail/apis/openmail-api.md) · [All operations](https://skmtc.dev/openmail/apis/openmail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/openmail/apis/openmail-api/revisions/b943eecca7e2?raw)
