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 registrar account required on your end.
Cost:
- Domain registration — passthrough plus markup (see
POST /v1/domains/checkfor the exact price). - Domain attach — ~50 credits ($0.50).
- $20/site/month subscription begins on successful attach.
Total credit charge happens atomically on success. If registration succeeds but attach fails, the domain is registered to your account and you can retry the attach via POST /v1/sites/:id/domains without re-paying for the domain.
Request
curl -X POST https://api.warpweb.ai/v1/domains/register \
-H "Authorization: Bearer wpwb_sk_xxx" \
-H "Content-Type: application/json" \
-d '{
"domain": "brooksideplumbing.com",
"site_id": "site_8f3c2a1b-5d47-4c9e-b820-1f8a3e7d9c4f",
"registrant": {
"first_name": "Sam",
"last_name": "Brookside",
"email": "owner@brooksideplumbing.com",
"phone": "+15125550199",
"address_line1": "1234 Main St",
"city": "Austin",
"state": "TX",
"postal_code": "78701",
"country": "US"
},
"include_www": true,
"privacy": true
}'Body
| Field | Type | Required | Description |
|---|---|---|---|
domain | string | yes | The domain to register. Must be available per /v1/domains/check. |
site_id | string | yes | The site to attach the new domain to. |
registrant | object | yes | ICANN-required contact info. See below. |
include_www | boolean | no | Default true. Auto-configure www.{domain} to redirect to apex. |
privacy | boolean | no | Default true. WHOIS privacy. Free. |
registrant fields
All required by ICANN regulations. We don’t validate format strictly but the registrar will reject obviously fake data.
| Field | Type | Notes |
|---|---|---|
first_name, last_name | string | Legal name of the domain owner. |
email | string | Reachable email; used for ICANN verification emails. |
phone | string | E.164 format with + prefix. |
address_line1, city, state, postal_code, country | string | Postal address. country is ISO 3166-1 alpha-2 (e.g. US, GB). |
Response
{
"domain": "brooksideplumbing.com",
"site_id": "site_8f3c2a1b-5d47-4c9e-b820-1f8a3e7d9c4f",
"registration_status": "complete",
"registration_period_years": 1,
"renewal_at": "2027-05-17",
"price_charged_usd": 10.44,
"custom_domains": ["brooksideplumbing.com", "www.brooksideplumbing.com"],
"hosting_tier": "paid_custom_domain",
"ssl_status": "provisioning",
"subscription_active": true
}SSL provisioning typically completes within 60 seconds.
Errors
| Status | Error | Cause |
|---|---|---|
| 400 | invalid_registrant | Missing or malformed registrant fields. |
| 402 | payment_method_required | Card on file required (for both the domain charge and the $20/mo subscription). |
| 404 | site_not_found | site_id doesn’t belong to your account. |
| 409 | domain_unavailable | Domain was taken between your /domains/check call and now. |
| 422 | unsupported_tld | TLD not supported by Warpweb’s registrar. |