Endpoints (2)

Last updated Apr 24, 2026 To invoke a Cloudflare Firewall Rules 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 Firewall Rules API endpoints require a value for <ZONE_ID>.

To retrieve a list of zones associated with your account, use the List Zones operation and note the zone ID associated with the domain whose firewall rules you want to manage.

The Cloudflare Firewall Rules API supports the operations outlined below. Visit the pages in this section for examples.

Operation Method & Endpoint Notes
Create firewall rules POST zones/<ZONE_ID>/firewall/rules Handled as a single transaction. If there is an error, the entire operation fails.
List firewall rules GET zones/<ZONE_ID>/firewall/rules Lists all current firewall rules. Results return paginated with 25 items per page by default. Use optional parameters to narrow results.
Get a firewall rule GET zones/<ZONE_ID>/firewall/rules/<RULE_ID> Retrieve a single firewall rule by ID.
Update firewall rules PUT zones/<ZONE_ID>/firewall/rules Handled as a single transaction. All rules must exist for operation to succeed. If there is an error, the entire operation fails.
Update a firewall rule PUT zones/<ZONE_ID>/firewall/rules/<RULE_ID> Update a single firewall rule by ID.
Delete firewall rules DELETE zones/<ZONE_ID>/firewall/rules Delete existing firewall rules. Must specify list of firewall rule IDs. Empty requests result in no deletion. Returns HTTP status code 200 if a specified rule does not exist.
Delete a firewall rule DELETE zones/<ZONE_ID>/firewall/rules/<RULE_ID> Delete a firewall rule by ID.

Was this helpful?

YesNo

On this page

Endpoints (2) - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/firewall/api/cf-firewall-rules/endpoints/#page","headline":"Endpoints","description":"API endpoints for managing filters and firewall rules.","url":"https://developers.cloudflare.com/firewall/api/cf-firewall-rules/endpoints/","inLanguage":"en","image":"https://developers.cloudflare.com/firewall/api/cf-firewall-rules/endpoints/og.png?v=0541b9f27e384b4a","dateModified":"2026-04-24","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: Retrieve filters or rules with GET API requests. title: GET examples image: https://developers.cloudflare.com/firewall/api/cf-firewall-rules/get/og.png?v=86a3b99deb683fef


Skip to content

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