TEASEDocs
API ReferenceLandings

Connect a custom domain

Begin connecting a custom domain: registers a pending domain and returns the DNS instructions the customer must apply. First step of the connect state machine (enter to instructions to verify to active). Requires a write-scoped key.

Authorization

bearerAuth
AuthorizationBearer <token>

Your al_live_<prefix>_<secret> API key. Mint and manage keys in the dashboard.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

POST
/api/admin/domains/connect
curl -X POST "https://example.com/api/admin/domains/connect" \  -H "Content-Type: application/json" \  -d '{    "hostname": "go.creator.com",    "provider": "cloudflare"  }'
{  "hostname": "go.creator.com",  "state": "pending"}
{  "detail": {    "code": "invalid_request",    "message": "Invalid value for field."  }}
{  "detail": "auth required"}