Get your free beta license ↗
API operation · files group
GET

/files/{user}/download

First published 14 Oct 20260.2.0Unchanged since publication

Download a file or download a directory as a ZIP archive

Who may call it
AdministratorResellerCustomer
Token scope, any of
filesreadall
Answers200 OK

UrbeStack streams downloads without a size limit, without buffering the full download in memory, and without saving a copy on the server. If a failure occurs after streaming begins, the response ends early without an error message.

A file is returned as application/octet-stream with Content-Length. To resume a file download, send Range: bytes=N-. The offset N can contain up to 18 decimal digits. A partial response returns 206 with Content-Range. A zero offset or an unsupported Range format yields the full file with status 200.

A directory is returned as a streamed application/zip archive with status 200. The response omits Content-Length and ignores Range. The archive excludes symbolic links and excludes Trash when downloading the home directory. To create an archive that preserves symbolic links, use POST /files/{user}/compress.

The server allows two concurrent downloads in total and one per account. A request that exceeds either limit returns 429.

Parameters

userpath ·UsernameRequired
Username of the customer who owns the home directory. Administrators can specify any customer, and customers can specify only themselves.
pathquery ·HomePathRequired
Required path to the file or directory, starting with /. Use / to download the customer's home directory.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X GET "$API/files/alice/download?path=public_html/index.php" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
The response body is the file itself.

Errors

12 errors, each a status and a sentence
400<name> is an administrator: administrators have no home
400<what> climbs out of the home with ..
400<what> has a name over 255 characters
400<what> holds a control character
400<what> is required
400<what> is too long
400<what> may hold at most 1000 paths
400<what> must be a list of at least one path
400<what> must start with /, which is the home
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Username '<value>' is reserved
401Authentication required
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.2.0 on 14 Oct 2026.
urbestack.com/docs/api/get-files-user-download/