CustomDomain™ docs
API referenceManaged DNS

Start managed DNS for a connection's domain

POST
/connections/{id}/managed-dns

Offers the connection's end user a one-time change instead of typing records: point the domain's nameservers at CustomDomain™, and we host the zone and write every record from then on.

The first call creates a hosted zone for the connection's REGISTRABLE domain (acme.com, also for shop.acme.com), copies the records the domain already serves at common names (apex A/AAAA/MX/TXT/CAA, www, mail hosts, DMARC, common DKIM selectors, common SRV names, and every name the connection needs) so nothing breaks at the switch, adds the records CustomDomain™ needs for the connection, looks up the registrar, and answers 201 with the zone. Later calls answer 200 with the same zone; nothing is created twice. A second connection under the same registrable domain joins the existing zone. The zone becomes active once every nameserver the registry lists for the domain is ours; the connection then verifies and goes live on its own.

Available only when managed_dns.available is true on POST /v1/domains:check (the deployment flag is on, and the domain's nameservers can be changed at a registrar). Authorized like the other connection routes: an API key within the tenant, or a widget token of the connection's own application (and domain, when the token is bound to one).

AuthorizationBearer <token>

Long-lived tenant API key, cd_live_… (production) or cd_test_… (staging, development), stored hashed. Keys created before the switch to cd_ start with sk_live_… / sk_test_… and are still accepted. Scoped to the owning application's tenant.

In: header

Path Parameters

id*string

Request Body

application/json

No parameters. Send no body, or {}.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/connections/string/managed-dns" \  -H "Content-Type: application/json" \  -d '{}'
{  "zone": "acme.com",  "status": "awaiting_delegation",  "nameservers": [    "string"  ],  "observed_nameservers": [    "string"  ],  "registrar": {    "name": "string",    "url": "string"  },  "records": [    {      "id": "mdr_1f3a9c0b7d2e5a4c6b8d",      "type": "A",      "name": "string",      "value": "string",      "ttl": 0,      "priority": 0,      "source": "discovered"    }  ],  "warnings": [    "string"  ],  "checked_at": "2019-08-24T14:15:22Z",  "activated_at": "2019-08-24T14:15:22Z"}
{  "zone": "acme.com",  "status": "awaiting_delegation",  "nameservers": [    "string"  ],  "observed_nameservers": [    "string"  ],  "registrar": {    "name": "string",    "url": "string"  },  "records": [    {      "id": "mdr_1f3a9c0b7d2e5a4c6b8d",      "type": "A",      "name": "string",      "value": "string",      "ttl": 0,      "priority": 0,      "source": "discovered"    }  ],  "warnings": [    "string"  ],  "checked_at": "2019-08-24T14:15:22Z",  "activated_at": "2019-08-24T14:15:22Z"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}