Skip to main content
Apps serve production traffic on their default {projectName}.vercel.app domain until you attach your own. There are two ways to do that:
  • Add a custom domain — attaches any domain you control to the app’s Vercel project. You configure DNS yourself (point the domain at Vercel).
  • Connect a company domain — links a domain owned via the Domains primitive (purchased or registered through naive domains). The domain is attached to the Vercel project, recorded on the app, and set as primary in one step; DNS verification status is tracked on the company domain (app_connect_status).

List Domains

curl https://api.usenaive.ai/v1/apps/ca7a1b8c-a4d4-4824-b92d-89d5b297eb62/domains \
  -H "Authorization: Bearer nv_sk_live_..."
{
  "domains": [
    {
      "id": "domain-uuid-1",
      "domain": "myapp.com",
      "type": "company",
      "verified": true,
      "isPrimary": true,
      "companyDomainId": "company-domain-uuid"
    },
    {
      "id": "domain-uuid-2",
      "domain": "staging.myapp.com",
      "type": "custom",
      "verified": false,
      "isPrimary": false,
      "companyDomainId": null
    }
  ]
}

Add Custom Domain

Attaches the domain to the app’s Vercel project:
curl -X POST https://api.usenaive.ai/v1/apps/:id/domains \
  -H "Authorization: Bearer nv_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"domain": "myapp.com"}'

Request Body

FieldTypeRequiredDescription
domainstringYesDomain to add (e.g., myapp.com)

Response

200
{
  "id": "domain-uuid-2",
  "domain": "myapp.com",
  "type": "custom",
  "verified": false,
  "isPrimary": false
}
After adding, point DNS at Vercel (apex: A 76.76.21.21; subdomains: CNAME cname.vercel-dns.com). You can check Vercel’s expected configuration via the Vercel proxy: GET v9/projects/{projectId}/domains/{domain}.

Remove Domain

Removes the domain from the app and its Vercel project:
curl -X DELETE https://api.usenaive.ai/v1/apps/:id/domains/:domainId \
  -H "Authorization: Bearer nv_sk_live_..."
200
{
  "ok": true
}

Set Primary Domain

Marks a domain as the app’s primary. The next publish aliases production to the primary domain:
curl -X POST https://api.usenaive.ai/v1/apps/:id/domains/:domainId/set-primary \
  -H "Authorization: Bearer nv_sk_live_..."
200
{
  "ok": true
}

Connect Company Domain

Connect a domain managed by naive domains to serve this app’s production deployment. Attaches it to the Vercel project, records it on the app, and sets it as primary:
curl -X POST https://api.usenaive.ai/v1/apps/:id/connect-domain \
  -H "Authorization: Bearer nv_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"domainId": "company-domain-uuid"}'
200
{
  "domain": "myapp.com",
  "pendingDns": true
}
If pendingDns is true, configure the DNS records and then verify (below). The company domain’s app_connect_status transitions pending_dnsconnected.

Disconnect Company Domain

curl -X DELETE https://api.usenaive.ai/v1/apps/:id/connect-domain/:domainId \
  -H "Authorization: Bearer nv_sk_live_..."
200
{
  "ok": true
}

Verify DNS

Trigger Vercel’s DNS verification for a connected company domain:
curl -X POST https://api.usenaive.ai/v1/apps/:id/verify-domain-dns \
  -H "Authorization: Bearer nv_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"domainId": "company-domain-uuid"}'
200
{
  "verified": true,
  "domain": "myapp.com"
}
DNS propagation can take up to 48 hours — re-run verification until it returns verified: true.

Errors

404
{
  "error": {
    "code": "resource_not_found",
    "message": "Domain not found"
  }
}
400
{
  "error": {
    "code": "invalid_input",
    "message": "Domain is already connected to another app"
  }
}