API ReferencePOST /v1/domains/register

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/check for 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

FieldTypeRequiredDescription
domainstringyesThe domain to register. Must be available per /v1/domains/check.
site_idstringyesThe site to attach the new domain to.
registrantobjectyesICANN-required contact info. See below.
include_wwwbooleannoDefault true. Auto-configure www.{domain} to redirect to apex.
privacybooleannoDefault 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.

FieldTypeNotes
first_name, last_namestringLegal name of the domain owner.
emailstringReachable email; used for ICANN verification emails.
phonestringE.164 format with + prefix.
address_line1, city, state, postal_code, countrystringPostal 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

StatusErrorCause
400invalid_registrantMissing or malformed registrant fields.
402payment_method_requiredCard on file required (for both the domain charge and the $20/mo subscription).
404site_not_foundsite_id doesn’t belong to your account.
409domain_unavailableDomain was taken between your /domains/check call and now.
422unsupported_tldTLD not supported by Warpweb’s registrar.