---
title: Change Origin Post-Quantum Encryption setting
---

[Skip to content](#_top)

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

[Origin Post Quantum Encryption](https://developers.cloudflare.com/api/go/resources/origin_post_quantum_encryption)

Copy Markdown

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

---

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

# Change Origin Post-Quantum Encryption setting

Deprecated

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

PUT/zones/{zone\_id}/cache/origin\_post\_quantum\_encryption

Instructs Cloudflare to use Post-Quantum (PQ) key agreement algorithms when connecting to your origin. Preferred instructs Cloudflare to opportunistically send a Post-Quantum keyshare in the first message to the origin (for fastest connections when the origin supports and prefers PQ), supported means that PQ algorithms are advertised but only used when requested by the origin, and off means that PQ algorithms are not advertised.

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

##### Accepted Permissions (at least one required)

`Zone Settings Write``Zone Write`

##### ParametersExpand Collapse

<details>

<summary>

params OriginPostQuantumEncryptionUpdateParams

</summary>

ZoneID param.Field\[string]

Path param: Identifier.

maxLength32

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

<details>

<summary>

Value param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/origin_post_quantum_encryption/methods/update#(resource)%20origin_post_quantum_encryption%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20value%20%3E%20(schema)">OriginPostQuantumEncryptionUpdateParamsValue</a>]

Body param: Value of the Origin Post Quantum Encryption Setting.

</summary>

const OriginPostQuantumEncryptionUpdateParamsValuePreferred <a href="https://developers.cloudflare.com/api/go/resources/origin_post_quantum_encryption/methods/update#(resource)%20origin_post_quantum_encryption%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20value%20%3E%20(schema)">OriginPostQuantumEncryptionUpdateParamsValue</a> = "preferred"

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

const OriginPostQuantumEncryptionUpdateParamsValueSupported <a href="https://developers.cloudflare.com/api/go/resources/origin_post_quantum_encryption/methods/update#(resource)%20origin_post_quantum_encryption%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20value%20%3E%20(schema)">OriginPostQuantumEncryptionUpdateParamsValue</a> = "supported"

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

const OriginPostQuantumEncryptionUpdateParamsValueOff <a href="https://developers.cloudflare.com/api/go/resources/origin_post_quantum_encryption/methods/update#(resource)%20origin_post_quantum_encryption%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20value%20%3E%20(schema)">OriginPostQuantumEncryptionUpdateParamsValue</a> = "off"

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

</details>

<a href="#(resource)%20origin_post_quantum_encryption%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_post_quantum_encryption%20%3E%20(method)%20update%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type OriginPostQuantumEncryptionUpdateResponse struct{…}

</summary>

ID OriginPostQuantumEncryptionUpdateResponseID

The identifier of the caching setting.

<a href="#(resource)%20origin_post_quantum_encryption%20%3E%20(model)%20OriginPostQuantumEncryptionUpdateResponse%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_post_quantum_encryption%20%3E%20(model)%20OriginPostQuantumEncryptionUpdateResponse%20%3E%20(schema)%20%3E%20(property)%20editable">Link to this property</a>

<details>

<summary>

Value OriginPostQuantumEncryptionUpdateResponseValue

Value of the Origin Post Quantum Encryption Setting.

</summary>

One of the following:

const OriginPostQuantumEncryptionUpdateResponseValuePreferred OriginPostQuantumEncryptionUpdateResponseValue = "preferred"

<a href="#(resource)%20origin_post_quantum_encryption%20%3E%20(model)%20OriginPostQuantumEncryptionUpdateResponse%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

const OriginPostQuantumEncryptionUpdateResponseValueSupported OriginPostQuantumEncryptionUpdateResponseValue = "supported"

<a href="#(resource)%20origin_post_quantum_encryption%20%3E%20(model)%20OriginPostQuantumEncryptionUpdateResponse%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

const OriginPostQuantumEncryptionUpdateResponseValueOff OriginPostQuantumEncryptionUpdateResponseValue = "off"

<a href="#(resource)%20origin_post_quantum_encryption%20%3E%20(model)%20OriginPostQuantumEncryptionUpdateResponse%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20origin_post_quantum_encryption%20%3E%20(model)%20OriginPostQuantumEncryptionUpdateResponse%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_post_quantum_encryption%20%3E%20(model)%20OriginPostQuantumEncryptionUpdateResponse%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

</details>

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

### Change Origin Post-Quantum Encryption 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_post_quantum_encryption"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  originPostQuantumEncryption, err := client.OriginPostQuantumEncryption.Update(context.TODO(), origin_post_quantum_encryption.OriginPostQuantumEncryptionUpdateParams{
    ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    Value: cloudflare.F(origin_post_quantum_encryption.OriginPostQuantumEncryptionUpdateParamsValuePreferred),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", originPostQuantumEncryption.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_pqe",
    "editable": true,
    "value": "preferred",
    "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_pqe",
    "editable": true,
    "value": "preferred",
    "modified_on": "2014-01-01T05:20:00.12345Z"
  }
}
```