Change Browser Cache TTL setting

Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources will remain on your visitors' computers. Cloudflare will honor any larger times specified by your server. (https://support.cloudflare.com/hc/en-us/articles/200168276).

/zones/{zone_identifier}/settings/browser_cache_ttl

patch

Zone Settings

zone-settings-change-browser-cache-ttl-setting

Debug "planAvailability"

{
  "business": true,
  "enterprise": true,
  "free": true,
  "pro": true
}

Debug "tokenPermissions"

{
  "enum": [
    "#zone_settings:edit"
  ]
}

Debug "parameters"

[
  {
    "in": "path",
    "name": "zone_identifier",
    "required": true,
    "schema": {
      "description": "Identifier",
      "example": "023e105f4ecef8ad9ca31a8372d0c353",
      "maxLength": 32,
      "type": "string"
    }
  }
]

Debug "requestBody"

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "value": {
            "default": 14400,
            "description": "Value of the zone setting.\nNotes: Setting a TTL of 0 is equivalent to selecting `Respect Existing Headers`",
            "enum": [
              0,
              30,
              60,
              120,
              300,
              1200,
              1800,
              3600,
              7200,
              10800,
              14400,
              18000,
              28800,
              43200,
              57600,
              72000,
              86400,
              172800,
              259200,
              345600,
              432000,
              691200,
              1382400,
              2073600,
              2678400,
              5356800,
              16070400,
              31536000
            ],
            "type": "number"
          }
        },
        "required": [
          "value"
        ]
      }
    }
  },
  "required": true
}

Debug "responses"

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "allOf": [
                {
                  "properties": {
                    "errors": {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    },
                    "messages": {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    },
                    "success": {
                      "description": "Whether the API call was successful",
                      "example": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "errors",
                    "messages"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "result": {
                      "type": "object"
                    }
                  }
                }
              ]
            },
            {
              "properties": {
                "result": {
                  "allOf": [
                    {
                      "properties": {
                        "editable": {
                          "default": true,
                          "description": "Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).",
                          "enum": [
                            true,
                            false
                          ],
                          "readOnly": true,
                          "type": "boolean"
                        },
                        "id": {
                          "description": "Identifier of the zone setting.",
                          "example": "development_mode",
                          "type": "string"
                        },
                        "modified_on": {
                          "description": "last time this setting was modified.",
                          "example": "2014-01-01T05:20:00.12345Z",
                          "format": "date-time",
                          "nullable": true,
                          "readOnly": true,
                          "type": "string"
                        },
                        "value": {
                          "description": "Current value of the zone setting.",
                          "example": "on"
                        }
                      },
                      "required": [
                        "id",
                        "value"
                      ]
                    },
                    {
                      "properties": {
                        "id": {
                          "description": "ID of the zone setting.",
                          "enum": [
                            "browser_cache_ttl"
                          ],
                          "example": "browser_cache_ttl"
                        },
                        "value": {
                          "default": 14400,
                          "description": "Value of the zone setting.\nNotes: Setting a TTL of 0 is equivalent to selecting `Respect Existing Headers`",
                          "enum": [
                            0,
                            30,
                            60,
                            120,
                            300,
                            1200,
                            1800,
                            3600,
                            7200,
                            10800,
                            14400,
                            18000,
                            28800,
                            43200,
                            57600,
                            72000,
                            86400,
                            172800,
                            259200,
                            345600,
                            432000,
                            691200,
                            1382400,
                            2073600,
                            2678400,
                            5356800,
                            16070400,
                            31536000
                          ],
                          "type": "number"
                        }
                      }
                    }
                  ],
                  "description": "Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources will remain on your visitors' computers. Cloudflare will honor any larger times specified by your server. (https://support.cloudflare.com/hc/en-us/articles/200168276).",
                  "title": "Browser Cache TTL"
                }
              }
            }
          ]
        }
      }
    },
    "description": "Change Browser Cache TTL setting response"
  },
  "4XX": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "errors": {
              "allOf": [
                {
                  "example": [],
                  "items": {
                    "properties": {
                      "code": {
                        "minimum": 1000,
                        "type": "integer"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "message"
                    ],
                    "type": "object",
                    "uniqueItems": true
                  },
                  "type": "array"
                }
              ],
              "example": [
                {
                  "code": 7003,
                  "message": "No route for the URI"
                }
              ],
              "minLength": 1
            },
            "messages": {
              "allOf": [
                {
                  "example": [],
                  "items": {
                    "properties": {
                      "code": {
                        "minimum": 1000,
                        "type": "integer"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "message"
                    ],
                    "type": "object",
                    "uniqueItems": true
                  },
                  "type": "array"
                }
              ],
              "example": []
            },
            "result": {
              "nullable": true,
              "type": "object"
            },
            "success": {
              "description": "Whether the API call was successful",
              "example": false,
              "type": "boolean"
            }
          },
          "required": [
            "success",
            "errors",
            "messages",
            "result"
          ],
          "type": "object"
        }
      }
    },
    "description": "Change Browser Cache TTL setting response failure"
  }
}

Debug "security"

[
  {
    "api_token": []
  },
  {
    "api_email": [],
    "api_key": []
  }
]