# DELETE /security/jails/{name}

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the security group.

Delete a custom ban rule

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

To disable a rule shipped with UrbeStack, run urbestack-jail-set with --enabled off. UrbeStack returns 400 if name is invalid, is one of the reserved names default and includes, or identifies a rule shipped with UrbeStack. An unknown rule returns 404.

## As a command

- [urbestack-jail-del](https://urbestack.com/docs/commands/urbestack-jail-del.md): Removes a custom ban rule.

## Parameters

- `name` (path, string, matching ^[a-z0-9][a-z0-9-]{0,31}$, 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/jails/alice" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "name": "alice",
  "removed": 1
}
```

## Errors

- 400: '<n>' is a name fail2ban keeps for itself
- 400: <cur.name> is shipped with the panel: switch it off rather than remove it
- 400: A rule name is 1 to 32 lowercase letters, digits and dashes
- 401: Authentication required
