Skip to content
Start here

Precursor

Get Zone Precursor Config
precursor.get(PrecursorGetParams**kwargs) -> PrecursorConfig
GET/zones/{zone_id}/precursor
Update Zone Precursor Config
precursor.update(PrecursorUpdateParams**kwargs) -> PrecursorConfig
PUT/zones/{zone_id}/precursor
ModelsExpand Collapse
class PrecursorConfig: …
mode: Optional[Literal["off", "monitor", "arm"]]

Controls Precursor detection for the zone. off disables detection, monitor records detections without affecting bot scores, and arm allows detections to affect bot scores.

One of the following:
"off"
"monitor"
"arm"
rules: Optional[List[Rule]]

The ordered list of Precursor rules for the zone.

expression: str

The filter expression that determines which requests the rule matches.

maxLength4000
show_interstitial: bool

Whether Precursor shows an interstitial when it takes action on a request.

id: Optional[str]

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

description: Optional[str]

An informative description of the rule.

enabled: Optional[bool]

Whether the rule is active.

show_interstitial: Optional[bool]

Whether Precursor shows an interstitial when it takes action on a request.