> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Folder

export const MultiRelatedLinks = ({sections = []}) => {
  if (!sections || sections.length === 0) {
    return null;
  }
  return <div className="space-y-8">
      {sections.map((section, index) => <RelatedLinks key={index} title={section.title} items={section.items} />)}
    </div>;
};

export const RelatedLinks = ({title, items = []}) => {
  const getBadgeClass = badge => {
    if (!badge) return "badge-default";
    const badgeType = badge.toLowerCase().replace(/\s+/g, "-");
    return `badge-${badge === "ガイド" ? "guide" : badgeType}`;
  };
  if (!items || items.length === 0) {
    return null;
  }
  return <div className="my-8">
      {}
      <h3 className="text-sm font-bold uppercase tracking-wider mb-4">{title}</h3>

      {}
      <div className="flex flex-col gap-3">
        {items.map((item, index) => <a key={index} href={item.href} className="py-2 px-3 rounded related_link hover:bg-[#f2f2f2] dark:hover:bg-[#111827] flex items-center gap-3 group no-underline hover:no-underline border-b-0">
            {}
            <span className={`px-2 py-1 rounded-full text-xs font-semibold uppercase tracking-wide flex-shrink-0 ${getBadgeClass(item.badge)}`}>
              {item.badge}
            </span>

            {}
            <span className="text-base">{item.label}</span>
          </a>)}
      </div>
    </div>;
};

<RelatedLinks
  title="REQUIRED GUIDES"
  items={[
  { label: "Create Folder", href: "/guides/folders/single/create", badge: "GUIDE" }
]}
/>

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

<CodeGroup>
  ```sh cURL theme={null}
  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"
       }'
  ```

  ```typescript Node/TypeScript v10 theme={null}
  await client.folders.updateFolderById(folderToUpdate.id, {
    requestBody: {
      name: updatedName,
      description: 'Updated description',
    } satisfies UpdateFolderByIdRequestBody,
  } satisfies UpdateFolderByIdOptionalsInput);
  ```

  ```python Python v10 theme={null}
  client.folders.update_folder_by_id(
      folder_to_update.id, name=updated_name, description="Updated description"
  )
  ```

  ```cs .NET v10 theme={null}
  await client.Folders.UpdateFolderByIdAsync(folderId: folderToUpdate.Id, requestBody: new UpdateFolderByIdRequestBody() { Name = updatedName, Description = "Updated description" });
  ```

  ```swift Swift v10 theme={null}
  try await client.folders.updateFolderById(folderId: folderToUpdate.id, requestBody: UpdateFolderByIdRequestBody(name: updatedName, description: "Updated description"))
  ```

  ```java Java v10 theme={null}
  client.getFolders().updateFolderById(folderToUpdate.getId(), new UpdateFolderByIdRequestBody.Builder().name(updatedName).description("Updated description").build())
  ```

  ```java Java v5 theme={null}
  BoxFolder folder = new BoxFolder(api, "id");
  BoxFolder.Info info = folder.new Info();
  info.setName("New Name");
  folder.updateInfo(info);
  ```

  ```python Python v4 theme={null}
  updated_folder = client.folder(folder_id='22222').update_info(data={
      'name': '[ARCHIVED] Planning documents',
      'description': 'Old planning documents',
  })
  print('Folder updated!')
  ```

  ```cs .NET v6 theme={null}
  var requestParams = new BoxFolderRequest()
  {
      Id = "11111",
      Name = "My Documents (2017)"
  };
  BoxFolder updatedFolder = await client.FoldersManager.UpdateInformationAsync(requestParams);
  ```

  ```javascript Node v4 theme={null}
  client.folders.update('11111', {name: 'Pictures from 2017'})
      .then(updatedFolder => {
          /* updatedFolder -> {
              type: 'folder',
              id: '11111',
              sequence_id: '1',
              etag: '1',
              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,
              path_collection: 
              { total_count: 1,
                  entries: 
                  [ { type: 'folder',
                      id: '0',
                      sequence_id: null,
                      etag: null,
                      name: 'All Files' } ] },
              created_by: 
              { type: 'user',
                  id: '22222',
                  name: 'Example User'
                  login: 'user@example.com' },
              modified_by: 
              { type: 'user',
                  id: '22222',
                  name: 'Example User',
                  login: 'user@example.com' },
              owned_by: 
              { type: 'user',
                  id: '22222',
                  name: 'Example User',
                  login: 'user@example.com' },
              shared_link: null,
              parent: 
              { type: 'folder',
                  id: '0',
                  sequence_id: null,
                  etag: null,
                  name: 'All Files' },
              item_status: 'active',
              item_collection: 
              { total_count: 1,
                  entries: 
                  [ { type: 'file',
                      id: '33333',
                      sequence_id: '3',
                      etag: '3',
                      sha1: '134b65991ed521fcfe4724b7d814ab8ded5185dc',
                      name: 'tigers.jpeg' } ],
                  offset: 0,
                  limit: 100 } }
          */
      });
  ```
</CodeGroup>

## 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.

<RelatedLinks
  title="RELATED APIS"
  items={[
  { label: "Update folder", href: "/reference/put-folders-id", badge: "PUT" }
]}
/>

<RelatedLinks
  title="RELATED GUIDES"
  items={[
  { label: "Update Folder", href: "/guides/folders/single/update", badge: "GUIDE" }
]}
/>
