Skip to main content
Domains let you put a Crevio Site on your own custom address — search for an available name, buy it, attach it to a site, and verify it, or connect a domain you already own. A freshly built Site lives at https://<subdomain>.crevio.app. The Domains API is how you move it to https://yourbrand.com. You can just ask Crevio to find and buy a name, or drive the full flow yourself: search → purchase → assign → verify. Connecting an existing domain skips the purchase step. Domains carry their own resource ID, returned by the purchase and connect calls.

The flow at a glance

1

Search for a buyable domain

GET /domains/search returns available names and prices.
2

Purchase it

POST /domains/purchase registers the domain to your account.
3

Assign it to a site

POST /domains/{id}/assign points the domain at one of your sites.
4

Verify DNS

POST /domains/{id}/verify confirms DNS is configured and goes live.

Worked example: buy a domain and attach it to a site

1. Search for an available domain

curl "https://api.crevio.co/v1/domains/search?query=kilnandco" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
The result lists available names with prices so you can pick one to buy.

2. Purchase it

domain is required.
curl -X POST https://api.crevio.co/v1/domains/purchase \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "domain": "kilnandco.com" }'
import { Crevio } from "@crevio/sdk";

const crevio = new Crevio({ apiKeyAuth: "YOUR_API_TOKEN" });

const domain = await crevio.domains.purchase({ domain: "kilnandco.com" });
Buy kilnandco.com and put my Kiln & Co site on it.
This returns the domain’s resource ID, which you’ll use in the next steps.

3. Assign it to a site

Point the domain at the site you want it to serve. Pass the target site as site (required).
curl -X POST https://api.crevio.co/v1/domains/dom_abc123/assign \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "site": "site_abc123" }'

4. Verify

Verification confirms DNS is pointed correctly and brings the domain live. For domains bought through Crevio, DNS is managed for you; for connected domains, verification checks the records you added (see below).
curl -X POST https://api.crevio.co/v1/domains/dom_abc123/verify \
  -H "Authorization: Bearer YOUR_API_TOKEN"
Verification can take time to propagate. If it doesn’t pass immediately, the platform re-checks in the background, so a verify that returns “pending” will often resolve on its own.

Connect a domain you already own

If you registered a domain elsewhere, connect it instead of purchasing. Crevio gives you the DNS records to add at your registrar, then you verify.
FieldPurpose
domainThe domain (or subdomain) to connect — required
siteThe site to attach it to — optional, defaults to your account’s site
setup_emailtrue to also configure email DNS for the domain
curl -X POST https://api.crevio.co/v1/domains/connect \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "shop.example.com",
    "site": "site_abc123",
    "setup_email": true
  }'
If you don’t pass site here, assign it to a site afterward; then verify exactly as above.

DNS zone management

For domains Crevio manages, you can read and edit DNS records directly — add an MX record for email, a TXT record for verification, or a CNAME for a subdomain.
# All resolved DNS records for the domain
curl https://api.crevio.co/v1/domains/dom_abc123/dns-records \
  -H "Authorization: Bearer YOUR_API_TOKEN"

# Editable zone records
curl https://api.crevio.co/v1/domains/dom_abc123/zone-records \
  -H "Authorization: Bearer YOUR_API_TOKEN"
curl -X POST https://api.crevio.co/v1/domains/dom_abc123/zone-records \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "TXT",
    "name": "@",
    "content": "v=spf1 include:_spf.crevio.co ~all"
  }'
curl -X DELETE https://api.crevio.co/v1/domains/dom_abc123/zone-records/rec_xyz789 \
  -H "Authorization: Bearer YOUR_API_TOKEN"
Use GET /domains/{id}/dns-records to see everything currently resolving (including platform-managed records), and GET /domains/{id}/zone-records for the records you can edit.

Next steps

Sites

Build the site you’ll attach this domain to.

Email

Verify a sending domain so email comes from your address.

API reference

Every domain endpoint and parameter.

Usage & credits

How domain registration is billed.