Endpoints
Create a folder
Unknown fields are rejected. The server also rejects:
- a duplicate name under the same parent (
400), - a parent in a different bucket (
400), - a deleted parent (
400), - a tree deeper than 8 levels (
400).
List root folders
Each item includes
hasSubfolders, totalSubfolders, sharedUsersCount, and an active sharedLink summary when one exists.
Folder details
totalFiles and totalSubfolders are direct counts, not recursive. totalSizeByte sums non-deleted files directly in the folder.
Subfolders
total reflects the filtered list length.
Folder content
Response:
totalFiles and totalFolders reflect the filtered totals, not just the current page.
Rename or reparent
parentId to null makes the folder a root folder. The server rejects cycles, self-parenting, and depth violations.
Prefer
POST /folders/move/{folderId} for moves. It returns a move summary and validates destination rules explicitly. PUT /folders/update is intended for renames and simple reparenting.Move a folder
null to move the folder to the bucket root. A missing field is rejected. A folder cannot move into itself or into one of its descendants.
Response:
Copy a folder
destinationBucketId is required. The copy includes the entire subtree: child folders and non-deleted files. Source files that are in trash are excluded. Storage capacity must cover the duplicated bytes.
Response:
foldersCopied counts the root plus descendants.
Delete and restore
trash is soft (default) or hard. Soft delete cascades to descendant folders and files. Hard delete is permanent.
The delete response has data: null on success.
Restore with:
200 with the message “Folder is not in trash” and the folder ID in data. An elapsed display window returns 410. A missing folder returns 404.