Get your free beta license ↗
API operation · security group
POST

/security/modsec/disabled-rules

First published 19 Nov 20260.2.30Unchanged since publication

Disable ModSecurity detection rules server-wide

Who may call it
AdministratorResellerCustomer
Token scope, any of
securityall
Answers201 Created

Supply rules or rule. If both are present, the API uses rules. A missing or empty list, more than 200 numbers, or a rule number in an invalid format returns 400. Rules that total scores or block requests based on them, size limits, and custom rules are ineligible.

When UrbeStack manages ModSecurity, it tests Apache's updated configuration before reloading Apache. If Apache rejects the configuration, UrbeStack restores the previous configuration and discards the change. The response lists the rules disabled server-wide.

As a command

Run as root on the server

Request body

JSON· 2 fields
ruleinteger
Single detection rule number of up to 8 digits, supplied in place of rules.
rulesarray of integer
Array of 1 to 200 detection rule numbers, each up to 8 digits. Detection rules recognize attacks and add to a request's score.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/security/modsec/disabled-rules" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "rule": 1,
    "rules": [
      1
    ]
  }'
Response · 201 Created
{
  "apache": "text",
  "changed": 1,
  "counts": {
    "by_administrators": 1,
    "by_owners": 1,
    "domains": 1,
    "gone": 1,
    "server": 1,
    "total": 1
  },
  "files_changed": 1,
  "groups": [
    {
      "by_administrators": 1,
      "by_owners": 1,
      "domains": 1,
      "gone": true,
      "group": "text",
      "message": "text",
      "rule": 1,
      "score": 1,
      "server": true,
      "severity": "text"
    }
  ],
  "limit": 1,
  "max_per_domain": 1,
  "offset": 1,
  "rules": [
    {
      "at": "text",
      "by": "owner",
      "by_name": "text",
      "domain": "example.com",
      "gone": true,
      "group": "text",
      "id": 1,
      "message": "text",
      "owner": "text",
      "paranoia_level": 1,
      "rule": 1,
      "score": 1,
      "severity": "critical"
    }
  ],
  "total": 1
}

Errors

13 errors, each a status and a sentence
400--as is owner or administrator
400--rules takes rule numbers separated by commas
400A rule is named by its number
400Domain name required
400Domain name too long
400Invalid domain name
400Rule <id> is not one of the rule set's detection rules, the ones that recognize an attack and add to a request's score; only those can be turned off here
400Say which rules: one number or several
400Up to 200 rules at a time
400rules is a list of rule numbers, up to 200
401Authentication required
403A rule is turned off for every domain by an administrator
404Domain '<domain>' not found
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.2.30 on 19 Nov 2026.
urbestack.com/docs/api/post-security-modsec-disabled-rules/