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

# 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 = localizeLink(href);
  return <a href={localizedHref} className={className} {...props}>
      {children}
    </a>;
};

既存のBox Hubを更新するには、Hub IDと変更するフィールドを指定して<Link href="/reference/v2025.0/put-hubs-id">`PUT /2.0/hubs/{hub_id}`</Link>エンドポイントを呼び出します。タイトル、説明、AI設定、コラボレーションの制限を更新できます。

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

## Hubを更新

<CodeGroup>
  ```sh Box CLI theme={null}
  box hubs:update 12345 --title "HR Hub" --description "Updated description for HR policies and onboarding." --ai-enabled
  ```

  ```sh cURL theme={null}
  curl -i -X PUT "https://api.box.com/2.0/hubs/HUB_ID" \
       -H "Authorization: Bearer <ACCESS_TOKEN>" \
       -H "box-version: 2025.0" \
       -H "Content-Type: application/json" \
       -d '{
         "title": "HR Hub",
         "description": "Updated description for HR policies and onboarding.",
         "is_ai_enabled": true
       }'
  ```

  ```typescript Node/TypeScript v10 theme={null}
  await client.hubs.updateHubByIdV2025R0(hubId, {
    title: newHubTitle,
    description: newHubDescription,
  } satisfies HubUpdateRequestV2025R0);
  ```

  ```python Python v10 theme={null}
  client.hubs.update_hub_by_id_v2025_r0(hub_id, title=new_hub_title, description=new_hub_description)
  ```

  ```csharp .NET v10 theme={null}
  await client.Hubs.UpdateHubByIdV2025R0Async(hubId: hubId, requestBody: new HubUpdateRequestV2025R0() { Title = newHubTitle, Description = newHubDescription });
  ```

  ```swift Swift v10 theme={null}
  try await client.hubs.updateHubByIdV2025R0(hubId: hubId, requestBody: HubUpdateRequestV2025R0(title: newHubTitle, description: newHubDescription))
  ```

  ```java Java v10 theme={null}
  client.getHubs().updateHubByIdV2025R0(hubId, new HubUpdateRequestV2025R0.Builder().title(newHubTitle).description(newHubDescription).build());
  ```
</CodeGroup>

`HUB_ID`を実際のHub IDに置き換えます。リクエスト本文のフィールドは省略可能です。更新するフィールドのみを含めてください。

## リクエスト本文のフィールド

| フィールド                                       | 型       | 必須  | 説明                         |
| ------------------------------------------- | ------- | --- | -------------------------- |
| `title`                                     | string  | いいえ | Box Hubのタイトル。最大文字数は50文字です。 |
| `description`                               | string  | いいえ | Box Hubの説明。                |
| `is_ai_enabled`                             | boolean | いいえ | AI機能がHubに対して有効になっているかどうか。  |
| `is_collaboration_restricted_to_enterprise` | boolean | いいえ | コラボレーションが企業内に制限されているかどうか。  |

成功したレスポンスでは、更新された<Link href="/reference/v2025.0/resources/hub">Hub</Link>オブジェクトが返されます。

<RelatedLinks
  title="関連するAPI"
  items={[
{ label: translate("Update hub"), href: "/reference/v2025.0/put-hubs-id", badge: "PUT" },
{ label: translate("Get hub by ID"), href: "/reference/v2025.0/get-hubs-id", badge: "GET" }
]}
/>

<RelatedLinks
  title="関連するガイド"
  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" }
]}
/>
