List DNS zones
GET /api/v2/dns-zones
Lists the DNS zones on the account. kind is linked when the account also has the domain and dns_only when it has only the zone. Add name=example.com to get only that zone and its public zone_... ID. Use the ID with GET /api/v2/dns-zones/{id} to read the zone’s records.
An API key limited to certain DNS zones sees only those zones. Nameservers are not part of this response. GET /api/v2/domains/{id}/nameservers returns them.
Authentication: An API key with the scope read:dns. About keys and scopes
Request
Query parameters
limitintegerZones per page, 1 to 1000. Default 1000. Default
1000. 1 to 1000.cursorstringThe
nextCursor value from the previous page.namestringExact zone name, for example
example.com. Unicode and punycode forms both match. Returns only that zone, with its public zone_... ID.Example
curl "https://cloud.hostup.se/api/v2/dns-zones" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 One page of DNS zones, sorted by name.
{ "data": [ { "id": "zone_01hxa3b4c5d6e7f8g9h0j1k2m3", "name": "example.com", "status": "active", "isDnsOnly": false, "kind": "linked" } ], "hasMore": false, "nextCursor": null}Response fields
dataarray of objectidstringnamestringThe zone’s domain name. An internationalised name is in Unicode.
statusstringactive: the zone is served. disabled: switched off. pending: being set up. error: the DNS server reports a fault. unknown: the state could not be read. One of active, disabled, pending, error, unknown.isDnsOnlybooleankindstringOne of
dns_only, linked.recordCountintegerhasMorebooleannextCursorstring or nullErrors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | invalid_pagination_limit: limit is not a whole number from 1 to 1000. invalid_cursor: cursor is malformed. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |