Endpoint
Authentication
Requires authentication via API token in theAuthorization header.
Path Parameters
The ID of the folder to delete or modify
Request Body
Type of deletion:
folder to delete the folder itself, or file to remove a file from the folder.When deleting a folder (delete: "folder")
Action to take with children and files:
root- Move all children folders and files to root levelfolder- Move all children and files to another folder (requirestargetFolderId)cascade- Delete the folder and all its children recursively
Required when
childrenAction is folder. ID of the folder to move children and files to.When removing a file (delete: "file")
ID of the file to remove from the folder
Response
Folder Deletion
Returns a success confirmation.Always
true when the operation succeedsFile Removal
Returns the updated folder object after removing the file.Example Request
Delete folder - move to root
Delete folder - move to another folder
Delete folder - cascade delete all
Remove file from folder
Example Response
200 OK - Folder deleted
200 OK - File removed from folder
400 Bad Request - Invalid action
400 Bad Request - File not in folder
400 Bad Request - Missing file ID
403 Forbidden - Target folder not owned
404 Not Found
Children Actions Explained
root Action
- All child folders are moved to root level (their
parentIdis set tonull) - All files in the folder are moved to root level (their
folderIdis set tonull) - The folder itself is then deleted
folder Action
- All child folders are moved to the specified target folder
- All files in the folder are moved to the specified target folder
- The folder itself is then deleted
- You must own the target folder
cascade Action
- The folder and all its descendants are deleted recursively
- This includes all child folders, their children, and so on
- Files are NOT deleted from the server, only disconnected from folders
- Warning: This cannot be undone
Notes
- You can only delete folders you own (unless you’re an admin)
- Removing a file from a folder does NOT delete the file - it only removes the folder association
- When deleting folders, the
childrenActionparameter is required to prevent accidental data loss - Cascade deletion can take time for folders with many nested children