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

# Copy a hub

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

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

To create a copy of an existing Box Hub, call the <Link href="/reference/v2025.0/post-hubs-id-copy">`POST /2.0/hubs/{hub_id}/copy`</Link> endpoint with the source hub ID and optional new title and description. The original hub is not modified.

<Warning>Box Hubs endpoints require the `box-version: 2025.0 header`. If you omit this header, the API returns a 400 error with the message `Missing required box-version header. Supported API versions: [2025.0].` For more information, see [Box API versioning strategy](/guides/api-calls/api-versioning-strategy/).</Warning>

## Copy hub

<CodeGroup>
  ```sh cURL theme={null}
  curl -i -X POST "https://api.box.com/2.0/hubs/HUB_ID/copy" \
       -H "Authorization: Bearer <ACCESS_TOKEN>" \
       -H "box-version: 2025.0" \
       -H "Content-Type: application/json" \
       -d '{
         "title": "HR Hub (Copy)",
         "description": "Copy of the HR hub for a new region."
       }'
  ```

  ```typescript Node/TypeScript v10 theme={null}
  await client.hubs.copyHubV2025R0(createdHub.id, {
    title: copiedHubTitle,
    description: copiedHubDescription,
  } satisfies HubCopyRequestV2025R0);
  ```

  ```python Python v10 theme={null}
  client.hubs.copy_hub_v2025_r0(created_hub.id, title=copied_hub_title, description=copied_hub_description)
  ```

  ```csharp .NET v10 theme={null}
  await client.Hubs.CopyHubV2025R0Async(hubId: createdHub.Id, requestBody: new HubCopyRequestV2025R0() { Title = copiedHubTitle, Description = copiedHubDescription });
  ```

  ```swift Swift v10 theme={null}
  try await client.hubs.copyHubV2025R0(hubId: createdHub.id, requestBody: HubCopyRequestV2025R0(title: copiedHubTitle, description: copiedHubDescription))
  ```

  ```java Java v10 theme={null}
  client.getHubs().copyHubV2025R0(createdHub.getId(), new HubCopyRequestV2025R0.Builder().title(copiedHubTitle).description(copiedHubDescription).build());
  ```
</CodeGroup>

Replace `HUB_ID` with the source hub ID. Request body fields are optional. If you omit the `title` parameter, the API uses a default one. A successful response returns the new <Link href="/reference/v2025.0/resources/hub">Hub</Link> object.

## Request body fields

| Field         | Type   | Required | Description                                             |
| ------------- | ------ | -------- | ------------------------------------------------------- |
| `title`       | string | No       | Title for the new hub. Maximum length is 50 characters. |
| `description` | string | No       | Description for the new hub.                            |

<RelatedLinks
  title="RELATED APIS"
  items={[
{ label: translate("Copy hub"), href: "/reference/v2025.0/post-hubs-id-copy", badge: "POST" },
{ label: translate("Create hub"), href: "/reference/v2025.0/post-hubs", badge: "POST" },
{ label: translate("Get hub by ID"), href: "/reference/v2025.0/get-hubs-id", badge: "GET" }
]}
/>

<RelatedLinks
  title="RELATED GUIDES"
  items={[
{ label: translate("Box Hubs overview"), href: "/guides/hubs-api", badge: "GUIDE" },
{ label: translate("Create a hub"), href: "/guides/hubs-api/hubs/create-hub", badge: "GUIDE" }
]}
/>
