---
title: "Delete Domain"
description: "Deletes a custom domain. If the deleted domain was primary, the next available domain is promoted to primary. Admin-only."
---

`DELETE /api/organization/whitelabel/domains/:id`

## Example (cURL)

```bash
curl -X DELETE "$BASE_URL/api/organization/whitelabel/domains/2" \
  -H "Cookie: $SESSION_COOKIE"
```

## Response

```json
{ "success": true }
```

## Common errors

- `401 Unauthorized` when not authenticated
- `403 Forbidden` when not an admin
- `404 Domain not found`

