Endpoints
To invoke a Cloudflare Filters API operation, append the endpoint to the Cloudflare API base URL:
https://api.cloudflare.com/client/v4/For authentication instructions, see Getting Started: Requests in the Cloudflare API documentation.
For help with endpoints and pagination, see Getting Started: Endpoints.
The Cloudflare Filters API supports the operations outlined below. Visit the associated links for examples.
| Operation | Method & Endpoint | Notes |
|---|---|---|
| Create filters | POST zones/{zone_id}/filters | Handled as a single transaction. If there is an error, the entire operation fails. |
| Fetch all filters | GET zones/{zone_id}/filters | Lists all current filters. Results return paginated with 25 items per page by default. Use optional parameters to narrow results. |
| Fetch a filter by ID | GET zones/{zone_id}/filters/{id} | Retrieve a single filter by ID. |
| Update multiple filters | PUT zones/{zone_id}/filters | Handled as a single transaction. All filters must exist for operation to succeed. If there is an error, the entire operation fails. |
| Update a single filter by ID | PUT zones/{zone_id}/filters/{id} | Update a single filter by ID. |
| Delete multiple filters | DELETE zones/{zone_id}/filters | Delete existing filters. Must specify list of filter IDs. Empty requests result in no deletion. Returns HTTP status code 200 if a specified filter does not exist. |
| Delete a single filter by ID | DELETE zones/{zone_id}/filters/{id} | Delete a filter by ID. |