Page Rules
PageRules
Methods
get/zones/{zone_id}/pagerules
Fetches Page Rules in a zone.
get/zones/{zone_id}/pagerules/{pagerule_id}
Fetches the details of a Page Rule.
post/zones/{zone_id}/pagerules
Creates a new Page Rule.
put/zones/{zone_id}/pagerules/{pagerule_id}
Replaces the configuration of an existing Page Rule. The configuration of the updated Page Rule will exactly match the data passed in the API request.
patch/zones/{zone_id}/pagerules/{pagerule_id}
Updates one or more fields of an existing Page Rule.
delete/zones/{zone_id}/pagerules/{pagerule_id}
Deletes an existing Page Rule.
Security
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Zone Write Page Rules Write
Parameters
pageruleId: string
(maxLength: 32)Identifier.
params:
zone_id: string
(maxLength: 32)Identifier.
Returns
PageRuleDeleteResponse{
id: string
(maxLength: 32)Identifier.
Request example
200Example
Domain types
PageRule{…}
Target{…}
URL target.