# POST /security/bans/clear

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

UrbeStack release 0.2.35 API operation in the security group.

Lift every active ban

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

UrbeStack empties the firewall's ban set, marks each lifted ban as unblocked, and records who lifted it. It tells fail2ban to forget each ban so the next attempt from that IP address counts again. The API returns an Unblocked response.

## As a command

- [urbestack-ban-clear](https://urbestack.com/docs/commands/urbestack-ban-clear.md): Lifts every active ban and empties the firewall's ban set.

## 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 POST "$API/security/bans/clear" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "addresses": [
    "text"
  ],
  "fail2ban": "text",
  "state": "text",
  "unblocked": 1
}
```

## Errors

- 400: Invalid id
- 400: Say which bans: an address or network, a service or rule, a search, or a time window; or clear all blocks
- 401: Authentication required
- 404: Ban <id> not found
