Zone Actions

Change a Zone's Default TTL

Changes the default Time To Live (TTL) of a Zone.

This TTL is used for RRSets that do not explicitly define a TTL.

Only applicable for Zones in primary mode.

Operation specific errors

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

Request

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

Path parameters

id_or_namestring required

ID or Name of the Zone.

ID or Name of the Zone.

Request body

ttlinteger required

Default Time To Live (TTL) of the Zone.

Must be in between 60s and 2147483647s.

This TTL is used for RRSets that do not explicitly define a TTL.

Example request

{
  "ttl": 10800
}

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.