Caution
box-python-sdk-gen is deprecated and no longer maintained. As of September 17, 2025, it receives no new features, bug fixes, or security patches. Do not use it for new projects.
Use box-python-sdk v10+ instead: pip install "boxsdk>=10".
The equivalent of this page is box-python-sdk/docs/hub_collaborations.md. To migrate existing code, see the migration guide.
- Get Box Hub collaborations
- Create Box Hub collaboration
- Get Box Hub collaboration by collaboration ID
- Update Box Hub collaboration
- Remove Box Hub collaboration
Retrieves all collaborations for a Box Hub.
This operation is performed by calling function get_hub_collaborations_v2025_r0.
See the endpoint docs at API Reference.
client.hub_collaborations.get_hub_collaborations_v2025_r0(hub.id)- hub_id
str- The unique identifier that represent a hub. The ID for any hub can be determined by visiting this hub in the web application and copying the ID from the URL. For example, for the URL
https://*.app.box.com/hubs/123thehub_idis123.
- The unique identifier that represent a hub. The ID for any hub can be determined by visiting this hub in the web application and copying the ID from the URL. For example, for the URL
- marker
Optional[str]- Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires
usemarkerto be set totrue.
- Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires
- limit
Optional[int]- The maximum number of items to return per page.
- box_version
BoxVersionHeaderV2025R0- Version header.
- extra_headers
Optional[Dict[str, Optional[str]]]- Extra headers that will be included in the HTTP request.
This function returns a value of type HubCollaborationsV2025R0.
Retrieves the collaborations associated with the specified Box Hub.
Adds a collaboration for a single user or a single group to a Box Hub.
Collaborations can be created using email address, user IDs, or group IDs.
This operation is performed by calling function create_hub_collaboration_v2025_r0.
See the endpoint docs at API Reference.
client.hub_collaborations.create_hub_collaboration_v2025_r0(
CreateHubCollaborationV2025R0Hub(id=hub.id),
CreateHubCollaborationV2025R0AccessibleBy(type="user", id=user.id),
"viewer",
)- hub
CreateHubCollaborationV2025R0Hub- Box Hubs reference.
- accessible_by
CreateHubCollaborationV2025R0AccessibleBy- The user or group who gets access to the item.
- role
str- The level of access granted to a Box Hub. Possible values are
editor,viewer, andco-owner.
- The level of access granted to a Box Hub. Possible values are
- box_version
BoxVersionHeaderV2025R0- Version header.
- extra_headers
Optional[Dict[str, Optional[str]]]- Extra headers that will be included in the HTTP request.
This function returns a value of type HubCollaborationV2025R0.
Returns a new Box Hub collaboration object.
Retrieves details for a Box Hub collaboration by collaboration ID.
This operation is performed by calling function get_hub_collaboration_by_id_v2025_r0.
See the endpoint docs at API Reference.
client.hub_collaborations.get_hub_collaboration_by_id_v2025_r0(created_collaboration.id)- hub_collaboration_id
str- The ID of the hub collaboration. Example: "1234"
- box_version
BoxVersionHeaderV2025R0- Version header.
- extra_headers
Optional[Dict[str, Optional[str]]]- Extra headers that will be included in the HTTP request.
This function returns a value of type HubCollaborationV2025R0.
Returns a Box Hub collaboration object.
Updates a Box Hub collaboration. Can be used to change the Box Hub role.
This operation is performed by calling function update_hub_collaboration_by_id_v2025_r0.
See the endpoint docs at API Reference.
client.hub_collaborations.update_hub_collaboration_by_id_v2025_r0(
created_collaboration.id, role="editor"
)- hub_collaboration_id
str- The ID of the hub collaboration. Example: "1234"
- role
Optional[str]- The level of access granted to a Box Hub. Possible values are
editor,viewer, andco-owner.
- The level of access granted to a Box Hub. Possible values are
- box_version
BoxVersionHeaderV2025R0- Version header.
- extra_headers
Optional[Dict[str, Optional[str]]]- Extra headers that will be included in the HTTP request.
This function returns a value of type HubCollaborationV2025R0.
Returns an updated Box Hub collaboration object.
Deletes a single Box Hub collaboration.
This operation is performed by calling function delete_hub_collaboration_by_id_v2025_r0.
See the endpoint docs at API Reference.
client.hub_collaborations.delete_hub_collaboration_by_id_v2025_r0(
created_collaboration.id
)- hub_collaboration_id
str- The ID of the hub collaboration. Example: "1234"
- box_version
BoxVersionHeaderV2025R0- Version header.
- extra_headers
Optional[Dict[str, Optional[str]]]- Extra headers that will be included in the HTTP request.
This function returns a value of type None.
A blank response is returned if the Box Hub collaboration was successfully deleted.