Cloady Docs
API ReferenceEndpointsWorkspaces

Register a domain

Registers a domain for its registry's minimum term, usually a year, charged to the workspace's card: the owner's account card, or the workspace's own when one is pinned. The registrant becomes the domain's legal owner, and the registry may email them to confirm the address. WHOIS privacy and auto-renew are on unless set to false. Without `nameservers`, Cloady points the domain and every subdomain at Cloady, so attaching any of them to an application with createDomain needs no DNS change. `dryRun` quotes the price and checks the name can be registered here without charging; premium names, orders over $100 and extensions whose registry needs more than a contact can't be. A card the bank wants to authenticate answers 402 `payment_action_required` with `clientSecret`, `paymentIntentId` and `publishableKey` in `details`: confirm it with Stripe.js, then repeat the request with `paymentIntentId`. If registration fails after the charge, the charge is refunded. Needs the developer role.

POST
/api/workspaces/{workspaceSlug}/registrations
AuthorizationBearer <token>

Personal API token (cldy_…)

In: header

Path Parameters

workspaceSlug*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

application/json

curl -X POST "https://example.com/api/workspaces/string/registrations" \  -H "Content-Type: application/json" \  -d '{    "domain": "string"  }'
{  "quote": {    "domain": "string",    "price": -9007199254740991,    "renewal": -9007199254740991,    "years": -9007199254740991  },  "domain": {    "id": "string",    "host": "string",    "isPrimary": true,    "redirectTo": "string",    "port": 0,    "app": {      "slug": "string",      "env": "production",      "region": "string"    },    "registration": {      "expiresAt": "string",      "autoRenew": true,      "nameservers": [        "string"      ]    },    "createdAt": "string"  },  "warning": "string"}