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

/protected-folders

First published 4 Nov 20260.2.24Unchanged since publication

List an account's password-protected folders

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

Parameters

userquery ·Username
Username 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 sentence
400--user is required
400<name> is an administrator: administrators have no home, so no folders to protect
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Username '<value>' is reserved
401Authentication required
404User '<user>' not found
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/