---
title: "Update a managed domain's settings (hostname mode, sync opt-in, auto-manage)."
method: PATCH
path: "/dns-providers/{provider_id}/domains/{domain}"
tags: ["DNS Providers"]
---

# Update a managed domain's settings (hostname mode, sync opt-in, auto-manage).

`PATCH /dns-providers/{provider_id}/domains/{domain}`

## Request

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

## Path parameters

- `provider_id` integer, required
- `domain` string, required

## Request body

- UpdateManagedDomainApiRequest: Request to update a managed domain's settings.
  - `auto_manage` boolean, nullable: Toggle automatic DNS management for this domain.
  - `generated_hostname_mode` string, nullable: `"standard"` or `"flat"`. Persisted as-is; switching to `"flat"` does not recompute existing hostnames — use the apply endpoint for that.
  - `proxied_by_default` boolean, nullable: Default proxy mode for newly managed records; `false` is an explicit override.
  - `sync_generated_records` boolean, nullable: Toggle DNS record sync for this domain.

## Response `200`

Managed domain updated

- ManagedDomainResponse: Managed domain response
  - `auto_manage` boolean, required
  - `created_at` string, required
  - `domain` string, required
  - `generated_hostname_mode` string, required: Generated hostname layout: `"standard"` or `"flat"`.
  - `id` integer, required
  - `provider_id` integer, required
  - `proxied_by_default` boolean, required
  - `sync_generated_records` boolean, required: Whether generated hostnames are reconciled into the provider's DNS zone.
  - `updated_at` string, required
  - `verification_error` string, nullable
  - `verified` boolean, required
  - `verified_at` string, nullable
  - `zone_access_error` string, nullable: Detail for a failed zone-access check.
  - `zone_access_ok` boolean, nullable: Last token zone-access check: `Some(true)`/`Some(false)`/`None` (unchecked).
  - `zone_id` string, nullable

## Other responses

- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Domain not found
- `409`: Turning off automatic management refused while domain delivery bindings use the zone, or a hostname-mode change refused while another generated-hostname operation runs on the zone (retryable)

## Changes

- **2026-11-09** `12896146b193`: 1 breaking
  - removed the required property `extensions` from the response with the `409` status
- **2026-10-05** `4b228ebed583`: 3 info
  - added the new optional request property `proxied_by_default`
  - added the non-success response with the status `409`
  - added the required property `proxied_by_default` to the response with the `200` status
- **2026-10-05** `63a80791dc58`: 1 breaking, 1 warning, 1 info
  - removed the required property `proxied_by_default` from the response with the `200` status
  - removed the request property `proxied_by_default`
  - removed the non-success response with the status `409`
- **2026-10-03** `de8387218c0b`: 3 info
  - added the new optional request property `proxied_by_default`
  - added the non-success response with the status `409`
  - added the required property `proxied_by_default` to the response with the `200` status
- **2026-07-27** `1b060c0a4ba3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/dns-providers/:provider_id/domains/:domain/patch.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)
