Search Documentation
Search for a documentation page...
Domain API
REST API endpoints for connecting and verifying a custom domain.
Connect a custom domain to your store, fetch the DNS records to set at your registrar, and re-check verification. Custom domains attach to the store's builder (Vercel) project, so these endpoints only work for AI-built stores. Domain purchasing is not exposed through the API.
The status field is one of: No Domain, Pending Verification, Valid Configuration, Invalid Configuration, Domain Not Found, or Unknown Error.
Get Domain Status
Returns the connected custom domain and its DNS/verification status. When a domain is connected, dns.record is the apex A record (or subdomain CNAME) to set, and dns.verification holds Vercel's ownership-challenge records (present until the domain verifies).
Response (no domain connected)
Response (domain connected)
Connect Domain
Attaches a custom domain to the store's builder project and returns the DNS records the owner must set. For an apex domain (example.com) this is an A record at @; for a subdomain (shop.example.com) it is a CNAME. Re-running with a different domain detaches the previous one first.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | Custom domain to connect, e.g. example.com or shop.example.com (no protocol or path) |
Response (200)
Returns the same shape as GET /api/v1/domain, with the DNS records to set.
| Status | Meaning |
|---|---|
400 | Invalid domain, or store has no builder project (not AI-built) |
409 | Domain already in use or pending verification on another project |
502 | Failed to attach the domain with Vercel |
Verify Domain
Asks Vercel to re-verify the connected domain's DNS and returns the current status (same shape as GET /api/v1/domain). Call this after setting the DNS records to check whether the domain has verified.
Response (200)
A 400 is returned when no custom domain is connected to verify.
Remove Domain
Detaches the custom domain from the Vercel project and clears it from the store. Idempotent — removing when no domain is connected still returns 200.