Syntext DOCS
Get Started
API Add Custom Domain
POST/v1/projects/{projectId}/domains

Add Custom Domain

Add a custom domain to serve your documentation from (e.g., docs.example.com).

Path Parameters

The project ID (e.g., prj_abc123).

Request Body

The custom domain (e.g., docs.example.com).

Response

Returns the domain configuration with DNS instructions.

Domain identifier.

The custom domain.

Domain status: pending, active, failed.

Required DNS records to configure.

Record type: CNAME or TXT.

Record name (hostname).

Record value.

SSL certificate status: pending, active.

ISO 8601 timestamp.

Example

curl -X POST https://api.syntext.dev/v1/projects/prj_abc123/domains \
-H "Authorization: Bearer stx_abc12345_..." \
-H "Content-Type: application/json" \
-d '{"domain": "docs.example.com"}'
import { Syntext } from '@syntext/sdk'

const client = new Syntext('stx_abc12345_...')

const domain = await client.domains.add('prj_abc123', {
domain: 'docs.example.com',
})
from syntext import Syntext

client = Syntext("stx_abc12345_...")

domain = client.domains.add(
"prj_abc123",
domain="docs.example.com",
)

Response

{
  "data": {
    "id": "dom_xyz789",
    "domain": "docs.example.com",
    "status": "pending",
    "dnsRecords": [
      {
        "type": "CNAME",
        "name": "docs",
        "value": "prj-abc123.syntext.dev"
      },
      {
        "type": "TXT",
        "name": "_syntext.docs",
        "value": "syntext-verify=abc123xyz"
      }
    ],
    "sslStatus": "pending",
    "createdAt": "2026-06-28T12:00:00Z"
  }
}

DNS Configuration

After adding a domain, configure these DNS records with your provider:

Point your subdomain to the Syntext edge:

docs.example.com CNAME prj-abc123.syntext.dev

Add the verification record:

_syntext.docs.example.com TXT syntext-verify=abc123xyz

DNS changes can take up to 48 hours, but typically complete within minutes.

Error Responses

400 Bad Request

Returned when the domain format is invalid.

{
  "error": {
    "code": "invalid_request",
    "message": "Invalid domain format"
  }
}

409 Conflict

Returned when the domain is already in use by another project.

{
  "error": {
    "code": "conflict",
    "message": "Domain is already in use by another project"
  }
}

402 Payment Required

Returned when the custom domain limit has been reached.

{
  "error": {
    "code": "quota_exceeded",
    "message": "Custom domain limit reached. Upgrade your plan to add more domains."
  }
}
Assistant
Responses are generated using AI and may contain mistakes.

Ask me anything about the documentation.

ESC