---
title: Precursor
---

[Skip to content](#%5Ftop) 

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

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Precursor

##### [Get Zone Precursor Config](https://developers.cloudflare.com/api/resources/precursor/methods/get)

GET/zones/{zone\_id}/precursor

##### [Update Zone Precursor Config](https://developers.cloudflare.com/api/resources/precursor/methods/update)

PUT/zones/{zone\_id}/precursor

##### ModelsExpand Collapse 

EnforcementRule object { expression, mode, id, 2 more } 

expression: string

The filter expression that determines which requests the rule matches.

maxLength4000

mode: "min-friction" or "max-security"

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

One of the following:

"min-friction"

"max-security"

id: optional string

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

description: optional string

An informative description of the rule.

enabled: optional boolean

Whether the rule is active.

PrecursorConfig object { default\_mode, enforcement\_rules } 

Deprecateddefault\_mode: optional "off" or "min-friction" or "max-security"

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

One of the following:

"off"

"min-friction"

"max-security"

Deprecatedenforcement\_rules: optional array of [EnforcementRule](https://developers.cloudflare.com/api/resources/precursor#%28resource%29%20precursor%20%3E%20%28model%29%20enforcement%5Frule%20%3E%20%28schema%29) { expression, mode, id, 2 more } 

The ordered list of enforcement rules for the zone.

expression: string

The filter expression that determines which requests the rule matches.

maxLength4000

mode: "min-friction" or "max-security"

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

One of the following:

"min-friction"

"max-security"

id: optional string

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

description: optional string

An informative description of the rule.

enabled: optional boolean

Whether the rule is active.