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

/security/firewall/revert

First published 14 Oct 20260.2.0Unchanged since publication

Revert the pending firewall change immediately

Who may call it
AdministratorResellerCustomer
Token scope, any of
securityall
Answers200 OK

A revert restores the previous firewall rules or switches SSH or the web interface back to its previous port and closes the new port. For an SSH port change, UrbeStack first checks for a login that began on the new port after the change. If it finds one, it confirms the port change.

If no change is pending, the request has no effect.

As a command

Run as root on the server

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/security/firewall/revert" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
{
  "change": "text",
  "kind": "profile",
  "new_port": 8443,
  "old_port": 8443,
  "ports": [
    8443
  ],
  "reason": "text",
  "reverted": true,
  "value": 8443,
  "what": "text"
}

Errors

27 errors, each a status and a sentence
400'<zone>' is not a zone this machine knows: timedatectl list-timezones names them
400A new job is queued or running
400Domain name required
400Domain name too long
400Invalid IPv4 address
400Invalid IPv6 address
400Invalid domain name
400Invalid port
400Invalid setting key
400Job parameters must be an object
400PHP <version> cannot be the default: it is hidden from new choices on this server
400PHP <version> cannot be the default: it is not installed on this server
400Unknown job type
400Unknown setting '<key>'
400jobs.keep_days (<keep>) may not be smaller than jobs.show_days (<show>): a job cannot be shown longer than it is kept; 0 keeps them for good
401Authentication required
404Setting '<key>' not found
409<key> cannot take that value: <SECOND>{<k>}{on} <sp> (<k>). <SECOND>{<k>}{move}, or choose another
409<key> cannot take that value: the panel listens on port <port> (panel.port). Move the panel first, or choose another
409<s.subject> cannot take port <port>:
409<s.subject> cannot take port <port>: <why>
409<s.subject> cannot take port <port>: it is the panel's port (panel.port)
409A change is already armed for revert (
409Sharing is required with this license.
409The panel cannot take port <port>:
409The panel cannot take port <port>: <why>
409These are the nameservers of a distribution network with several nodes, and every node lists the same ones. To remove a nameserver or move it to another node, use the actions beside its name on DNS zones › Nameservers & addresses, or urbestack-dns-nameserver
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.2.0 on 14 Oct 2026.
urbestack.com/docs/api/post-security-firewall-revert/