Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Hetzner Zones API

A Zone represents a [Domain Name System (DNS) zone](https://wikipedia.org/wiki/DNS_zone) managed by Hetzner authoritative nameservers.Please see [Hetzner Docs](https://docs.hetzner.com/dns-console/dns/general/dns-overview#the-difference-between-domain-and-zone) for the difference between zones and domains.This API supports all zone names with [well-known public suffixes](https://publicsuffix.org/) (e.g. `.de`, `.com`, `.co.uk`).Subdomains are not supported.Zone ModesThis API supports two types of zone modes.- In _primary_ mode, resource record sets ([RRSets](#tag/zone-rrsets)) and resource records (RRs) are managed via the Cloud API or Hetzner Console.- In _secondary_ mode, Hetzner's nameservers query [RRSets](#tag/zone-rrsets) and RRs from given primary nameservers via [AXFR](https://en.wikipedia.org/wiki/DNS_zone_transfer).The zone mode cannot be changed, the zone must be deleted and re-created with a new mode.### SOA SerialFor zones in primary mode, Hetzner automatically increases the `SOA` record serial number.As convention, a `YYYYMMDDnn` format with incrementing `nn` is used.Zone file importThis API supports importing a zone file in BIND (RFC [1034](https://datatracker.ietf.org/doc/html/rfc1034)/[1035](https://datatracker.ietf.org/doc/html/rfc1035)) format.Importing a zone file is only applicable for [Zones](#tag/zones) in primary mode.During an import:- An `$ORIGIN` directive may be present, it must match the [Zone](#tag/zones)'s name with an ending dot- A `$TTL` directive may be present, it is used as new default [Zone](#tag/zones) Time To Live (TTL)- Only `IN` (internet) class records are allowed- The assigned authoritative Hetzner nameservers must be present as `NS` records- A `SOA` record must be present- Comments for individual records are imported, comments on their own lines are discardedZone file example:```dns$ORIGIN example.com.$TTL 3600@ IN SOA hydrogen.ns.hetzner.com. dns.hetzner.com. 2024010100 86400 10800 3600000 3600@ IN 10800 NS hydrogen.ns.hetzner.com. ; Some comment.@ IN 10800 NS oxygen.ns.hetzner.com.@ IN 10800 NS helium.ns.hetzner.de.```

Hetzner Zones API is one of 32 APIs that Hetzner publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Zones. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and a getting-started guide.

This API exposes 6 operations across 3 paths. It is described by OpenAPI 3.0.3, at version 1.0.0.

Requests are made against a single base URL, https://api.hetzner.cloud/v1.

6 operations 3 paths 0 schemas 1 DELETE3 GET1 POST1 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.3
API Version
1.0.0
Base URL
https://api.hetzner.cloud/v1
Authentication
HTTP Bearer
Resource Areas
1

Authentication & Security 1

Hetzner Zones API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (APIToken). By default, every request must be authenticated.

Paths & Operations 6

Across 3 paths, the API surfaces 6 operations — 1 DELETE, 3 GET, 1 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.

Zones 6

A Zone represents a [Domain Name System (DNS) zone](https://wikipedia.org/wiki/DNSzone) managed by Hetzner authoritative nameservers. Please see [Hetzner Docs](https://docs.hetzne…

GET
/zones
List Zones
list_zones 6 params → 2004xx5xx
POST
/zones
Create a Zone
create_zone body → 2014xx5xx
GET
/zones/{id_or_name}
Get a Zone
get_zone 1 param → 2004xx5xx
PUT
/zones/{id_or_name}
Update a Zone
update_zone 1 param body → 2004xx5xx
DELETE
/zones/{id_or_name}
Delete a Zone
delete_zone 1 param → 2014xx5xx
GET
/zones/{id_or_name}/zonefile
Export a Zone file
get_zone_zonefile 1 param → 2004xx5xx

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

hetzner-zones-api-openapi.yml Raw ↑

Other APIs Hetzner publishes across the network.

Hetzner DNS API
Hetzner Actions API
Hetzner Certificate Actions API
Hetzner Certificates API
Hetzner Data Centers API
Hetzner Firewall Actions API
Hetzner Firewalls API
Hetzner Floating IP Actions API
Hetzner Floating IPs API
Hetzner Image Actions API
Hetzner Images API
Hetzner ISOs API