v1

latestOpenAPI 3.1.02026-07-24334970.2 KB
Custom rules

Add a new custom rule

post/1.1/protection/custom-rules

Request body

Example request

{
  "data": {
    "policy_options": {
      "time_box": {
        "authorized_hours_of_the_week": [
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17
        ],
        "response_outside_time_box": "block"
      },
      "rate_limit": {
        "applies_to": "ip",
        "threshold": 100,
        "time_frame": "1h",
        "response_after_threshold": "block"
      }
    }
  }
}

Response

Acknowledges the creation of the custom rule