PUT /zones/{zone_id}/precursor

Updates the Precursor configuration for a zone.

default_mode sets the zone-level enforcement mode. enforcement_rules is the ordered list of rules that override enforcement for matching requests.

This is a partial update: only the fields present in the request body are changed.

Servers

Path parameters

Name Type Required Description
zone_id String Yes

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
default_mode String No

The zone-level Precursor enforcement mode applied to requests that do not match a more specific enforcement rule.

Valid values:

  • "max-security"
  • "off"
  • "min-friction"

Default value: "off"

enforcement_rules[] Array No

The ordered list of enforcement rules for the zone.

enforcement_rules[].id String No

The read-only identifier that Cloudflare assigns to the rule.

enforcement_rules[].description String No

An informative description of the rule.

enforcement_rules[].expression String Yes

The filter expression that determines which requests the rule matches.

enforcement_rules[].enabled Boolean No

Whether the rule is active.

Default value: true

enforcement_rules[].mode String Yes

The override mode Precursor applies to requests matching an enforcement rule. Unlike default_mode, this cannot be off.

Valid values:

  • "max-security"
  • "min-friction"

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.