# POST /security/bans/unblock

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 that matches the filters

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

UrbeStack marks each lifted ban as unblocked, records who lifted it, and tells fail2ban to forget it in the rule that issued it. The firewall continues to block an IP address wherever another active ban applies. The API returns an Unblocked response.

Supply at least one nonempty filter among address, jail, service, q, since, and until. The fields use the formats documented by GET /security/bans. A CIDR network in q takes precedence over a CIDR network in the address field. The API returns 400 if no filter is supplied or if jail, service, q, since, or until is invalid.

To lift every active ban, use POST /security/bans/clear.

## As a command

- [urbestack-ban-del](https://urbestack.com/docs/commands/urbestack-ban-del.md): Lifts one active ban by ID or every active ban that matches the filters.

## Request body

JSON, the type [BanFilter](https://urbestack.com/docs/api/types/BanFilter.md).

- `address` (string, up to 64 characters): IP address or network in CIDR notation. Matches bans for the specified IP address or for IP addresses within the network.
- `jail` (string, matching ^[a-z0-9][a-z0-9-]{0,31}$): Name of the rule that issued the ban.
- `q` (string, up to 200 characters): IP address, network, or text from the log line that triggered the ban.
- `service` (string, one of ssh, panel, mail, webmail, phpmyadmin, ftp, sites, repeat, own): Service protected by the rule.
- `since` (string, matching ^\d{4}-\d\d-\d\d(?:[T ]\d\d:\d\d(?::\d\d)?)?Z?$): Inclusive start of the ban time range, given as a UTC date or date and time.
- `until` (string, matching ^\d{4}-\d\d-\d\d(?:[T ]\d\d:\d\d(?::\d\d)?)?Z?$): Inclusive end of the ban time range, given as a UTC date or date and time. A date alone includes the entire day.

## 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/unblock" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "info@example.com",
    "jail": "text",
    "q": "text",
    "service": "ssh",
    "since": "text",
    "until": "text"
  }'
```

Response, 200 OK:

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

## Errors

- 400: '<n>' is a name fail2ban keeps for itself
- 400: <what> is a date (2026-09-17) or a date and time (2026-09-17T14:02:00Z), UTC
- 400: <what> is not a real date
- 400: A rule name is 1 to 32 lowercase letters, digits and dashes
- 400: A service is one of ssh, panel, mail, webmail, phpmyadmin, ftp, sites, repeat or own
- 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
- 400: The search is up to 200 characters
- 401: Authentication required
- 404: Ban <id> not found
