Copy Folder

Copy Folder

Creates a copy of a folder within a destination folder.

The original folder will not be changed.

To copy a folder in Box you will need to provide our API with the id of the parent folder that you would like to copy the folder into.

curl -i -X POST "" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
     -H "content-type: application/json" \
     -d '{
       "parent": {
         "id": "345345"
TypeScript Gen
await client.folders.copyFolder(, {
  parent: { id: '0' } satisfies CopyFolderRequestBodyParentField,
  name: copiedFolderName,
} satisfies CopyFolderRequestBody);
Python Gen
client.folders.copy_folder(, CopyFolderParent(id="0"), name=copied_folder_name
.NET Gen (Beta)
await client.Folders.CopyFolderAsync(folderId: folderOrigin.Id, requestBody: new CopyFolderRequestBody(parent: new CopyFolderRequestBodyParentField(id: "0")) { Name = copiedFolderName });
folder_id = '22222'
destination_folder_id = '44444'

folder_to_copy = client.folder(folder_id)
destination_folder = client.folder(destination_folder_id)

folder_copy = folder_to_copy.copy(parent_folder=destination_folder)
print(f'Folder "{}" has been copied into folder "{}"')
// Copy folder 11111 into folder 22222
var requestParams = new BoxFolderRequest()
    Id = "11111",
    Parent = new BoxRequestEntity()
        Id = "22222"
BoxFolder folderCopy = await client.FoldersManager.CopyAsync(requestParams);
BoxFolder folder = new BoxFolder(api, "id1");
BoxFolder destination = new BoxFolder(api, "id2");
client.folders.copy('11111', '22222')
    .then(folderCopy => {
       /* folderCopy -> {
            type: 'folder',
            id: '1234567',
            sequence_id: '0',
            etag: '0',
            name: 'Pictures from 2017',
            created_at: '2012-12-12T10:53:43-08:00',
            modified_at: '2012-12-12T11:15:04-08:00',
            description: 'Some pictures I took',
            size: 629644,
            { total_count: 1,
                [ { type: 'folder',
                    id: '0',
                    sequence_id: null,
                    etag: null,
                    name: 'All Files' },
                  { type: 'folder',
                    id: '22222',
                    sequence_id: '3',
                    etag: '3',
                    name: 'Archives' } ] },
            { type: 'user',
                id: '22222',
                name: 'Example User'
                login: '' },
            { type: 'user',
                id: '22222',
                name: 'Example User',
                login: '' },
            { type: 'user',
                id: '22222',
                name: 'Example User',
                login: '' },
            shared_link: null,
            { type: 'folder',
                id: '22222',
                sequence_id: '3',
                etag: '3',
                name: 'Archives' },
            item_status: 'active',
            { total_count: 1,
                [ { type: 'file',
                    id: '44444',
                    sequence_id: '0',
                    etag: '0',
                    sha1: '134b65991ed521fcfe4724b7d814ab8ded5185dc',
                    name: 'tigers.jpeg' } ],
                offset: 0,
                limit: 100 } }
    folderId: "22222",
    destinationFolderID: "12345"
) { (result: Result<Folder, BoxSDKError>) in
    guard case let .success(folderCopy) = result else {
        print("Error copying folder")

    print("Copied folder \( to destination \(folderCopy.parent?.name)")

Optionally, you can provide a different name for the new folder.

client.folders.copy('12345', '0', {name: 'Renamed folder'})
    .then(folderCopy => {
        // ...

Name restrictions

There are some restrictions to the folder name. Names containing non-printable ASCII characters, forward and backward slashes (/, \), as well as names with trailing spaces are prohibited.

Additionally, the names . and .. are reserved names and therefore also prohibited.

Asynchronous copying

If the folder being copied contains up to 500 items the copy will happen synchronously with the API call. The call will not return until the copy operation has completed.

If the folder contains more than 500 items the copy operation will be run asynchronously and the API call will return directly yet before the copy operation has completed. We currently have no API to check when a copy operation has finished.

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. Most importantly, this means that the same folder can not be copied to two different parts of the folder tree at the same time.


If the destination folder has a metadata cascade policy attached to any of the parent folders a metadata cascade operation will be kicked off asynchronously.

We currently have no API to check when this operation has finished.