At this stage, the API supports managing files, folders, and web links only. Elements such as callouts, dividers, paragraphs, or sections must be added in the Box Hubs web interface. Content added through the API is placed in the first content block.
The
GET /2.0/hub_items returns HTTP 207 (Multi-Status). The response body includes the status of each operation (add or remove). Follow the API reference for full response and error handling.List hub items
To retrieve all items in a Box Hub, call theGET /2.0/hub_items endpoint with the hub ID.
HUB_ID with your hub ID. You can use optional query parameters marker and limit for pagination. The response includes an entries array of hub items (each with id, type, name).
Add or remove hub items
To add or remove items in a hub, call thePOST /2.0/hubs/{hub_id}/manage_items endpoint with the hub ID and a list of operations. Each operation has an action (add or remove) and an item reference (type and id).
Add a file to a hub
Add a folder to a hub
Remove an item from a hub
HUB_ID, FILE_ID, and FOLDER_ID with actual IDs. For web links, use "type": "web_link" and the web link ID. You can combine multiple add and remove operations in a single request.
Use cases
- Automate hub creation: Use the Box Search API or metadata queries to find content matching criteria, then add the filtered results to a hub with the manage hub items endpoint.
- Event-driven updates: Use webhooks to react to events (for example, a new file in a folder) and add that content to a hub automatically.
