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

# Update Domain

`PATCH /v0/pods/{pod_id}/domains/{domain_id}`

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

## Path parameters

- `pod_id` string, required — ID of pod.
- `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`

---

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