Zones

Update a Zone

Updates a Zone.

To modify resource record sets (RRSets), use the RRSet Actions endpoints.

put/zones/{id_or_name}

Request

  • Base URL: https://api.hetzner.cloud/v1
  • URL: https://api.hetzner.cloud/v1/zones/{id_or_name}
  • Auth: HTTP bearer

Path parameters

id_or_namestring required

ID or Name of the Zone.

ID or Name of the Zone.

Request body

labelsobject

User-defined labels (key/value pairs) for the Resource.

Note that the set of Labels provided in the request will overwrite the existing one.

For more information, see "Labels".

Example request

{
  "labels": {
    "environment": "prod",
    "example.com/my": "label",
    "just-a-key": ""
  }
}

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"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.