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

# Move Folder

export const Link = ({href, children, className, ...props}) => {
  const localizedHref = localizeLink(href);
  return <a href={localizedHref} className={className} {...props}>
      {children}
    </a>;
};

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>;
};

To move a folder, update the ID of its parent folder.

## Operation details

This call will return synchronously. This holds true even
for folder moves when the folder contains a large number
of items in all of its descendants. For very large
folders, this means the call could take
minutes or hours to complete and
some parts of the tree are locked during moves.

When moving a folder, 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 move you cannot perform
other move, copy, delete, or restore operation
on any of the locked folders.

## Moving a subfolder to a private folder

When moving a collaborated subfolder into a private folder, the `owned_by.id` value has to match the authenticated user making the API request.

If `owned_by.id` does not match the requestor’s user ID, you will get the <Link href="/guides/api-calls/permissions-and-errors/common-errors#400-bad-request">`cannot_make_collaborated_subfolder_private`</Link> error.

The Box API doesn’t support changing ownership of a collaborated folder to another user as part of a move operation.

<RelatedLinks
  title="RELATED GUIDES"
  items={[
{ label: translate("Create Folder"), href: "/guides/folders/single/create", badge: "GUIDE" },
{ label: translate("Update Folder"), href: "/guides/folders/single/update", badge: "GUIDE" },
{ label: translate("Delete Folder"), href: "/guides/folders/single/delete", badge: "GUIDE" }
]}
/>
