Rulesets API
Last updated Sep 21, 2026 The Rulesets API provides an interface for managing and configuring the execution of rulesets, supporting different Cloudflare products powered by the Ruleset Engine.
Get started
To get started, review the JSON objects and the available endpoints.
You can also validate a mutation before deployment by adding the dry_run=true query parameter.
Limits
You should avoid making concurrent updates to the same ruleset. There are rate limits in place to prevent the same ruleset from being concurrently updated too many times. The exact limits depend on the size of the ruleset and volume of requests, and can be different for each ruleset.
The rate limits are most frequently hit when concurrently modifying several rules in the same ruleset. To avoid this, you should update the entire ruleset in a single operation instead.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"WebPage","@id":"https://developers.cloudflare.com/ruleset-engine/rulesets-api/#page","headline":"Rulesets API","description":"Manage rulesets and rules programmatically with the Rulesets API.","url":"https://developers.cloudflare.com/ruleset-engine/rulesets-api/","inLanguage":"en","image":"https://developers.cloudflare.com/ruleset-engine/rulesets-api/og.png?v=2506693cfeada851","dateModified":"2026-09-21","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: Add a single rule to an existing ruleset using the API. title: Add a rule to a ruleset image: https://developers.cloudflare.com/ruleset-engine/rulesets-api/add-rule/og.png?v=5b6e455ec3fce8cf
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.
Docs