API operation · backups group
POST
/users/{name}/backup-excludes
First published 3 Oct 2026
0.1.0Unchanged since publicationAdd a backup exclusion for a customer
Who may call it
AdministratorResellerCustomer
Token scope, any of
backupsallAnswers201 Created
An administrator or the customer can add an exclusion. Specify path relative to the customer's home directory, for example web/example.com/public_html/cache. Use at most 255 characters drawn from letters, digits, dots, underscores, hyphens and slashes. The API returns 400 for an invalid path, including a path with a leading slash or a .. component.
An administrator can set locked to true to prevent the customer from editing or removing the exclusion. The API returns 403 if another caller sets locked to true. The response contains the new exclusion in exclude.
As a command
Run as root on the serverParameters
namepath ·UsernameRequiredpathstring, up to 255 charactersRequiredPath relative to the customer's home directory. A leading slash and .. are prohibited.
lockedbooleanWhether to lock the exclusion against customer edits and removal. Only administrators can set this field.
Example
See the API overview for how to set $API and $TOKEN.Request
curl -sS -X POST "$API/users/alice/backup-excludes" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locked": true,
"path": "public_html/index.php"
}'Response ·
201 Created{
"exclude": {
"created_at": "2026-09-09T10:15:00Z",
"id": 1,
"locked": true,
"path": "public_html/index.php"
}
}Errors
13 errors, each a status and a sentence400--path is required400--user is required400A path to leave out is at most 255 characters400A path to leave out is relative to the home, like web/example.com/public_html/cache: letters, digits, dots, dashes and slashes, no .. and no leading slash400An administrator has no home to back up400Invalid boolean400Invalid relative path400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter400Username '<value>' is reserved401Authentication required403Only an administrator locks a row404Unknown user <user>409<path> is already left outNo 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.1.0 on 3 Oct 2026.
urbestack.com/docs/api/post-users-name-backup-excludes/