---
title: "Delete an email domain"
method: DELETE
path: "/email-domains/{id}"
tags: ["Email Domains"]
---

# Delete an email domain

`DELETE /email-domains/{id}`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/email-domains/{id}`
- Auth: HTTP bearer

By default this only removes the Temps-side record; the domain identity
on the provider (Scaleway/SES) is left intact, since it may be shared
with other tools against that provider account. Pass
`delete_from_provider=true` to also remove it on the provider's side. In
either case, the local record is deleted regardless of whether that
provider-side deletion succeeds — an unreachable provider never blocks
removing the domain from Temps.

## Path parameters

- `id` integer, required

## Query parameters

- `delete_from_provider` boolean

## Response `204`

Domain deleted

## Other responses

- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Domain not found
- `500`: Internal server error (includes provider-side cleanup failure; the local record is still deleted)

## Changes

- **2026-09-07** `504478bfd788`: 1 info
  - added the new optional `query` request parameter `delete_from_provider`
- **2026-09-07** `7a3103561bd0`: 1 warning
  - deleted the `query` request parameter `delete_from_provider`
- **2026-09-07** `f17c19cdda17`: 1 info
  - added the new optional `query` request parameter `delete_from_provider`
- **2026-09-07** `f7404eb7ac98`: 1 warning
  - deleted the `query` request parameter `delete_from_provider`
- **2026-09-07** `804f633e47cf`: 1 info
  - added the new optional `query` request parameter `delete_from_provider`

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/email-domains/:id/delete.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
