---
title: "List customer-owned domains and their Hosted EZ DNS authority and editability status"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.hostedez.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Hosted EZ REST API

`GET /v1/domains/dns-zones`

## Authentication

- `sessionCookie`, apiKey, in cookie

## Code samples

### cURL

```curl
curl --request GET \
  --url https://api.hostedez.com/v1/domains/dns-zones \
  --header '__Secure-better-auth.session_token: <value>'
```

### TypeScript

```typescript
const url = 'https://api.hostedez.com/v1/domains/dns-zones';
const options = {method: 'GET', headers: {'__Secure-better-auth.session_token': '<value>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.hostedez.com/v1/domains/dns-zones"

headers = {"__Secure-better-auth.session_token": "<value>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Customer DNS zones

#### Example

```json
{
  "zones": [
    {
      "authoritative": true,
      "domain": "string",
      "editable": true,
      "ezghZoneId": "string",
      "nameservers": [
        "string"
      ],
      "orderId": "string",
      "recordCount": 0,
      "requiredNameservers": [
        "string"
      ],
      "source": "registered",
      "zoneStatus": "active"
    }
  ]
}
```

- `listDNSZones.response.200.zones` (array<object>, required)
  - `listDNSZones.response.200.zones.authoritative` (boolean, required)
  - `listDNSZones.response.200.zones.domain` (string, required)
  - `listDNSZones.response.200.zones.editable` (boolean, required)
  - `listDNSZones.response.200.zones.ezghZoneId` (string | null, required)
  - `listDNSZones.response.200.zones.nameservers` (array<string>, required)
  - `listDNSZones.response.200.zones.orderId` (string | null, required)
  - `listDNSZones.response.200.zones.recordCount` (integer, required)
    - min 0
  - `listDNSZones.response.200.zones.requiredNameservers` (array<string>, required)
  - `listDNSZones.response.200.zones.source` (string, required)
    - one of `"registered"`, `"site"`, `"email"`
  - `listDNSZones.response.200.zones.zoneStatus` (string, required)
    - one of `"active"`, `"pending_delegation"`, `"not_on_ezgh_dns"`

### 401

Unauthenticated

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string"
  }
}
```

- `listDNSZones.response.401.error` (object, required)
  - `listDNSZones.response.401.error.code` (string, required)
  - `listDNSZones.response.401.error.message` (string, required)
  - `listDNSZones.response.401.error.issues` (array<object>, optional)
    - `listDNSZones.response.401.error.issues.message` (string, required)
    - `listDNSZones.response.401.error.issues.path` (string, required)

### 429

Rate limited

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string"
  }
}
```

- `listDNSZones.response.429.error` (object, required)
  - `listDNSZones.response.429.error.code` (string, required)
  - `listDNSZones.response.429.error.message` (string, required)
  - `listDNSZones.response.429.error.issues` (array<object>, optional)
    - `listDNSZones.response.429.error.issues.message` (string, required)
    - `listDNSZones.response.429.error.issues.path` (string, required)

### 503

DNS zone service unavailable

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string"
  }
}
```

- `listDNSZones.response.503.error` (object, required)
  - `listDNSZones.response.503.error.code` (string, required)
  - `listDNSZones.response.503.error.message` (string, required)
  - `listDNSZones.response.503.error.issues` (array<object>, optional)
    - `listDNSZones.response.503.error.issues.message` (string, required)
    - `listDNSZones.response.503.error.issues.path` (string, required)


Source: https://docs.hostedez.com/api/listDNSZones/index.md
