Box Hub collaborations control who can access a hub and at what role. You can invite users or groups by user ID, group ID, or email (for users). Roles are editor, viewer, and co-owner. You can only invite users who have a Box account (any plan) to collaborate on a hub.
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.
Create a hub collaboration
To add a user or group to a hub, call the endpoint and provide:
The hub reference (HUB_ID)
The collaborator’s ID and type in the accessible_by field
The level of access granted to a hub in the role field
await client.HubCollaborations.CreateHubCollaborationV2025R0Async(requestBody: new HubCollaborationCreateRequestV2025R0(hub: new HubCollaborationCreateRequestV2025R0HubField(id: hub.Id), accessibleBy: new HubCollaborationCreateRequestV2025R0AccessibleByField(type: "user") { Id = user.Id }, role: "viewer"));
Replace HUB_ID, USER_ID, and the email with real values. Valid role values are editor, viewer, and co-owner. A successful response returns the new object.
List hub collaborations
To list all collaborations for a hub, call the endpoint with the hub ID.
await client.HubCollaborations.UpdateHubCollaborationByIdV2025R0Async(hubCollaborationId: hubCollaborationId, requestBody: new HubCollaborationUpdateRequestV2025R0() { Role = "editor" });
client.getHubCollaborations().updateHubCollaborationByIdV2025R0(hubCollaborationId, new HubCollaborationUpdateRequestV2025R0.Builder().role("editor").build());
Delete a hub collaboration
To remove a collaborator from a hub, call the endpoint with the hub collaboration ID.