Get your free beta license ↗
API operation · settings group
PUT

/settings/{key}

First published 3 Oct 20260.1.0Unchanged since publication

Set a setting by key

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

Requires an administrator token with the settings scope. Returns the resulting setting as key and value. Run a rebuild after changing a setting whose catalog entry has acts set to rebuild. The catalog is available through GET /settings.

Returns 400 if the request body omits value. UrbeStack rejects unknown keys and suggests a known key when it finds a close match. It also rejects changes to secrets it generates for its own use.

On a DNS distribution network with multiple nodes, change dns.nameservers through the network. panel.timezone must be one of the timezones returned by GET /settings. You can turn off telemetry.share only if your license allows it. When you enable security.require_second_factor_admins, administrators can continue using their existing sessions and must use a second factor at their next sign-in.

php.default_version applies to domains without their own PHP version and must name an installed, visible version. Setting php.versions.legacy_enabled updates php.versions.hidden to hide legacy versions omitted from the supplied list. Set jobs.keep_days to 0 to retain jobs indefinitely. A finite jobs.keep_days must be at least jobs.show_days. For this comparison, UrbeStack uses 365 days for an absent jobs.keep_days and 30 days for an absent jobs.show_days.

Changes to firewall.enabled apply or remove UrbeStack's firewall rules immediately. A change to ssh.port takes effect immediately and supports rollback. UrbeStack checks for conflicts between ssh.port and panel.port. While a firewall rollback is armed, UrbeStack rejects changes to an existing ssh.port or panel.port.

As a command

Run as root on the server

Parameters

keypath ·string, matching ^[a-z][a-z0-9_]{0,31}(\.[a-z][a-z0-9_]{0,31}){0,3}$Required

Request body

JSON· 1 field
valuevalue or nullRequired
Any JSON value, subject to the setting's constraints.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X PUT "$API/settings/panel.port" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "value": 8443
  }'
Response · 200 OK
{
  "key": "panel.port",
  "value": 8443
}

Errors

32 errors, each a status and a sentence
400'<zone>' is not a zone this machine knows: timedatectl list-timezones names them
400--value or --value-stdin is required
400<key> is made by the panel for its own use and is not set from outside
400A new job is queued or running
400Domain name required
400Domain name too long
400Give --value or --value-stdin, not both
400Invalid <what>:
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>'
400body is missing required field value
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.1.0 on 3 Oct 2026.
urbestack.com/docs/api/put-settings-key/