Endpoints (3)

Last updated Apr 16, 2026 For some operations, you can use specific endpoints provided by the Rulesets API for managing phase entry point rulesets. These endpoints include the phase name in the endpoint instead of the ruleset ID.

For example, instead of using the following endpoint:

PUT /zones/{zone_id}/rulesets/{ruleset_id}

You can use the following endpoint:

PUT /zones/{zone_id}/rulesets/phases/{phase_name}/entrypoint

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

https://api.cloudflare.com/client/v4

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

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

Note

The Rulesets API endpoints require a value for {account_id} or {zone_id}.

To retrieve a list of accounts you have access to, use the List Accounts operation. Note the IDs of the accounts you want to manage.

To retrieve a list of zones you have access to, use the List Zones operation. Note the IDs of the zones you want to manage.

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

List and view rulesets

Operation Method Notes
List existing rulesets GET Returns the list of existing rulesets at the account level or at the zone level.
View a specific ruleset GET Returns the properties of the most recent version of a specific ruleset.
List all versions of a ruleset GET Returns a list of all the versions of a ruleset.
View a specific version of a ruleset GET Returns the configuration of a specific version of a ruleset, including its rules.
List rules in a managed ruleset with a specific tag GET Returns a list of all the rules in a managed ruleset with a specific tag.

Create rulesets

Operation Verb Notes
Create a ruleset POST Creates a new ruleset or a new phase entry point.

Update and deploy rulesets

Operation Verb Notes
Update or deploy a ruleset PUT Updates the basic properties of a ruleset and the list of rules in the ruleset.<br>Allows you to configure the execution of managed rulesets.
Add a rule to a ruleset POST Adds a single rule to an existing ruleset.<br>Allows you to add a single rule without having to include all the existing ruleset rules in the request.
Update a rule in a ruleset PATCH Updates the definition of a single rule within a ruleset.<br>Allows you to change the order of a rule in a ruleset.
Delete a rule in a ruleset DELETE Deletes a single rule in a ruleset.

Delete rulesets

Operation Verb Notes
Delete a ruleset DELETE Deletes all the versions of a ruleset.
Delete a ruleset version DELETE Deletes a specific version of a ruleset.

Was this helpful?

YesNo

On this page

Endpoints (3) - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/ruleset-engine/rulesets-api/endpoints/#page","headline":"Endpoints","description":"Available Rulesets API endpoints for zones and accounts.","url":"https://developers.cloudflare.com/ruleset-engine/rulesets-api/endpoints/","inLanguage":"en","image":"https://developers.cloudflare.com/ruleset-engine/rulesets-api/endpoints/og.png?v=03c909373c297e40","dateModified":"2026-04-16","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: JSON object structure for rulesets and rules in API requests. title: JSON objects image: https://developers.cloudflare.com/ruleset-engine/rulesets-api/json-object/og.png?v=e2e9718e8bb165d5


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/ruleset-engine/llms.txt
Use this file to discover all available pages before exploring further.