/files/{user}/trash
0.2.0Unchanged since publicationList the entries in the customer's Trash
filesreadallUrbeStack lists entries using the customer's permissions, newest deletion day first. Each entry includes its Trash path, name, original location, and deletion date. The response also includes the retention period in days and the Trash's disk usage if UrbeStack can measure it within a few seconds. The API returns 400 if user identifies an administrator.
The Trash is an ordinary directory at /.trash in the customer's home. Its directory layout stores all Trash metadata. In /.trash/DAY/WHERE/NAME, DAY is the deletion date, WHERE is the original parent directory's full path encoded as one component, and NAME is the entry's name. In WHERE, / becomes %2F and % becomes %25. The home directory itself is encoded as %2F. If a second entry with the same name is deleted from the same directory on the same day, it goes under WHERE%~2.
Nightly cleanup permanently deletes entries whose deletion day is older than files.trash_days. Trashed entries count toward the account's disk usage until they are deleted. Backups exclude the Trash.
As a command
Run as root on the serverParameters
userpath ·UsernameRequiredExample
See the API overview for how to set $API and $TOKEN.curl -sS -X GET "$API/files/alice/trash" \ -H "Authorization: Bearer $TOKEN"
200 OK{
"bytes": 1,
"count": 1,
"items": [
{
"day": "2026-09-09",
"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",
"was_in": "text"
}
],
"keep_days": 1,
"truncated": true,
"user": "alice"
}Errors
5 errors, each a status and a sentence400--user is required400<name> is an administrator: administrators have no home400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter400Username '<value>' is reserved401Authentication requiredurbestack.com/docs/api/get-files-user-trash/