API operation · files group
POST
/files/{user}/compress
First published 3 Oct 2026
0.1.0Unchanged since publicationCreate a .zip archive from entries in one directory
Who may call it
AdministratorResellerCustomer
Token scope, any of
filesallAnswers201 Created
Supply 1 to 1000 entries that share a parent directory in paths. An invalid list returns 400. To archive the home directory, select its contents. Supply a .zip destination path in to, in a directory that already exists. If the destination exists, the API returns 409.
UrbeStack uses the Linux distribution's zip with the customer's permissions. The archive stores names relative to the shared parent directory, includes directory contents recursively, and preserves symbolic links as links. Compression has a 15-minute time limit.
As a command
Run as root on the serverParameters
userpath ·UsernameRequiredUsername of the customer who owns the home directory. Administrators can specify any customer, and customers can specify only themselves.
Example
See the API overview for how to set $API and $TOKEN.Request
curl -sS -X POST "$API/files/alice/compress" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"paths": [
"text"
],
"to": "text"
}'Response ·
201 Created{
"count": 1,
"file": {
"inside": true,
"mode": "text",
"modified": "text",
"name": "alice",
"owner": "text",
"path": "public_html/index.php",
"size": 1,
"target": "https://example.com/new",
"target_type": "dir",
"text": true,
"type": "dir"
}
}Errors
16 errors, each a status and a sentence400--path is required400--to is required400--user is required400<name> is an administrator: administrators have no home400<what> climbs out of the home with ..400<what> has a name over 255 characters400<what> holds a control character400<what> is required400<what> is too long400<what> may hold at most 1000 paths400<what> must be a list of at least one path400<what> must start with /, which is the home400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter400Nothing to compress400Username '<value>' is reserved401Authentication 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.1.0 on 3 Oct 2026.
urbestack.com/docs/api/post-files-user-compress/