CustomDomain Docs
ReferenceAPI referenceApplications

Point this application's customer domains at your own infrastructure

set connect target: reference page for this CustomDomain™ API operation in the applications group. Covers parameters, request body, responses and error codes.

PUT
/applications/{id}/connect-target

Available on every plan (it is how a Connect-only plan gets domains that serve). cname_target must be a public hostname that is not the platform edge; send "" to go back to the edge. apex_ipv4 (up to 4 public IPv4 addresses) is what root domains get on DNS providers with no ALIAS-style record; without it such roots cannot be pointed at a hostname and POST /domains:check reports apex_strategy: unsupported.

Applies to new connections and to domains still waiting for DNS (pending or failed, with no records supplied or written for them). Connected domains keep the routing they connected with (their routing field); move one with POST /v1/connections/{id}:retarget. existing_domains in the response counts both.

Refused (400) when cname_target resolves to the platform edge (a CNAME to it, or one of its addresses), or when apex_ipv4 lists an edge address: such domains would verify but never be served. A cname_target that does not resolve yet, or a target with no apex_ipv4, is accepted with a warnings entry. Every change is recorded in the audit log (app.routing_set, app.routing_cleared). A delegated agent token needs app:write.

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

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/applications/string/connect-target" \  -H "Content-Type: application/json" \  -d '{    "cname_target": "string"  }'
{  "application_id": "string",  "mode": "edge",  "connect_target": {    "cname_target": "string",    "apex_ipv4": [      "string"    ]  },  "edge": {    "cname_target": "string",    "apex_ipv4": [      "string"    ]  },  "warnings": [    "string"  ],  "existing_domains": {    "moved": 0,    "kept": 0  }}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}