Skip to content
Start here

Patch Auto-Origin TLS KEX enrollment status for the given zone

PATCH/zones/{zone_id}/settings/auto_origin_tls_kex

Enable or disable Auto-Origin TLS KEX selection for the zone by sending {"enabled": true} or {"enabled": false}. When enabled, Cloudflare runs a periodic scan of the zone’s origins to determine the preferred key-exchange algorithm and writes that preference to the edge so it is sent first in the TLS ClientHello to the origin.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Path ParametersExpand Collapse
zone_id: string
maxLength32
Body ParametersJSONExpand Collapse
enabled: boolean

Controls enablement of Auto-Origin TLS KEX selection for the zone.

ReturnsExpand Collapse
errors: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
messages: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
result: object { id, enabled, modified_on }
id: string
enabled: boolean

Whether Auto-Origin TLS KEX selection is enabled for the zone.

modified_on: string

Last time this setting was modified.

formatdate-time
success: boolean

Indicates the API call’s success or failure.

Patch Auto-Origin TLS KEX enrollment status for the given zone

curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/settings/auto_origin_tls_kex \
    -X PATCH \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    -d '{
          "enabled": true
        }'
{
  "errors": [],
  "messages": [],
  "result": {
    "enabled": false,
    "id": "auto_origin_tls_kex",
    "modified_on": "2014-01-01T05:20:00.12345Z"
  },
  "success": true
}
{
  "errors": [],
  "messages": [],
  "result": {
    "enabled": true,
    "id": "auto_origin_tls_kex",
    "modified_on": "2014-01-01T05:20:00.12345Z"
  },
  "success": true
}
{
  "errors": [
    {
      "code": 1009,
      "message": "Missing field 'enabled' in JSON body"
    }
  ],
  "messages": [],
  "result": {
    "enabled": false,
    "id": "auto_origin_tls_kex",
    "modified_on": "2014-01-01T05:20:00.12345Z"
  },
  "success": false
}
Returns Examples
{
  "errors": [],
  "messages": [],
  "result": {
    "enabled": false,
    "id": "auto_origin_tls_kex",
    "modified_on": "2014-01-01T05:20:00.12345Z"
  },
  "success": true
}
{
  "errors": [],
  "messages": [],
  "result": {
    "enabled": true,
    "id": "auto_origin_tls_kex",
    "modified_on": "2014-01-01T05:20:00.12345Z"
  },
  "success": true
}
{
  "errors": [
    {
      "code": 1009,
      "message": "Missing field 'enabled' in JSON body"
    }
  ],
  "messages": [],
  "result": {
    "enabled": false,
    "id": "auto_origin_tls_kex",
    "modified_on": "2014-01-01T05:20:00.12345Z"
  },
  "success": false
}