Box Developer Documentation

A beta version of the new Box developer documentation site is launching soon! Updated Developer Guides, modern API Reference, and AI-powered search are on the way to help you build with Box faster. Stay tuned for more updates.

Update Folder

Update Folder

To update a folder in Box you will need to call the following API.

cURL
curl -i -X PUT "https://api.box.com/2.0/folders/4353455" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
     -H "content-type: application/json" \
     -d '{
       "name": "New folder name"
     }'
Node/TypeScript v10
await client.folders.updateFolderById(folderToUpdate.id, {
  requestBody: {
    name: updatedName,
    description: 'Updated description',
  } satisfies UpdateFolderByIdRequestBody,
} satisfies UpdateFolderByIdOptionalsInput);
Python v10
client.folders.update_folder_by_id(
    folder_to_update.id, name=updated_name, description="Updated description"
)
.NET v10
await client.Folders.UpdateFolderByIdAsync(folderId: folderToUpdate.Id, requestBody: new UpdateFolderByIdRequestBody() { Name = updatedName, Description = "Updated description" });
Swift v10
try await client.folders.updateFolderById(folderId: folderToUpdate.id, requestBody: UpdateFolderByIdRequestBody(name: updatedName, description: "Updated description"))
Java v10
client.getFolders().updateFolderById(folderToUpdate.getId(), new UpdateFolderByIdRequestBody.Builder().name(updatedName).description("Updated description").build())
.NET v6
await client.Folders.UpdateFolderByIdAsync(folderId: folderToUpdate.Id, requestBody: new UpdateFolderByIdRequestBody() { Name = updatedName, Description = "Updated description" });
Node v4
await client.folders.updateFolderById(folderToUpdate.id, {
  requestBody: {
    name: updatedName,
    description: 'Updated description',
  } satisfies UpdateFolderByIdRequestBody,
} satisfies UpdateFolderByIdOptionalsInput);

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.

Timeout

Timeout for this operation is 600 seconds. The operation will complete after a HTTP 503 has been returned.