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

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[SSL](https://developers.cloudflare.com/api/python/resources/ssl)

[Auto Origin TLS Kex](https://developers.cloudflare.com/api/python/resources/ssl/subresources/auto_origin_tls_kex)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

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

ssl.auto\_origin\_tls\_kex.edit(AutoOriginTLSKexEditParams\*\*kwargs) -> [AutoOriginTLSKexEditResponse](<https://developers.cloudflare.com/api/python/resources/ssl#(resource)%20ssl.auto_origin_tls_kex%20%3E%20(model)%20auto_origin_tls_kex_edit_response%20%3E%20(schema)>)

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

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



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

**Example:**<code>X-Auth-Email: user@example.com</code>

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

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### ParametersExpand Collapse

zone\_id: str

maxLength32

[Link to this property](<#(resource)%20ssl.auto_origin_tls_kex%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20zone_id%20%3E%20(schema)>)

enabled: [bool](<https://developers.cloudflare.com/api/python/resources/ssl/subresources/auto_origin_tls_kex/methods/edit#(resource)%20ssl.auto_origin_tls_kex%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20enabled%20%3E%20(schema)>)

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

[Link to this property](<#(resource)%20ssl.auto_origin_tls_kex%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20enabled%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class AutoOriginTLSKexEditResponse: …

</summary>

id: str

<a href="#(resource)%20ssl.auto_origin_tls_kex%20%3E%20(model)%20auto_origin_tls_kex_edit_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

enabled: bool

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

<a href="#(resource)%20ssl.auto_origin_tls_kex%20%3E%20(model)%20auto_origin_tls_kex_edit_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

modified\_on: datetime

Last time this setting was modified.

formatdate-time

<a href="#(resource)%20ssl.auto_origin_tls_kex%20%3E%20(model)%20auto_origin_tls_kex_edit_response%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

</details>

[Link to this property](<#(resource)%20ssl.auto_origin_tls_kex%20%3E%20(model)%20auto_origin_tls_kex_edit_response%20%3E%20(schema)>)

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

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
response = client.ssl.auto_origin_tls_kex.edit(
    zone_id="023e105f4ecef8ad9ca31a8372d0c353",
    enabled=True,
)
print(response.id)
```

200 example

200 example

4XX example

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

200 example

200 example

4XX example

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