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

/domains/{name}/modsec/disabled-rules

First published 19 Nov 20260.2.30Unchanged since publication

Disable ModSecurity detection rules for a domain

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

Supply rules for multiple rule numbers or rule for a single number. If both fields are present, rules takes precedence. The API returns 400 if neither field is present, if rules is supplied in a form other than an array of 1 to 200 entries, or if a selected rule number is invalid.

The domain's owner and the reseller who manages the owner can disable up to 20 rules for the domain. Only rules disabled on the owner's behalf count toward that limit. Administrators have no per-domain limit. Only an administrator can re-enable a rule disabled by an administrator, even if the owner had already disabled it.

When UrbeStack manages ModSecurity, it updates its Apache configuration, tests it, and reloads Apache. If Apache rejects the configuration, UrbeStack restores the previous configuration and discards the changes. The response returns the updated list of disabled rules for the domain.

As a command

Run as root on the server

Parameters

namepath ·DomainNameRequired

Request body

JSON· 2 fields
ruleinteger
Single detection rule number of 1 to 8 digits, supplied in place of rules.
rulesarray of integer
Array of 1 to 200 detection rule numbers, each 1 to 8 digits. Select rules from the ModSecurity rule set that detect attacks and add to a request's score, excluding rules that total scores, block requests based on scores, or enforce size limits, as well as custom rules.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/domains/example.com/modsec/disabled-rules" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "rule": 1,
    "rules": [
      1
    ]
  }'
Response · 201 Created
{
  "apache": "text",
  "by_owner": 1,
  "changed": 1,
  "domain": "example.com",
  "files_changed": 1,
  "left": 1,
  "max": 1,
  "owner": "text",
  "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-domains-name-modsec-disabled-rules/