Rate limit API endpoint not returning expected results

Calling rate_limits API to create new rule fails for free account.


curl -X POST "https://api.cloudflare.com/client/v4/zones/ZONEID/rate_limits" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer API_KEY \
    --data '{
  "disabled": false,
  "description": "Test rate limits"
  "match": {
    "request": {
      "url": "*.arashfarr.com"
    "response": {},
    "headers": [
        "name": "Cf-Cache-Status",
        "op": "ne",
        "value": "HIT"
  "threshold": 2,
  "period": 60,
  "action": {
    "mode": "ban",
    "timeout": 60


  "result": null,
  "success": false,
  "errors": [
      "code": 10021,
      "message": "ratelimit.api.not_entitled.account"
  "messages": []

According to docs [0] I should be able to create 1 rule for free plan.
Any suggestion or guidance on where to go from here is greatly appreciated.

[0] https://support.cloudflare.com/hc/en-us/articles/115001635128/#4gd3s4xzV2xOE4CUbRIEAo

Hi there, sorry to hear about your problems.

It looks like that is the API for the previous (paid) version of Rate Limiting, apologies for the confusion!

You can find documentation for the new version here:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.