Restore folder


Restores a folder that has been moved to the trash.

An optional new parent ID can be provided to restore the folder to in case the original folder has been deleted.

Folder locking

During this operation, part of the file tree will be locked, mainly the source folder and all of its descendants, as well as the destination folder.

For the duration of the operation, no other move, copy, delete, or restore operation can performed on any of the locked folders.



Path Parameters

stringin pathrequired

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://* the folder_id is 123.

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

Query Parameters

string arrayin queryoptional

A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.

Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.

Request Body

stringin bodyoptional
Restored Photos

An optional new name for the folder.

objectin body

Specifies an optional ID of a folder to restore the folder to when the original folder no longer exists.

Please be aware that this ID will only be used if the original folder no longer exists. Use this ID to provide a fallback location to restore the folder to if the original location has been deleted.


The ID of parent item



Returns a folder object when the folder has been restored.

application/jsonClient error

Returns an error if the user does not have access to the folder the folder is being restored to, or the user does not have permission to restore folders from the trash.

application/jsonClient error

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

application/jsonClient error
  • Returned an error if there is a folder with the same name in the destination folder.

  • operation_blocked_temporary: Returned if either of the destination or source folders is locked due to another move, copy, delete or restore operation in process.

    The operation can be retried at a later point.

application/jsonClient error

An unexpected client error.

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

Request Example

curl -X GET \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
var requestParams = new BoxFolderRequest()
    Name = "Name in case of conflict",
    Parent = new BoxRequestEntity()
        // Folder will be placed in this parent folder if original location no longer exists
        Id = "12345" 
BoxFolder restoredFolder = await client.FoldersManager.RestoreTrashedFolderAsync(requestParams);
String folderID = "125367";
String newName = "My Documents ORIGINAL";
String newParentID = "98765";

BoxTrash trash = new BoxTrash(api);
// Avoid conflicts at the original location
trash.restoreFolder(folderID, newName, newParentID);
folder_to_restore = client.folder(folder_id='22222')
restored_folder = client.trash().restore_item(folder_to_restore)
print('Folder ID is {0} and name is {1}'.format(,
		// New name in case of conflict
		name: 'New Name',
		// Folder will be placed in this parent folder if the original parent no longer exists
		parent_id: '0'
	.then(restoredFolder => {
		/* trashedFolder -> {
			type: 'folder',
			id: '22222',
			sequence_id: '1',
			etag: '1',
			name: 'Old Files',
			created_at: '2013-05-06T22:37:30-07:00',
			modified_at: '2013-05-06T22:39:08-07:00',
			description: '',
			size: 18482,
			{ total_count: 1,
				[ { type: 'folder',
					id: '0',
					sequence_id: null,
					etag: null,
					name: 'All Files' } ] },
			{ type: 'user',
				id: '33333',
				name: 'Example User',
				login: '' },
			{ type: 'user',
				id: '33333',
				name: 'Example User',
				login: '' },
			trashed_at: null,
			purged_at: null,
			content_created_at: '2013-05-06T22:37:30-07:00',
			content_modified_at: '2013-05-06T22:39:08-07:00',
			{ type: 'user',
				id: '33333',
				name: 'Example User',
				login: '' },
			shared_link: null,
			folder_upload_email: null,
			{ type: 'folder',
				id: '0',
				sequence_id: null,
				etag: null,
				name: 'All Files' },
			item_status: 'active' }