Zone Actions

Change a Zone's Primary Nameservers

Overwrites the primary nameservers of a Zone.

Only applicable for Zones in secondary mode.

Operation specific errors

StatusCodeDescription
422incorrect_zone_modeThis operation is not supported for this Zone's mode.
post/zones/{id_or_name}/actions/change_primary_nameservers

Request

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

Path parameters

id_or_namestring required

ID or Name of the Zone.

ID or Name of the Zone.

Request body

Example request

{
  "primary_nameservers": [
    {
      "address": "198.51.100.1",
      "port": 53
    },
    {
      "address": "203.0.113.1",
      "port": 53
    }
  ]
}

Response

Request succeeded.

Example response

{
  "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.