Skip to content
Start here

Change Origin Post-Quantum Encryption setting

origin_post_quantum_encryption.update(OriginPostQuantumEncryptionUpdateParams**kwargs) -> OriginPostQuantumEncryptionUpdateResponse
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
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
Accepted Permissions (at least one required)
Zone Settings WriteZone Write
ParametersExpand Collapse
zone_id: str

Identifier.

maxLength32
value: Literal["preferred", "supported", "off"]

Value of the Origin Post Quantum Encryption Setting.

One of the following:
"preferred"
"supported"
"off"
ReturnsExpand Collapse
class OriginPostQuantumEncryptionUpdateResponse:
id: Literal["origin_pqe"]

The identifier of the caching setting.

editable: bool

Whether the setting is editable.

value: Literal["preferred", "supported", "off"]

Value of the Origin Post Quantum Encryption Setting.

One of the following:
"preferred"
"supported"
"off"
modified_on: Optional[datetime]

Last time this setting was modified.

formatdate-time

Change Origin Post-Quantum Encryption setting

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
origin_post_quantum_encryption = client.origin_post_quantum_encryption.update(
    zone_id="023e105f4ecef8ad9ca31a8372d0c353",
    value="preferred",
)
print(origin_post_quantum_encryption.id)
{
  "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
{
  "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"
  }
}