Permanently delete file

delete
https://api.box.com/2.0
/files/:file_id/trash

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

Request

application/json

Path Parameters

stringin pathrequired
12345

The unique identifier that represent a file.

The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the url https://*.app.box.com/files/123 the file_id is 123.

Response

none

Returns an empty response when the file was permanently deleted.

application/jsonClient Error

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

You can now try out some of our APIs live, right here in the documentation.
Log In

Request Example

cURL
curl -X DELETE https://api.box.com/2.0/files/12345/trash \
     -H "Authorization: Bearer <ACCESS_TOKEN>"
.NET
await client.FilesManager.PurgeTrashedAsync("11111");
Java
String fileID = "87398";
BoxTrash trash = new BoxTrash(api);
trash.deleteFile(fileID);
Python
file_to_delete = client.file(file_id='11111')
client.trash().permanently_delete_item(file_to_delete)
print('The file was deleted from trash!')
Node
client.files.deletePermanently('11111')
	.then(() => {
		// deletion succeeded — no value returned
	});