Join BoxWorks 2024 to discover what's possible with content and AI!

Register now!

Permanently Delete Folder

Guides Trash Permanently Delete Folder
Edit this page

Permanently Delete Folder

Once a folder has been moved to the trash, it will stay in the trash for 30 days by default before being purged. Administrators of Business or Enterprise accounts can alter the purge window. If you wish to permanently delete the folder from the trash before the purge window expires, make a DELETE request to /folders/:folder_id/trash using the trashed folder's ID .

cURL
curl -i -X DELETE "https://api.box.com/2.0/folders/4353455/trash" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await client.trashedFolders.deleteTrashedFolderById(folder.id);
Python Gen
client.trashed_folders.delete_trashed_folder_by_id(folder.id)
.NET Gen
await client.TrashedFolders.DeleteTrashedFolderByIdAsync(folderId: folder.Id);
Java
String folder = "123456";
BoxTrash trash = new BoxTrash(api);
trash.deleteFolder(folderID);
Python
folder = client.folder(folder_id='22222')
client.trash().permanently_delete_item(folder)
print('The folder was deleted from trash!')
.NET
await client.FoldersManager.PurgeTrashedFolderAsync("22222");
Node
client.folders.deletePermanently('22222')
	.then(() => {
		// deletion succeeded — no value returned
	});