API operation · files group
DELETE
/protected-folders/{id}/users/{username}
First published 4 Nov 2026
0.2.24Unchanged since publicationRemove a user from a protected folder
Who may call it
AdministratorResellerCustomer
Token scope, any of
filesallAnswers200 OK
UrbeStack reloads Apache and the removed user loses access immediately. If you remove the last user, Apache still prompts for credentials and denies access. The API returns 200 with the updated protected folder in the folder field.
The caller must be signed in, have permission to act on the folder owner's account, and use a token with the files scope. The API returns 400 for an invalid folder ID or username format, and 404 if the protected folder does not exist.
As a command
Run as root on the serverParameters
idpath ·integer, 1 or moreRequiredThe protected folder ID returned by the listing.
usernamepath ·ProtectedUsernameRequiredThe username of the protected folder user to remove.
Example
See the API overview for how to set $API and $TOKEN.Request
curl -sS -X DELETE "$API/protected-folders/1/users/text" \ -H "Authorization: Bearer $TOKEN"
Response ·
200 OK{
"folder": {
"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
10 errors, each a status and a sentence400--<_> is required400--user is required400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter400The folder id is a number400The username must be 1\x{2013}64 characters, start with a letter or number, and contain only letters, numbers, dots, underscores, hyphens, @ or +.400Username '<value>' is reserved401Authentication required404<username> is not a user of <f.path>404No protected folder <id>404User '<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/delete-protected-folders-id-users-username/