bulkDeleteFolders( )

Temporarily deletes the specified folders from the Media Manager.

The bulkDeleteFolders() function returns a Promise that resolves when the folders are deleted.

The deleted folders are moved to the Media Manager's TRASH_ROOT folder (trash bin) unless permanently deleted. To permanently delete folders, pass the permanent parameter with the value true. Permanently deleting folders isn't reversible, so make sure that the files in these folders aren't being used in a site or in any other way as the files will no longer be accessible.


  • When a folder is deleted, the files in that folder are deleted.
  • The specified folders can be from different parent folders.
  • Moving multiple folders at once is an asynchronous action, and may take time for the changes to appear in the Media Manager.
  • Attempting to delete folders that are already in the trash bin doesn't result in an error.
  • If your site contains files from a non-permanently deleted media folder, the files still appear on your site as the deleted folder is still in the Media Manager (in the trash bin).
  • You can use the bulkRestoreFoldersFromTrashBin() function to restore folders from the Media Manager's trash bin.
Admin Method

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Manage Media Manager
Learn more about permission scopes.
Method Declaration
Method Parameters

IDs of the folders to move to the Media Manager's trash bin.


Options to use when deleting folders.

Was this helpful?