---
title: "Give a tenant's domain back to the account"
method: DELETE
path: "/tenants/{id}/domains/{domain}"
tags: ["Tenants"]
---

# Give a tenant's domain back to the account

`DELETE /tenants/{id}/domains/{domain}`

## Request

- Base URL: `https://api.groundmail.dev`
- URL: `https://api.groundmail.dev/tenants/{id}/domains/{domain}`
- Auth: HTTP bearer

The domain itself stays; every tenant can send from it again.

## Response `200`

The domain, now account-wide

- object
  - `domain` Domain, required
    - `id` string, required
    - `name` string, required
    - `status` 'pending' | 'verified' | 'failed', required
    - `created_at` string, date-time, required
    - `verified_at` string, date-time, nullable, required
    - `open_tracking` boolean, required: Open tracking preference for this domain.
    - `click_tracking` boolean, required: Click tracking preference for this domain.
    - `tracking_status` 'disabled' | 'pending' | 'active' | 'error', required: Whether open/click tracking is applied to outgoing mail. `disabled` when both preferences are off, `pending` until the tracking CNAME is accepted and a certificate is issued for the tracking hostname (links and opens are not tracked yet; this takes a few minutes after the CNAME is added), `active` once both are done, `error` when tracking or the certificate could not be set up. Re-checked when you verify the domain and when you read it.
    - `tracking_error` string, nullable, required: Why tracking is not active yet, when `tracking_status` is `pending` or `error`.
    - `tls_mode` 'opportunistic' | 'enforced', required: Preferred outbound TLS behavior for this domain.
    - `inbound_enabled` boolean, required: True when Groundmail should accept inbound mail for this domain.
    - `inbound_status` 'disabled' | 'pending' | 'active' | 'error', required: `pending` before verification, `active` once inbound receiving is configured, or `error` when setup fails.
    - `inbound_error` string, nullable, required: Last inbound configuration error, if any.
    - `inbound_spam_threshold` number, nullable: Received mail scoring at or above this is `spam` (and dropped when `inbound_spam_action` is `drop`). Null uses the default (10) and drops nothing.
    - `inbound_spam_action` 'flag' | 'drop': `flag` keeps spam with `spam_status: spam`; `drop` discards it (no stored email, no webhook).
    - `tenant` string: The `external_id` of the tenant that owns this domain. Present only on a tenant's domain.

## Other responses

- `404`: The tenant has no such domain

---

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