---
title: "Domain aktivieren"
description: "Aktiviert eine verifizierte eigene Domain. Optional wird sie als primäre Domain gesetzt. Nur für Admins."
---

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

## Anfrage (Request Body)

| Feld | Typ | Pflicht | Standard | Beschreibung |
|-------|------|----------|---------|-------------|
| `domainId` | number | Ja | - | Die ID der verifizierten Domain, die aktiviert werden soll |
| `makePrimary` | boolean | Nein | auto | Setzt diese Domain als primär. Wird automatisch auf `true` gesetzt, wenn keine primäre Domain existiert. |

## Beispiel (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 }'
```

## Antwort (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"
  }
}
```

## Häufige Fehler

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

