---
title: Firewall Rules API · Cloudflare Firewall Rules (deprecated) docs
description: Use the Firewall Rules API to programmatically manage your rules.
lastUpdated: 2024-08-13T19:56:56.000Z
source_url:
  html: https://patricia-pcx17119-l7-overrides.preview.developers.cloudflare.com/firewall/api/cf-firewall-rules/index.md
  md: https://patricia-pcx17119-l7-overrides.preview.developers.cloudflare.com/firewall/api/cf-firewall-rules/
---

Use the Firewall Rules API to programmatically manage your rules.

Deprecation notice

Cloudflare Firewall Rules has been deprecated. Cloudflare has moved existing firewall rules to [WAF custom rules](https://developers.cloudflare.com/waf/custom-rules/). For more information on this change, refer to the [migration guide](https://developers.cloudflare.com/waf/reference/migration-guides/firewall-rules-to-custom-rules/).

When working with the Firewall Rules API, refer to these topics for additional context:

* [Firewall rules actions](https://developers.cloudflare.com/firewall/cf-firewall-rules/actions/)
* [Cloudflare Filters API](https://developers.cloudflare.com/firewall/api/cf-filters/)

To get started with the API, review the Firewall Rules API [JSON object](https://developers.cloudflare.com/firewall/api/cf-firewall-rules/json-object/) and [Endpoints](https://developers.cloudflare.com/firewall/api/cf-firewall-rules/endpoints/).

For more information on the Rules language used to write rule expressions, refer to [Rules language](https://developers.cloudflare.com/ruleset-engine/rules-language/) in the Ruleset Engine documentation.

## Differences from other Cloudflare APIs

The Firewall Rules API behaves differently from most Cloudflare APIs in two ways:

* API calls accept and return multiple items, and allow applying data changes to multiple items.
* Although API calls return the [standard response](https://developers.cloudflare.com/fundamentals/api/), the error object follows the [JSON API standard](http://jsonapi.org/format/#errors), such that in an error condition, it is clear which item produced the error and why.
