---
title: Verify Domain
protocol: rest
method: POST
endpoint: /v1/projects/{projectId}/domains/{domainId}/verify
description: "Verify DNS configuration for a custom domain"
---

# Verify Domain

Check if DNS records are correctly configured for a pending domain.

<Endpoint method="POST" path="/v1/projects/{projectId}/domains/{domainId}/verify" />

## Path Parameters

<ParamField path="projectId" type="string" required>
  The project ID (e.g., `prj_abc123`).
</ParamField>

<ParamField path="domainId" type="string" required>
  The domain ID (e.g., `dom_xyz789`).
</ParamField>

## Response

Returns the updated domain status.

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      Domain identifier.
    </ResponseField>

    <ResponseField name="domain" type="string">
      The custom domain.
    </ResponseField>

    <ResponseField name="status" type="string">
      Domain status: `pending`, `active`, `failed`.
    </ResponseField>

    <ResponseField name="verification" type="object">
      Verification check results.

      <Expandable title="properties">
        <ResponseField name="cname" type="boolean">
          Whether CNAME record is correct.
        </ResponseField>

        <ResponseField name="txt" type="boolean">
          Whether TXT verification record is correct.
        </ResponseField>

        <ResponseField name="error" type="string">
          Error message if verification failed.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="sslStatus" type="string">
      SSL certificate status.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
```bash cURL
curl -X POST https://api.syntext.dev/v1/projects/prj_abc123/domains/dom_xyz789/verify \
  -H "Authorization: Bearer stx_abc12345_..."
```

```typescript SDK
import { Syntext } from '@syntext/sdk'

const client = new Syntext('stx_abc12345_...')
const domain = await client.domains.verify('prj_abc123', 'dom_xyz789')
```

```python Python
from syntext import Syntext

client = Syntext("stx_abc12345_...")
domain = client.domains.verify("prj_abc123", "dom_xyz789")
```
</CodeGroup>

### Success Response

```json
{
  "data": {
    "id": "dom_xyz789",
    "domain": "docs.example.com",
    "status": "active",
    "verification": {
      "cname": true,
      "txt": true
    },
    "sslStatus": "active"
  }
}
```

### Pending Response

```json
{
  "data": {
    "id": "dom_xyz789",
    "domain": "docs.example.com",
    "status": "pending",
    "verification": {
      "cname": false,
      "txt": true,
      "error": "CNAME record not found. Expected: prj-abc123.syntext.dev"
    },
    "sslStatus": "pending"
  }
}
```

<Note>
SSL certificates are automatically provisioned once DNS verification passes. This typically takes 1-2 minutes after DNS propagation.
</Note>
