Skip to content
Visit Firewall on GitHub
Set theme to dark (⇧+D)


To invoke a Cloudflare Rulesets API operation, append the endpoint to the Cloudflare API base URL:

For authentication instructions, see Getting Started: Requests in the Cloudflare API documentation.

For help with endpoints and pagination, see Getting Started: Endpoints.

The Cloudflare Rulesets API supports the operations outlined below. Visit the associated links for examples.

OperationMethod & EndpointNotes
List RulesetsGET accounts/{account_id}/rulesets

Returns the latest version of all rulesets owned by the account and any managed rulesets the account is entitled to execute.

Get RulesetGET accounts/{account_id}/rulesets/{ruleset_id}

Returns the latest version of a ruleset with the specified ruleset ID.

Create a root RulesetPOST accounts/{account_id}/rulesets

Creates a new root ruleset. An account can only have one root ruleset.

Update RulesetPUT accounts/{account_id}/rulesets/{root_ruleset_id}

Creates a new version of an existing root ruleset.