---
title: "Activate Domain"
description: "Activates a verified custom domain. Optionally sets it as the primary domain. Admin-only."
---

`POST /api/organization/whitelabel/domains/activate`

## Request Body

| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `domainId` | number | Yes | - | The verified domain ID to activate |
| `makePrimary` | boolean | No | auto | Set this domain as primary. Auto-set to `true` if no primary exists. |

## Example (cURL)

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

## Response

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

## Common errors

- `400 Domain must be verified before activation`
- `404 Domain not found`

