Skip to content
Start here

Precursor

Get Zone Precursor Config
client.precursor.get(PrecursorGetParams { zone_id, cloudflareVersion } params, RequestOptionsoptions?): PrecursorConfig { mode, rules, show_interstitial }
GET/zones/{zone_id}/precursor
Update Zone Precursor Config
client.precursor.update(PrecursorUpdateParams { zone_id, cloudflareVersion, mode, 2 more } params, RequestOptionsoptions?): PrecursorConfig { mode, rules, show_interstitial }
PUT/zones/{zone_id}/precursor
ModelsExpand Collapse
PrecursorConfig { mode, rules, show_interstitial }
mode?: "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?: Array<Rule>

The ordered list of Precursor rules for the zone.

expression: string

The filter expression that determines which requests the rule matches.

maxLength4000
show_interstitial: boolean

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

id?: string

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

description?: string

An informative description of the rule.

enabled?: boolean

Whether the rule is active.

show_interstitial?: boolean

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