Skip to content
Start here

Get OHTTP Gateway enablement

GET/zones/{zone_id}/settings/ohttp-gateway

Returns the state of Oblivious HTTP enablement for the zone. Requires product subscription to call.

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 Read
Path ParametersExpand Collapse
zone_id: string
maxLength32
ReturnsExpand Collapse
errors: array of object { code, message }

List of errors, empty on success.

code: number

Numeric error code.

message: string

Human-readable error message.

messages: array of object { code, message }

List of informational messages, empty on success.

code: number

Numeric message code.

message: string

Human-readable message.

result: "on" or "off"
One of the following:
"on"
"off"
success: boolean

Whether the API call was successful.

Get OHTTP Gateway enablement

curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/settings/ohttp-gateway \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "errors": [],
  "messages": [],
  "result": "on",
  "success": true
}
{
  "errors": [],
  "messages": [],
  "result": "off",
  "success": true
}
Returns Examples
{
  "errors": [],
  "messages": [],
  "result": "on",
  "success": true
}
{
  "errors": [],
  "messages": [],
  "result": "off",
  "success": true
}