API operation · security group
PUT
/security/firewall/ports
First published 14 Oct 2026
0.2.0Unchanged since publicationReplace the firewall's list of extra open ports
Who may call it
AdministratorResellerCustomer
Token scope, any of
securityallAnswers200 OK
UrbeStack adds new extra port openings and removes those omitted from the list in a single firewall update. An empty string or array removes all extra port openings.
The API also accepts an array of entries in ports. The 2000-character limit applies after the entries are joined with a comma and a space. The API returns 400 if ports is missing, has an unsupported type, contains unsupported characters, or exceeds the limit.
As a command
Run as root on the serverRequest body
JSON· 1 fieldportsstring, up to 2000 charactersRequiredComma-separated list of ports or inclusive ranges from 1 to 65535, with the lower port first in each range. TCP is the default, and you can append /udp for UDP or /tcp for TCP, as in 8080, 9000/udp, 30000-31000.
Example
See the API overview for how to set $API and $TOKEN.Request
curl -sS -X PUT "$API/security/firewall/ports" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ports": "text"
}'Response ·
200 OK{
"closed": [
"text"
],
"opened": [
"text"
],
"ports": [
"text"
]
}Errors
4 errors, each a status and a sentence400A port is a number, or a range like 30000-31000, optionally followed by /udp400The list is up to 2000 characters400ports is the list of extra open ports, comma separated, empty for none401Authentication requiredNo error of this operation matches.
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/put-security-firewall-ports/