Retrieves details for a folder, including the first 100 entries in the folder.
Passing sort, direction, offset, and limit
parameters in query allows you to manage the
list of returned
folder items.
To fetch more items within the folder, use the Get items in a folder endpoint.
This operation is performed by calling function getFolderById.
See the endpoint docs at API Reference.
await client.folders.getFolderById('0');
string
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. Example: “12345”GetFolderByIdOptionalsInputThis function returns a value of type FolderFull.
Returns a folder, including the first 100 entries in the folder.
If you used query parameters like
sort, direction, offset, or limit
the folder items list will be affected accordingly.
To fetch more items within the folder, use the Get items in a folder) endpoint.
Not all available fields are returned by default. Use the fields query parameter to explicitly request any specific fields.
Updates a folder. This can be also be used to move the folder, create shared links, update collaborations, and more.
This operation is performed by calling function updateFolderById.
See the endpoint docs at API Reference.
await client.folders.updateFolderById(folderToUpdate.id, {
requestBody: {
name: updatedName,
description: 'Updated description',
} satisfies UpdateFolderByIdRequestBody,
} satisfies UpdateFolderByIdOptionalsInput);
string
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. Example: “12345”UpdateFolderByIdOptionalsInputThis function returns a value of type FolderFull.
Returns a folder object for the updated folder
Not all available fields are returned by default. Use the fields query parameter to explicitly request any specific fields.
If the user is moving folders with a large number of items in all of their descendants, the call will be run asynchronously. If the operation is not completed within 10 minutes, the user will receive a 200 OK response, and the operation will continue running.
Deletes a folder, either permanently or by moving it to the trash.
This operation is performed by calling function deleteFolderById.
See the endpoint docs at API Reference.
await client.folders.deleteFolderById(newFolder.id);
string
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. Example: “12345”DeleteFolderByIdOptionalsInputThis function returns a value of type undefined.
Returns an empty response when the folder is successfully deleted or moved to the trash.
Retrieves a page of items in a folder. These items can be files, folders, and web links.
To request more information about the folder itself, like its size, use the Get a folder endpoint instead.
This operation is performed by calling function getFolderItems.
See the endpoint docs at API Reference.
await client.folders.getFolderItems(folderOrigin.id);
string
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. Example: “12345”GetFolderItemsOptionalsInputThis function returns a value of type Items.
Returns a collection of files, folders, and web links contained in a folder.
Creates a new empty folder within the specified parent folder.
This operation is performed by calling function createFolder.
See the endpoint docs at API Reference.
await client.folders.createFolder({
name: newFolderName,
parent: { id: '0' } satisfies CreateFolderRequestBodyParentField,
} satisfies CreateFolderRequestBody);
CreateFolderRequestBody
CreateFolderOptionalsInputThis function returns a value of type FolderFull.
Returns a folder object.
Not all available fields are returned by default. Use the fields query parameter to explicitly request any specific fields.
Creates a copy of a folder within a destination folder.
The original folder will not be changed.
This operation is performed by calling function copyFolder.
See the endpoint docs at API Reference.
await client.folders.copyFolder(folderOrigin.id, {
parent: { id: '0' } satisfies CopyFolderRequestBodyParentField,
name: copiedFolderName,
} satisfies CopyFolderRequestBody);
string
https://*.app.box.com/folder/123 the folder_id is 123. The root folder with the ID 0 can not be copied. Example: “0”CopyFolderRequestBody
CopyFolderOptionalsInputThis function returns a value of type FolderFull.
Returns a new folder object representing the copied folder.
Not all available fields are returned by default. Use the fields query parameter to explicitly request any specific fields.