Get your free beta license ↗
API operation · security group
POST

/security/bans/unblock

First published 3 Oct 20260.1.0Unchanged since publication

Lift every active ban that matches the filters

Who may call it
AdministratorResellerCustomer
Token scope, any of
securityall
Answers200 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

Run as root on the server

Request body

JSON ·BanFilter· 6 fields
addressstring, 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.
jailstring, matching ^[a-z0-9][a-z0-9-]{0,31}$
Name of the rule that issued the ban.
qstring, up to 200 characters
IP address, network, or text from the log line that triggered the ban.
servicestring, one of ssh, panel, mail, webmail, phpmyadmin, ftp, sites, repeat, own
Service protected by the rule.
sincestring, 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.
untilstring, 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

See the API overview for how to set $API and $TOKEN.
Request
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

10 errors, each a status and a sentence
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
400A rule name is 1 to 32 lowercase letters, digits and dashes
400A service is one of ssh, panel, mail, webmail, phpmyadmin, ftp, sites, repeat or own
400Invalid id
400Say which bans: an address or network, a service or rule, a search, or a time window; or clear all blocks
400The search is up to 200 characters
401Authentication required
404Ban <id> not found
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/post-security-bans-unblock/