API operation · security group
DELETE
/security/modsec/rules/{id}
First published 19 Nov 2026
0.2.30Unchanged since publicationDelete a custom ModSecurity rule
Who may call it
AdministratorResellerCustomer
Token scope, any of
securityallAnswers200 OK
UrbeStack tests Apache's configuration after removing the rule from the configuration and before reloading Apache. If the test fails, UrbeStack discards the deletion and returns Apache's error. A malformed rule number returns 400.
As a command
Run as root on the serverParameters
idpath ·integer, 1 to 89999RequiredNumber of the custom rule to delete.
Example
See the API overview for how to set $API and $TOKEN.Request
curl -sS -X DELETE "$API/security/modsec/rules/1" \ -H "Authorization: Bearer $TOKEN"
Response ·
200 OK{
"apache": "text",
"deleted": true,
"files_changed": 1,
"rule": 1
}Errors
3 errors, each a status and a sentence400A rule is named by its number400Say which rule: --rule NUMBER401Authentication requiredNo error of this operation matches.
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/delete-security-modsec-rules-id/