Zones
Create a Zone
Creates a Zone.
A default SOA and three NS resource records with the assigned Hetzner nameservers are created automatically.
post/zones
Request
- Base URL: https://api.hetzner.cloud/v1
- URL: https://api.hetzner.cloud/v1/zones
- Auth: HTTP bearer
Request body
Example request
{
"name": "example.com",
"mode": "primary",
"ttl": 10800,
"labels": {
"environment": "prod",
"example.com/my": "label",
"just-a-key": ""
},
"primary_nameservers": [
{
"address": "198.51.100.1",
"port": 53
},
{
"address": "203.0.113.1",
"port": 53
}
],
"rrsets": [
{
"name": "www",
"type": "A",
"ttl": 3600,
"records": [
{
"value": "198.51.100.1",
"comment": "My web server at Hetzner Cloud."
}
],
"labels": {
"environment": "prod",
"example.com/my": "label",
"just-a-key": ""
}
}
],
"zonefile": "$ORIGIN\texample.com.\n$TTL\t3600\n\n@\tIN\tSOA\thydrogen.ns.hetzner.com. dns.hetzner.com. 2024010100 86400 10800 3600000 3600\n\n@\tIN\t10800\tNS\thydrogen.ns.hetzner.com. ; Some comment.\n@\tIN\t10800\tNS\toxygen.ns.hetzner.com.\n@\tIN\t10800\tNS\thelium.ns.hetzner.de.\n"
}Response
Request succeeded.
Example response
{
"zone": {
"id": 42,
"name": "example.com",
"created": "2016-01-30T23:55:00Z",
"primary_nameservers": [
{
"address": "198.51.100.1",
"port": 53
},
{
"address": "203.0.113.1",
"port": 53
}
],
"labels": {
"environment": "prod",
"example.com/my": "label",
"just-a-key": ""
},
"ttl": 10800,
"authoritative_nameservers": {
"assigned": [
"hydrogen.ns.hetzner.com.",
"oxygen.ns.hetzner.com.",
"helium.ns.hetzner.de."
],
"delegated": [
"hydrogen.ns.hetzner.com.",
"oxygen.ns.hetzner.com.",
"helium.ns.hetzner.de."
],
"delegation_last_check": "2016-01-30T23:55:00Z"
},
"mode": "primary"
},
"action": {
"id": 42,
"command": "start_resource",
"started": "2016-01-30T23:55:00Z",
"finished": "2016-01-30T23:55:00Z",
"progress": 100,
"resources": [
{
"id": 42,
"type": "server"
}
],
"error": {
"code": "action_failed",
"message": "Action failed"
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.