POST /v1/domains/register
Buy a new domain and attach it to a site in one call. Warpweb handles registration, DNS, SSL, and routing. No separate registrar account required.
Cost: 50 credits + the registrar pass-through fee. The $10/site/month subscription begins on successful attach.
Price cap: $50/yr — domains above that ($5,000¢) are rejected with a 400. Most legitimate small-business domains are well under this; contact support for premium-name purchases.
Prerequisites
Always call POST /v1/domains/check first. That call returns the exact price_cents you must pass to this endpoint as price — without it the call 400s with Valid price (in cents) is required, and if Warpweb’s registrar quote drifts between check and purchase the mismatched price is rejected too. Treat check → register as a single two-step flow.
You’ll also need the site’s slug (returned in the create-site response) — pass it as pagesProjectName.
Request
curl -X POST https://api.warpweb.ai/v1/domains/register \
-H "Authorization: Bearer wwk_<your-key>" \
-H "Content-Type: application/json" \
-d '{
"siteId": "8f3c2a1b-5d47-4c9e-b820-1f8a3e7d9c4f",
"domain": "brooksideplumbing.com",
"pagesProjectName": "brookside-plumbing-a1b2c3",
"price": 1099
}'Body
| Field | Type | Required | Description |
|---|---|---|---|
siteId | string | yes | The site to attach the new domain to. |
domain | string | yes | The domain to register. Must be available per /v1/domains/check. |
pagesProjectName | string | yes | The site’s slug (returned in the create-site response). |
price | integer | yes | Price in USD cents — pass through the exact price_cents from /v1/domains/check. Prevents bait-and-switch if pricing drifted between check and purchase. |
Note the rename: the check endpoint returns price_cents (snake_case), but this endpoint accepts the same value as price (no _cents suffix). Pass the integer through unchanged; only the field name differs.
Response
{
"success": true,
"domain": "brooksideplumbing.com",
"zoneId": "abc123-def456-…",
"status": "active",
"registeredAt": "2026-05-17T15:42:11Z",
"message": "Domain purchased and connected to your site. SSL provisioning typically completes in 2–10 minutes; a background job retries domain/DNS attach if it stalls. Track status via GET /v1/sites/:id — flip from dns_pending to active means SSL is live."
}| Field | Description |
|---|---|
domain | The domain you registered. |
zoneId | Reference id for the DNS zone. |
status | active immediately on success; SSL provisions in the background within 2–10 minutes. If GET /v1/sites/:id still shows dns_pending after 30 minutes, contact support@warpweb.ai with the site_id. |
registeredAt | ISO 8601 timestamp of the registration. |
message | Human-readable status to surface in your UI. |
Errors
| Status | Body | Cause |
|---|---|---|
| 400 | { "error": "siteId, domain, and pagesProjectName are required" } | Missing required fields. |
| 400 | { "error": "Valid price (in cents) is required" } | price missing, non-numeric, or ≤ 0. |
| 400 | { "error": "<domain> costs $X/yr — above our $50 auto-purchase cap. ..." } | Domain above the $50/yr safety cap. |
| 400 | { "error": "<domain> uses a TLD ... doesn't support. ..." } | Unsupported TLD. Use /v1/sites/:id/domains to attach a domain registered elsewhere. |
| 400 | { "error": "<domain> just got snapped up. ..." } | Domain was registered between your /check call and this one. |
| 503 | { "error": "Domain registration is temporarily unavailable. Try again in a bit, ..." } | Registrar transient (rate limit, WHOIS rejection, upstream issue). Safe to retry. |