> ## Documentation Index
> Fetch the complete documentation index at: https://developer.cloakup.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Domains

> Endpoints under /v1/domains

All endpoints require `Authorization: Bearer ck_...`.

## List domains

`GET /v1/domains`

**Scope:** `domains:list`

### Query parameters

| Parameter  | Type    | Default | Description                              |
| ---------- | ------- | ------- | ---------------------------------------- |
| `page`     | integer | `1`     | Page number (min 1)                      |
| `limit`    | integer | `100`   | One of `1`, `5`, `10`, `25`, `50`, `100` |
| `verified` | boolean | —       | Filter by verification status            |
| `name`     | string  | —       | Max 128 chars                            |

### Response `200`

```json theme={null}
{
  "count": 0,
  "data": []
}
```

Each item in `data` is a [Domain](/reference/schemas#domain).

***

## Create domain

`POST /v1/domains`

**Scope:** `domains:create`

Register a domain. **Subdomain required** (e.g. `track.example.com`).

<Warning>
  Rejected if `name` contains `http`, `www`, or `/`, or is not a valid subdomain hostname.
</Warning>

### Request body

```json theme={null}
{
  "name": "track.example.com"
}
```

| Field  | Type   | Required | Description                                                    |
| ------ | ------ | -------- | -------------------------------------------------------------- |
| `name` | string | yes      | Subdomain hostname — no scheme, `www`, or path. Max 128 chars. |

### Response `201`

```json theme={null}
{
  "id": 1,
  "name": "track.example.com",
  "verified": false,
  "migrated": false
}
```

***

## Verify domain

`PATCH /v1/domains/:id/verify`

**Scope:** `domains:verify`

Checks DNS/CNAME propagation and activates the certificate. No request body.

### Path parameters

| Name | Type    | Description |
| ---- | ------- | ----------- |
| `id` | integer | Domain ID   |

### Response `200`

```json theme={null}
{
  "name": "track.example.com",
  "verified": true
}
```

Call repeatedly until `verified: true` before using the domain in campaigns.

***

## Delete domain

`DELETE /v1/domains/:id`

**Scope:** `domains:delete`

### Response `204`

Same quirk as campaign delete — status `204`, optional `{ "message": "..." }` body. Treat status as success.
