メインコンテンツへスキップ
新しいBox Hubを作成するには、title (必須) を指定してPOST /2.0/hubsエンドポイントを呼び出します。必要に応じてdescriptionも指定できます。Hubはデフォルト設定で作成されます。スタイルやその他のオプションをカスタマイズする場合は、後でAPIまたはBoxウェブアプリを使用できます。
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.

Hubを作成

curl -i -X POST "https://api.box.com/2.0/hubs" \
     -H "Authorization: Bearer <ACCESS_TOKEN>" \
     -H "box-version: 2025.0" \
     -H "Content-Type: application/json" \
     -d '{
       "title": "HR Hub",
       "description": "Central hub for HR policies and onboarding materials."
     }'

リクエスト本文

フィールド必須説明
titlestringはいHubのタイトル。50文字以内にする必要があります。
descriptionstringいいえHubの説明。
成功したレスポンスでは、新しいHubオブジェクトが返されます。作成したHubは、Box Hubsのウェブインターフェースに表示され、APIを使用してその項目やコラボレーションを管理できます。