---
title: "Verify Domain"
description: "Verifies DNS TXT records for a custom domain. Admin-only."
---

`POST /api/organization/whitelabel/domains/verify`

## Request Body

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `domainId` | number | Yes | The domain ID to verify |

## Example (cURL)

```bash
curl -X POST "$BASE_URL/api/organization/whitelabel/domains/verify" \
  -H "Cookie: $SESSION_COOKIE" \
  -H "Content-Type: application/json" \
  -d '{ "domainId": 2 }'
```

## Response (success)

```json
{
  "verified": true,
  "status": "verified",
  "domain": {
    "id": 2,
    "hostname": "app.deinkunde.com",
    "status": "verified",
    "role": "app",
    "isPrimary": false,
    "verificationToken": "xyz789-abc456",
    "verifiedAt": "2026-04-15T12:30:00.000Z",
    "createdAt": "2026-04-15T12:00:00.000Z",
    "updatedAt": "2026-04-15T12:30:00.000Z"
  }
}
```

## Common errors

- `400 TXT verification failed (token not found)` when DNS record is missing or has wrong value
- `400 Domain has no verification token`
- `404 Domain not found`

