Permanently remove folder

delete
https://api.box.com/2.0
/folders/:folder_id/trash

Permanently deletes a folder that is in the trash. This action cannot be undone.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
12345

The unique identifier that represent a folder.

The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL https://*.app.box.com/folder/123 the folder_id is 123.

The root folder of a Box account is always represented by the ID 0.

Response

none

Returns an empty response when the folder was permanently deleted.

application/jsonClient error

Returns an error if the folder is not in the trash.

application/jsonClient error

An unexpected client error.

delete
Permanently remove folder
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -i -X DELETE "https://api.box.com/2.0/folders/4353455/trash" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
.NET
await client.FoldersManager.PurgeTrashedFolderAsync("22222");
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!')
Node
client.folders.deletePermanently('22222')
	.then(() => {
		// deletion succeeded — no value returned
	});
TypeScript (Beta)
await client.trashedFolders.deleteTrashedFolderById(folder.id);
Python (Beta)
client.trashed_folders.delete_trashed_folder_by_id(folder.id)
.NET (Beta)
await client.TrashedFolders.DeleteTrashedFolderByIdAsync(folderId: folder.Id).ConfigureAwait(false)