# PATCH /packages/{name}

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the users group.

Update a hosting package

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

UrbeStack applies only the settings you supply and returns the updated package, including its plugin switches. Use name to rename the package. The new name can be up to 64 characters, must start with an ASCII letter or digit, and can contain ASCII letters, digits, spaces, dots, underscores, and hyphens. UrbeStack rejects a new name that another package already uses, regardless of case. Accounts keep their package assignments, and earlier exports retain the old name.

Use 0 for unlimited disk, bandwidth, resource counts, or hourly mail. Numeric limits must be nonnegative integers. Set domain_hourly_limit or account_hourly_limit to null or an empty string to restore the server setting for that limit. Set botmail_keys_per_mailbox to cap the number of bot keys per mailbox. The server ceiling applies when that field is set to null, an empty string, 0, or a value above the ceiling.

Disk quota and hourly mail limit changes take effect immediately. UrbeStack regenerates the mail rate map when an hourly mail limit changes and immediately rechecks bandwidth restrictions when the bandwidth limit changes. Lowering a count limit preserves existing resources. Customers at or above the new limit can add resources once the limit allows it.

Set shell to false to immediately disable shell access for every customer on the package and end their active shell sessions. Set backups to false to disable on-demand backups. Nightly backups continue. Set cron to false to immediately set aside customer crontabs and suspend their jobs. Set cron to true to restore those crontabs.

Use plugins to set switches for one or more plugins with a customer page. Set a switch to true to show the page in the web interface or false to hide it. UrbeStack enables the page for every package when the plugin is registered. Plugin names must be 2 to 32 characters long, start with a lowercase ASCII letter, and contain only lowercase ASCII letters, digits, or hyphens.

Administrators can update any package. Resellers can update only their own packages. A reseller-owned package must have customers set to 0, respect any feature switches disabled in the reseller's own package, and use a positive limit no higher than each corresponding positive limit in that package. Returns 400 for an invalid package or plugin name or a request that specifies no update, 403 if a reseller requests an administrator-owned package, and 404 if the package is missing or belongs to another reseller and the caller is a reseller.

## As a command

- [urbestack-package-set](https://urbestack.com/docs/commands/urbestack-package-set.md): Updates the specified settings of the hosting package selected by --name.

## Parameters

- `name` (path, PackageName, required)

## Request body

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

- `account_hourly_limit` (integer, 0 or more or null): Package limit on messages per hour per mail account, between the domain's default for mail accounts and the server setting in the configuration hierarchy.
- `backups` (boolean): Whether the package allows on-demand backups. The user's nightly backup setting controls whether the server's nightly run backs up that user.
- `bandwidth_mb` (integer, 0 or more): Monthly limit in MB for web, mail and FTP traffic. A value of 0 means unlimited.
- `botmail` (boolean): Whether the package allows BotMail access to mailboxes. Turning this off prevents accounts on the package from creating bot keys and pauses their existing bot keys.
- `botmail_keys_per_mailbox` (integer, 0 or more or null): Maximum number of BotMail keys per mailbox, subject to the server ceiling in mail.botmail_keys_per_mailbox and, for a reseller's packages, the limit on the reseller's own package. A value of null leaves the package limit unset so the server ceiling applies, and 0 or a value above the ceiling is capped at the ceiling.
- `cron` (boolean): Whether the package allows cron jobs. Turning this off sets aside all customer crontabs on the package and stops their jobs until it is turned on again.
- `cron_jobs` (integer, 0 or more): Maximum number of jobs in the customer's crontab, with 0 meaning unlimited. The web interface and API enforce the limit when adding jobs, and customers with shell access can exceed it by editing their crontab directly.
- `customers` (integer, 0 or more): Maximum number of customers a reseller on this package may own, with 0 meaning unlimited. Only administrator packages have this field, and their disk and bandwidth limits for resellers apply to the combined measured usage of the reseller and their customers.
- `databases` (integer, 0 or more)
- `disk_mb` (integer, 0 or more): Disk limit in MB for the entire home directory, including web content, mail and the customer's own backups, plus the customer's databases. A value of 0 means unlimited.
- `domain_hourly_limit` (integer, 0 or more or null): Package limit on messages per hour per sending domain, between the domain's own limit and the server setting in the configuration hierarchy. A value of null leaves the package limit unset, and 0 means unlimited.
- `domains` (integer, 0 or more): Maximum number of domains, including subdomains, with 0 meaning unlimited. UrbeStack enforces the limit only when a domain or subdomain is created.
- `ftp_accounts` (integer, 0 or more)
- `mail_accounts` (integer, 0 or more)
- `name` (PackageName): New package name. UrbeStack rejects a name that matches another package's name regardless of case.
- `plugins` (object of boolean): Map of plugin names to true to show a customer page or false to hide it for customers on this package. Only plugins with a customer page have this setting, which defaults to true for every package when the plugin is registered.
- `shell` (boolean): Whether the package permits shell access. When false, it disables shell access for every customer on the package regardless of their individual shell access setting.

## 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 PATCH "$API/packages/alice" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "account_hourly_limit": 1,
    "backups": true,
    "bandwidth_mb": 1,
    "botmail": true,
    "botmail_keys_per_mailbox": 1,
    "cron": true,
    "cron_jobs": 1,
    "customers": 1,
    "databases": 1,
    "disk_mb": 1,
    "domain_hourly_limit": 1,
    "domains": 1,
    "ftp_accounts": 1,
    "mail_accounts": 1,
    "name": "alice",
    "plugins": {},
    "shell": true
  }'
```

Response, 200 OK:

```
{
  "package": {
    "account_hourly_limit": 1,
    "backups": true,
    "bandwidth_mb": 1,
    "botmail": true,
    "botmail_keys_per_mailbox": 1,
    "created_at": "2026-09-09T10:15:00Z",
    "cron": true,
    "cron_jobs": 1,
    "customers": 1,
    "databases": 1,
    "disk_mb": 1,
    "domain_hourly_limit": 1,
    "domains": 1,
    "ftp_accounts": 1,
    "id": 1,
    "mail_accounts": 1,
    "name": "alice",
    "owner": "text",
    "owner_id": 1,
    "plugins": {},
    "shell": true,
    "users": 1
  }
}
```

## Errors

- 400: --name is required
- 400: --plugin takes NAME=on|off, not '<pair>'
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid <what>: expected a non-negative integer
- 400: Invalid IPv4 address
- 400: Invalid IPv6 address
- 400: Invalid boolean
- 400: Invalid domain name
- 400: Invalid package name: letters, digits, spaces, dots, underscores and dashes, up to 64, starting with a letter or digit
- 400: Invalid port
- 400: Invalid setting key
- 400: Nothing to change
- 401: Authentication required
- 403: The package <p.name> is the administrator's: a reseller changes their own
- 404: Package '<name>' not found
- 404: Setting '<key>' not found
