API operation · files group
GET
/protected-folders
First published 4 Nov 2026
0.2.24Unchanged since publicationList an account's password-protected folders
Who may call it
AdministratorResellerCustomer
Token scope, any of
filesreadallAnswers200 OK
Each folder includes its path, creation time, directory listing setting, and whether it exists on disk. The response gives the domain and folder URL for each site that serves the folder.
For each folder user, the response includes the username, whether the user is enabled, when access expires, whether it has expired, and the recorded creation and update times. The listing omits passwords and password hashes. The API returns 400 if the selected account is an administrator.
As a command
Run as root on the serverParameters
userquery ·UsernameUsername of the customer whose protected folders to list. Administrators can select any customer, and resellers can select one of their customers. The default is the caller's username.
Example
See the API overview for how to set $API and $TOKEN.Request
curl -sS -X GET "$API/protected-folders?user=alice" \ -H "Authorization: Bearer $TOKEN"
Response ·
200 OK{
"folders": [
{
"created_at": "2026-09-09T10:15:00Z",
"exists": true,
"id": 1,
"list_files": true,
"path": "public_html/index.php",
"sites": [
{
"domain": "example.com",
"url": "text"
}
],
"users": [
{
"created_at": "2026-09-09T10:15:00Z",
"enabled": true,
"ended": true,
"expires_at": "2026-09-16T10:15:00Z",
"updated_at": "text",
"username": "text"
}
]
}
]
}Errors
6 errors, each a status and a sentence400--user is required400<name> is an administrator: administrators have no home, so no folders to protect400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter400Username '<value>' is reserved401Authentication required404User '<user>' not foundNo 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.2.24 on 4 Nov 2026.
urbestack.com/docs/api/get-protected-folders/