Register a domain (fail-closed; requires Idempotency-Key)
Register a domain (fail-closed; requires Idempotency-Key): CustomDomain™ API reference in the registrar group. Covers parameters, request body and responses.
Off on the hosted service. This route registers a domain without taking a payment, so it needs both SELL_PURCHASE_ENABLED and its own switch SELL_DIRECT_PURCHASE_ENABLED; buy through checkout instead. A required Idempotency-Key header dedupes retries so a registration is never charged twice.
A delegated agent token needs domains:purchase; the grant's monthly spend cap is charged first, and a purchase that would pass it answers 409. A tenant API key is refused with 401. A workspace that billing refuses answers 402.
Short-lived widget JWT minted server-side via POST /v1/tokens. Scoped to one application (and optionally one domain).
In: header
Header Parameters
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 POST "https://example.com/registrar/purchase" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "domain": "string", "buyer": { "email": "string" } }'{ "code": "string", "title": "string", "details": "string"}{ "code": "string", "title": "string", "details": "string"}{ "code": "billing_required", "title": "An active subscription is needed to connect new domains.", "details": "This workspace has not started its subscription yet. Domains that are already connected keep working. An owner or admin can set up billing at https://app.customdomain.ai/app/billing."}{ "code": "workspace_suspended", "title": "This workspace is suspended.", "details": "New domains, connect steps and domain purchases are refused while CustomDomain™ support has this workspace suspended. Contact support to have it resumed."}{ "code": "string", "title": "string", "details": "string"}