Get your free beta license ↗
API operation · dns group
GET

/dns/zones

First published 3 Oct 20260.1.0Unchanged since publication

List the DNS zones this server serves

Who may call it
AdministratorResellerCustomer
Token scope, any of
dnsreadall
Answers200 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

qquery ·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.
kindquery ·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.
pagequery ·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_pagequery ·integer, 1 to 1000
Number of zones per page, from 1 to 1000. Defaults to 25 when pagination is enabled.

Example

See the API overview for how to set $API and $TOKEN.
Request
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

5 errors, each a status and a sentence
400Invalid <what>: expected a non-negative integer
400kind is domains, own, kept or clients
400per_page is a number from 1 to 1000
400q is a text of at most 200 characters
401Authentication required
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/get-dns-zones/