# GET /dns/zones

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the dns group.

List the DNS zones this server serves

- Who may call it: administrator
- Token scope, any of: dns, read, all
- Answers: 200 OK

Zones are sorted by name. Use q and kind to filter the list, and page or per_page to enable pagination. Each entry includes the zone's kind, record count, serial and creation time, with its owner and package where applicable. Alias zones identify the associated domain, and client zones identify the client that sends them. Zones frozen after this server left a distribution network include frozen_at.

The response includes pagination details, counts for the search and totals for the server. A q value that violates its text limits, an unrecognized kind or a per_page value outside the supported range returns 400.

## Parameters

- `q` (query, string, up to 200 characters): Search text of up to 200 characters, excluding ASCII characters 0 through 31. UrbeStack lowercases and trims the text, then matches any part of the zone name or the owner's full name.
- `kind` (query, string, one of domains, own, kept, clients): Zone category to include. Use domains for domain and alias zones, own for automatic zones for the web interface hostname and nameservers, kept for zones managed independently by an administrator, or clients for zones sent by other UrbeStack servers.
- `page` (query, integer, 1 or more): Page number as a non-negative integer of up to 10 digits, defaulting to 1. A value of 0 selects the first page, a value past the end selects the last page, and omitting both page and per_page returns all matching zones.
- `per_page` (query, integer, 1 to 1000): Number of zones per page, from 1 to 1000. Defaults to 25 when pagination is enabled.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/dns/zones?q=text&kind=domains&page=1&per_page=1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "all": {
    "owners": 1,
    "records": 1,
    "total": 1
  },
  "counts": {
    "all": 1,
    "domains": 1,
    "kept": 1,
    "own": 1
  },
  "more": true,
  "page": 1,
  "pages": 1,
  "per_page": 1,
  "server_zone": "text",
  "total": 1,
  "zones": [
    {
      "automatic": true,
      "created_at": "2026-09-09T10:15:00Z",
      "domain": "example.com",
      "frozen_at": "text",
      "kind": "domain",
      "name": "alice",
      "of": "text",
      "package": "basic",
      "records": 1,
      "serial": 1,
      "user": "alice"
    }
  ]
}
```

## Errors

- 400: Invalid <what>: expected a non-negative integer
- 400: kind is domains, own, kept or clients
- 400: per_page is a number from 1 to 1000
- 400: q is a text of at most 200 characters
- 401: Authentication required
