CustomDomain™ docs
API referenceProvider accounts

Connect domains with the account

POST
/provider-accounts/{id}/connect

Creates a connection for each domain under the application and writes its records with the account's key (keeping the CAA and TXT values already there and recording what each write replaced). Each domain is linked to the account; a continuous account then keeps them in sync. A domain the application already serves is only linked. A one time account deletes its key once the domains are connected, even when the caller has gone away by then, and past its hour answers 409. A domain in a zone the key does not reach fails alone (zone_not_reached on the connection); the account is flagged needs_reconnect only when the provider refuses the key itself, which is checked with a request that does not depend on the zone. Takes an admin, an owner or the member who connected the account.

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

application/json

application/json

curl -X POST "https://example.com/provider-accounts/string/connect" \  -H "Content-Type: application/json" \  -d '{    "application_id": "string",    "domains": [      "string"    ]  }'
{  "results": [    {      "domain": "string",      "connection_id": "string",      "status": "connected",      "message": "string"    }  ],  "account": {    "id": "string",    "kind": "api_key",    "provider": "string",    "provider_name": "string",    "label": "string",    "access": "continuous",    "scope": "all",    "domains": [      "string"    ],    "credential_held": true,    "status": "active",    "last_error": "string",    "created_by": "string",    "last_used_at": "2019-08-24T14:15:22Z",    "expires_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "connections": [      {        "id": "string",        "application_id": "string",        "domain": "string",        "status": "string"      }    ],    "uses": [      "string"    ],    "can_manage": true  }}
{  "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"}