Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Custom Domains

Publish your projects on your own domain, such as campaign.example.com. This page shows how to add a domain with the API. The same settings are in the Design Editor, under Hosting.

Setup has three steps:

  1. Add the domain. The result is a hosting and a DNS record.
  2. Add the DNS record at your DNS provider, then connect the domain.
  3. Check the status until the domain is active.

Requirements

  • A plan that includes custom domains, with a hosting left in the plan's limit.
  • A role in the account that may add hostings.
  • An API key with the write:hosting and read:hosting scopes (see Authentication).
  • Access to the DNS settings of the domain.

Your account key is in the response of GET https://api.vev.design/v2/user/accounts.

1. Add the domain

curl -X POST https://api.vev.design/v2/accounts/[accountKey]/hostings \
  --header "x-vev-key: [your-key]" \
  --header "Content-Type: application/json" \
  --data '{"domain": "campaign.example.com"}'

Send the domain only: no https:// and no path. Use a subdomain, such as www.example.com or campaign.example.com. Most DNS providers do not allow the CNAME record from step 2 on the domain itself (example.com).

The response is the new hosting:

{
  "success": true,
  "data": {
    "hostingKey": "[hostingKey]",
    "domain": "campaign.example.com",
    "status": "waiting-for-dns",
    "message": "Add the DNS record at your DNS provider, then call POST /hostings/{hostingKey}/connect.",
    "dnsRecords": [
      { "type": "CNAME", "name": "campaign.example.com", "value": "domain.vev.page" }
    ],
    "created": 1764230400000
  }
}

Keep the hostingKey. You use it in the next steps, and to turn on SSO for the domain.

2. Add the DNS record and connect

At your DNS provider, add each record in dnsRecords. Then connect the domain:

curl -X POST https://api.vev.design/v2/hostings/[hostingKey]/connect \
  --header "x-vev-key: [your-key]"

Vev then checks that the domain points to Vev and issues an HTTPS certificate for it. The response has the same fields as in step 1, with status set to connecting.

You can call connect again at any time. When the domain is already connected or connecting, Vev only checks its status.

3. Check the status

curl https://api.vev.design/v2/hostings/[hostingKey] \
  --header "x-vev-key: [your-key]"
statusMeaningWhat to do
waiting-for-dnsThe domain is added, but not connectedAdd the DNS record, then call connect
connectingVev checks the domain and issues the certificateWait. DNS changes can take up to 24 hours
activeThe domain is livePublish projects to the hosting
failedVev could not connect the domainMake sure the DNS record is correct, then call connect again

Check every few minutes. Do not check more than once a minute.

GET /v2/accounts/[accountKey]/hostings lists all hostings of the account, with the projects published to each.

Delete a domain

curl -X DELETE https://api.vev.design/v2/hostings/[hostingKey] \
  --header "x-vev-key: [your-key]"

The response:

{
  "success": true,
  "data": { "hostingKey": "[hostingKey]", "domain": "campaign.example.com" }
}

Vev finishes the delete shortly after the response. Projects published to the domain then stop being served on it. Remove the DNS record at your DNS provider afterwards.

Your role in the account must allow deleting hostings.

Errors

Errors have this form:

{
  "success": false,
  "error": {
    "message": "campaign.example.com is already added to Vev",
    "code": "conflict",
    "errorId": "8a7c2f4e-..."
  }
}
StatusWhen
400The domain is not valid, is a Vev domain, or the body has fields other than domain
401The API key has no access to the account
403The plan has no custom domains, the account is at its hosting limit, or your role does not allow the change
404No custom domain with this key
409The domain is already added to Vev