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

/users/{name}/backup-excludes

First published 3 Oct 20260.1.0Unchanged since publication

Add a backup exclusion for a customer

Who may call it
AdministratorResellerCustomer
Token scope, any of
backupsall
Answers201 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 server

Parameters

namepath ·UsernameRequired

Request body

JSON ·BackupExcludeCreate· 2 fields
pathstring, up to 255 charactersRequired
Path relative to the customer's home directory. A leading slash and .. are prohibited.
lockedboolean
Whether 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 sentence
400--path is required
400--user is required
400A path to leave out is at most 255 characters
400A 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 slash
400An administrator has no home to back up
400Invalid boolean
400Invalid relative path
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Username '<value>' is reserved
401Authentication required
403Only an administrator locks a row
404Unknown user <user>
409<path> is already left out
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/