# DELETE /security/modsec/disabled-rules/{id}

First published 19 Nov 2026 (release 0.2.30) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the security group.

Remove a setting that disables a ModSecurity rule

- Who may call it: administrator
- Token scope, any of: security, all
- Answers: 200 OK

Use an entry ID from GET /security/modsec/disabled-rules. The entry determines whether the removal applies server-wide or to a single domain. An administrator can remove the setting regardless of who disabled the rule.

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 removal. The response lists the rules still disabled at the selected scope.

## As a command

- [urbestack-modsec-disabled-rule-del](https://urbestack.com/docs/commands/urbestack-modsec-disabled-rule-del.md): Removes the setting that turns off a ModSecurity rule for one domain or for the whole server.

## Parameters

- `id` (path, integer, 1 or more, required)

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X DELETE "$API/security/modsec/disabled-rules/1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
"text"
```

## Errors

- 400: --as is owner or administrator
- 400: --id is the number of a row of the list
- 400: A rule is named by its number
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid domain name
- 400: Invalid id
- 400: Say which rule: --rule NUMBER, or --id ID
- 400: id is the number of a row of the list
- 401: Authentication required
- 403: A rule is put back by its number in the domain
- 403: A rule turned off for every domain is put back by an administrator
- 403: Rule <rule_id> was turned off for <name> by the administrator, who is the one to put it back
- 404: Domain '<domain>' not found
- 404: No rule turned off has that number
