---
title: "Add a managed domain to a provider"
method: POST
path: "/dns-providers/{id}/domains"
tags: ["DNS Providers"]
---

# Add a managed domain to a provider

`POST /dns-providers/{id}/domains`

## Request

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

## Path parameters

- `id` integer, required

## Request body

- AddManagedDomainApiRequest: Request to add a managed domain
  - `auto_manage` boolean
  - `domain` string, required
  - `generated_hostname_mode` string, nullable: Generated hostname layout: `"standard"` (default) or `"flat"`.
  - `proxied_by_default` boolean
  - `sync_generated_records` boolean: Opt in to reconciling generated hostnames into this domain's DNS zone.

## Response `201`

Managed domain added

- 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

- `400`: Invalid request
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Provider not found

## Changes

- **2026-10-05** `4b228ebed583`: 2 info
  - added the new optional request property `proxied_by_default`
  - added the required property `proxied_by_default` to the response with the `201` status
- **2026-10-05** `63a80791dc58`: 1 breaking, 1 warning
  - removed the required property `proxied_by_default` from the response with the `201` status
  - removed the request property `proxied_by_default`
- **2026-10-03** `de8387218c0b`: 2 info
  - added the new optional request property `proxied_by_default`
  - added the required property `proxied_by_default` to the response with the `201` status
- **2026-07-27** `1b060c0a4ba3`: 6 info
  - added the new optional request property `generated_hostname_mode`
  - added the new optional request property `sync_generated_records`
  - added the optional property `zone_access_error` to the response with the `201` status
  - added the optional property `zone_access_ok` to the response with the `201` status
  - …2 more
- **2026-01-11** `50604ba8d4a8`: 1 info
  - endpoint added

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