---
title: Replace Origin TLS Compliance Modes setting
---

[Skip to content](#_top)

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

[Origin TLS Compliance Modes](https://developers.cloudflare.com/api/go/resources/origin_tls_compliance_modes)

Copy Markdown

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

---

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

# Replace Origin TLS Compliance Modes setting

client.OriginTLSComplianceModes.Update(ctx, params) (\*[OriginTLSComplianceModeUpdateResponse](<https://developers.cloudflare.com/api/go/resources/origin_tls_compliance_modes#(resource)%20origin_tls_compliance_modes%20%3E%20(model)%20OriginTLSComplianceModeUpdateResponse%20%3E%20(schema)>), error)

PUT/zones/{zone\_id}/settings/origin\_tls\_compliance\_modes

Replace the entire set of TLS compliance modes for the zone with the list provided in the request body. PUT performs a full replace, not a merge — any modes not present in the request body are removed. The request body must be of the form `{"value": ["fips", "pqh"]}`. Currently supported modes are `fips` and `pqh`; an empty list clears the constraint. Future modes (e.g. `cnsa2`) may be added; clients should treat unknown values as opaque strings. Invalid mode values are rejected with a 4xx response.

##### 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

<details>

<summary>

params OriginTLSComplianceModeUpdateParams

</summary>

ZoneID param.Field\[string]

Path param: Identifier.

maxLength32

<a href="#(resource)%20origin_tls_compliance_modes%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20zone_id">Link to this property</a>

Value param.Field\[\[]string]

Body param: List of TLS compliance modes that constrain the key-exchange algorithms Cloudflare may use when establishing the TLS connection to the zone’s origin. Currently supported values are <code>fips</code> (FIPS-approved curves) and <code>pqh</code> (post-quantum hybrid). Future modes (e.g. <code>cnsa2</code>) may be added; clients should treat unknown values as opaque strings. Multiple modes are combined as the intersection of their permitted algorithm lists; selections whose intersection is empty are rejected. An empty list clears the constraint.

<a href="#(resource)%20origin_tls_compliance_modes%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20value">Link to this property</a>

</details>

[Link to this property](<#(resource)%20origin_tls_compliance_modes%20%3E%20(method)%20update%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type OriginTLSComplianceModeUpdateResponse struct{…}

</summary>

ID OriginTLSComplianceModeUpdateResponseID

The identifier of the caching setting.

<a href="#(resource)%20origin_tls_compliance_modes%20%3E%20(model)%20OriginTLSComplianceModeUpdateResponse%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

Editable bool

Whether the setting is editable.

<a href="#(resource)%20origin_tls_compliance_modes%20%3E%20(model)%20OriginTLSComplianceModeUpdateResponse%20%3E%20(schema)%20%3E%20(property)%20editable">Link to this property</a>

Value \[]string

List of TLS compliance modes that constrain the key-exchange algorithms Cloudflare may use when establishing the TLS connection to the zone’s origin. Currently supported values are <code>fips</code> (FIPS-approved curves) and <code>pqh</code> (post-quantum hybrid). Future modes (e.g. <code>cnsa2</code>) may be added; clients should treat unknown values as opaque strings. Multiple modes are combined as the intersection of their permitted algorithm lists; selections whose intersection is empty are rejected. An empty list clears the constraint.

<a href="#(resource)%20origin_tls_compliance_modes%20%3E%20(model)%20OriginTLSComplianceModeUpdateResponse%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

ModifiedOn TimeOptional

Last time this setting was modified.

formatdate-time

<a href="#(resource)%20origin_tls_compliance_modes%20%3E%20(model)%20OriginTLSComplianceModeUpdateResponse%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

</details>

[Link to this property](<#(resource)%20origin_tls_compliance_modes%20%3E%20(model)%20OriginTLSComplianceModeUpdateResponse%20%3E%20(schema)>)

### Replace Origin TLS Compliance Modes setting

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/origin_tls_compliance_modes"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  originTLSComplianceMode, err := client.OriginTLSComplianceModes.Update(context.TODO(), origin_tls_compliance_modes.OriginTLSComplianceModeUpdateParams{
    ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    Value: cloudflare.F([]string{"fips", "pqh"}),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", originTLSComplianceMode.ID)
}
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "origin_tls_compliance_modes",
    "editable": true,
    "value": [
      "fips",
      "pqh"
    ],
    "modified_on": "2014-01-01T05:20:00.12345Z"
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "origin_tls_compliance_modes",
    "editable": true,
    "value": [
      "fips",
      "pqh"
    ],
    "modified_on": "2014-01-01T05:20:00.12345Z"
  }
}
```