---
title: "Update Domain"
method: PATCH
path: "/v0/domains/{domain_id}"
tags: ["Domains"]
---

# Update Domain

`PATCH /v0/domains/{domain_id}`

**CLI:**
```bash
agentmail domains update --domain-id <domain_id>
```

## Path parameters

- `domain_id` string, required — The ID of the domain.

## Request body

- UpdateDomainRequest — Provide at least one of `feedback_enabled` or `subdomains_enabled`. Omitted fields are left unchanged; an empty body is rejected. Enabling `subdomains_enabled` on a verified domain returns it to `PENDING` until the newly-required wildcard MX record (`*.<domain>`) is published and verified.
  - `feedback_enabled` boolean — Bounce and complaint notifications are sent to your inboxes.
  - `subdomains_enabled` boolean — Allow inboxes on any subdomain of this domain. Adds a required wildcard MX record (`*.<domain>`) to `records`.

## Response `200`

- Domain
  - `pod_id` string — ID of pod.
  - `domain_id` string, required — The ID of the domain.
  - `domain` string, required — The name of the domain (e.g., `example.com`).
  - `status` 'NOT_STARTED' | 'PENDING' | 'INVALID' | 'FAILED' | 'VERIFYING' | 'VERIFIED', required
  - `feedback_enabled` boolean, required — Bounce and complaint notifications are sent to your inboxes.
  - `subdomains_enabled` boolean, required — Allow inboxes on any subdomain of this domain. Adds a required wildcard MX record (`*.<domain>`) to `records`.
  - `records` VerificationRecord[], required — A list of DNS records required to verify the domain. Includes a wildcard MX record (`*.<domain>`) when `subdomains_enabled` is true.
    - `type` 'TXT' | 'CNAME' | 'MX', required
    - `name` string, required — The name or host of the record.
    - `value` string, required — The value of the record.
    - `status` 'MISSING' | 'INVALID' | 'VALID', required
    - `priority` integer, nullable — The priority of the MX record.
  - `client_id` string — Client ID of domain.
  - `updated_at` string, date-time, required — Time at which the domain was last updated.
  - `created_at` string, date-time, required — Time at which the domain was created.

## Other responses

- `404`

## Changes

- **2026-07-15** `394ddcdd9c29` — 5 info
  - added the new optional request property `subdomains_enabled`
  - added the optional property `code` to the response with the `404` status
  - added the optional property `docs` to the response with the `404` status
  - added the optional property `fix` to the response with the `404` status
  - …1 more
- **2026-03-31** `27965096e618` — 1 info
  - endpoint added
- **2026-03-28** `8a5b5e92ae2d` — 1 breaking
  - api removed without deprecation
- **2026-03-19** `7fdcd6b4651f` — 1 breaking, 7 info
  - the `status` response's property type/format changed from `string`/`` to ``/`` for status `200`
  - removed the `FAILED` enum value from the `status` response property for the response status `200`
  - removed the `INVALID` enum value from the `status` response property for the response status `200`
  - removed the `NOT_STARTED` enum value from the `status` response property for the response status `200`
  - …4 more
- **2026-03-09** `b1919d0d52ac` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agentmail-to/apis/api/changes/v0/domains/:domain_id/patch.md)

---

[API](https://skmtc.dev/agentmail-to/apis/api.md) · [All operations](https://skmtc.dev/agentmail-to/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agentmail-to/api/revisions/394ddcdd9c29/schema)
