---
title: Domains
---

## List Domains
**Endpoint**: `GET /agent/v0/domains`
**Authentication**: `Authorization: Bearer <token>`
### Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `ascending` | query | boolean | No |  |
| `limit` | query | integer | No |  |
| `page_token` | query | string | No |  |

### Responses

#### `200`

Response with status 200

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `count` | integer | Yes | Number of items returned. |
| `domains` | array\<object\> | Yes | Ordered by `created_at` descending. |
| `limit` | integer | No | Limit of number of items returned. |
| `next_page_token` | string | No | Page token for pagination. |

##### Example

```json
{
  "count": 0,
  "domains": [
    {
      "client_id": "<string>",
      "created_at": "2026-01-01T00:00:00Z",
      "domain": "<string>",
      "domain_id": "<string>",
      "feedback_enabled": true,
      "pod_id": "<string>",
      "status": null,
      "updated_at": "2026-01-01T00:00:00Z"
    }
  ],
  "limit": 0,
  "next_page_token": "<string>"
}
```


## Create Domain
**Endpoint**: `POST /agent/v0/domains`
**Authentication**: `Authorization: Bearer <token>`
### Request Body
Content-Type: `application/json`
#### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `domain` | string | Yes | The name of the domain (e.g., `example.com`). |
| `feedback_enabled` | boolean | Yes | Bounce and complaint notifications are sent to your inboxes. |

#### Example

```json
{
  "domain": "<string>",
  "feedback_enabled": true
}
```

### Responses

#### `200`

Response with status 200

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `client_id` | string | No | Client ID of domain. |
| `created_at` | string | Yes | Time at which the domain was created. |
| `domain` | string | Yes | The name of the domain (e.g., `example.com`). |
| `domain_id` | string | Yes | The ID of the domain. |
| `feedback_enabled` | boolean | Yes | Bounce and complaint notifications are sent to your inboxes. |
| `pod_id` | string | No | ID of pod. |
| `records` | array\<object\> | Yes | A list of DNS records required to verify the domain. |
| `status` | object | Yes | The verification status of the domain. |
| `updated_at` | string | Yes | Time at which the domain was last updated. |

##### Example

```json
{
  "client_id": "<string>",
  "created_at": "2026-01-01T00:00:00Z",
  "domain": "<string>",
  "domain_id": "<string>",
  "feedback_enabled": true,
  "pod_id": "<string>",
  "records": [
    {
      "name": "<string>",
      "priority": 0,
      "status": "MISSING",
      "type": "TXT",
      "value": "<string>"
    }
  ],
  "status": null,
  "updated_at": "2026-01-01T00:00:00Z"
}
```

#### `400`

Error response with status 400

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `errors` | object | Yes | Validation errors. |
| `name` | string | Yes | Name of error. |

##### Example

```json
{
  "errors": null,
  "name": "<string>"
}
```


## Get Domain
**Endpoint**: `GET /agent/v0/domains/{domain_id}`
**Authentication**: `Authorization: Bearer <token>`
### Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `domain_id` | path | string | Yes |  |

### Responses

#### `200`

Response with status 200

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `client_id` | string | No | Client ID of domain. |
| `created_at` | string | Yes | Time at which the domain was created. |
| `domain` | string | Yes | The name of the domain (e.g., `example.com`). |
| `domain_id` | string | Yes | The ID of the domain. |
| `feedback_enabled` | boolean | Yes | Bounce and complaint notifications are sent to your inboxes. |
| `pod_id` | string | No | ID of pod. |
| `records` | array\<object\> | Yes | A list of DNS records required to verify the domain. |
| `status` | object | Yes | The verification status of the domain. |
| `updated_at` | string | Yes | Time at which the domain was last updated. |

##### Example

```json
{
  "client_id": "<string>",
  "created_at": "2026-01-01T00:00:00Z",
  "domain": "<string>",
  "domain_id": "<string>",
  "feedback_enabled": true,
  "pod_id": "<string>",
  "records": [
    {
      "name": "<string>",
      "priority": 0,
      "status": "MISSING",
      "type": "TXT",
      "value": "<string>"
    }
  ],
  "status": null,
  "updated_at": "2026-01-01T00:00:00Z"
}
```

#### `404`

Error response with status 404

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `message` | string | Yes | Error message. |
| `name` | string | Yes | Name of error. |

##### Example

```json
{
  "message": "<string>",
  "name": "<string>"
}
```


## Update Domain
**Endpoint**: `PATCH /agent/v0/domains/{domain_id}`
**Authentication**: `Authorization: Bearer <token>`
### Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `domain_id` | path | string | Yes |  |

### Request Body
Content-Type: `application/json`
#### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `feedback_enabled` | boolean | No | Bounce and complaint notifications are sent to your inboxes. |

#### Example

```json
{
  "feedback_enabled": true
}
```

### Responses

#### `200`

Response with status 200

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `client_id` | string | No | Client ID of domain. |
| `created_at` | string | Yes | Time at which the domain was created. |
| `domain` | string | Yes | The name of the domain (e.g., `example.com`). |
| `domain_id` | string | Yes | The ID of the domain. |
| `feedback_enabled` | boolean | Yes | Bounce and complaint notifications are sent to your inboxes. |
| `pod_id` | string | No | ID of pod. |
| `records` | array\<object\> | Yes | A list of DNS records required to verify the domain. |
| `status` | object | Yes | The verification status of the domain. |
| `updated_at` | string | Yes | Time at which the domain was last updated. |

##### Example

```json
{
  "client_id": "<string>",
  "created_at": "2026-01-01T00:00:00Z",
  "domain": "<string>",
  "domain_id": "<string>",
  "feedback_enabled": true,
  "pod_id": "<string>",
  "records": [
    {
      "name": "<string>",
      "priority": 0,
      "status": "MISSING",
      "type": "TXT",
      "value": "<string>"
    }
  ],
  "status": null,
  "updated_at": "2026-01-01T00:00:00Z"
}
```

#### `404`

Error response with status 404

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `message` | string | Yes | Error message. |
| `name` | string | Yes | Name of error. |

##### Example

```json
{
  "message": "<string>",
  "name": "<string>"
}
```


## Delete Domain
**Endpoint**: `DELETE /agent/v0/domains/{domain_id}`
**Authentication**: `Authorization: Bearer <token>`
### Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `domain_id` | path | string | Yes |  |

### Responses

#### `200`

Successful response

#### `404`

Error response with status 404

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `message` | string | Yes | Error message. |
| `name` | string | Yes | Name of error. |

##### Example

```json
{
  "message": "<string>",
  "name": "<string>"
}
```


## Verify Domain
**Endpoint**: `POST /agent/v0/domains/{domain_id}/verify`
**Authentication**: `Authorization: Bearer <token>`
### Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `domain_id` | path | string | Yes |  |

### Responses

#### `200`

Verified domain

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `client_id` | string | No | Client ID of domain. |
| `created_at` | string | Yes | Time at which the domain was created. |
| `domain` | string | Yes | The name of the domain (e.g., `example.com`). |
| `domain_id` | string | Yes | The ID of the domain. |
| `feedback_enabled` | boolean | Yes | Bounce and complaint notifications are sent to your inboxes. |
| `pod_id` | string | No | ID of pod. |
| `records` | array\<object\> | Yes | A list of DNS records required to verify the domain. |
| `status` | object | Yes | The verification status of the domain. |
| `updated_at` | string | Yes | Time at which the domain was last updated. |

##### Example

```json
{
  "client_id": "<string>",
  "created_at": "2026-01-01T00:00:00Z",
  "domain": "<string>",
  "domain_id": "<string>",
  "feedback_enabled": true,
  "pod_id": "<string>",
  "records": [
    {
      "name": "<string>",
      "priority": 0,
      "status": "MISSING",
      "type": "TXT",
      "value": "<string>"
    }
  ],
  "status": null,
  "updated_at": "2026-01-01T00:00:00Z"
}
```

#### `404`

Error response with status 404

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `message` | string | Yes | Error message. |
| `name` | string | Yes | Name of error. |

##### Example

```json
{
  "message": "<string>",
  "name": "<string>"
}
```


## Get Zone File
DNS zone file records for the domain (Agentry; JSON body instead of octet-stream).
**Endpoint**: `GET /agent/v0/domains/{domain_id}/zone-file`
**Authentication**: `Authorization: Bearer <token>`
### Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `domain_id` | path | string | Yes |  |

### Responses

#### `200`

Zone file records

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `domain` | string | Yes |  |
| `domain_id` | string | Yes | The ID of the domain. |
| `records` | array\<object\> | Yes |  |

##### Example

```json
{
  "domain": "<string>",
  "domain_id": "<string>",
  "records": [
    {
      "name": "<string>",
      "type": "<string>",
      "value": "<string>"
    }
  ]
}
```

#### `404`

Error response with status 404

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `message` | string | Yes | Error message. |
| `name` | string | Yes | Name of error. |

##### Example

```json
{
  "message": "<string>",
  "name": "<string>"
}
```

