Box Developer Documentation
Beta

Create hub collaboration

post
https://api.box.com/2.0
/hub_collaborations

Adds a collaboration for a single user or a single group to a hub.

Collaborations can be created using email address, user IDs, or group IDs.

Request

bearer [ACCESS_TOKEN]
application/json

Request Headers

stringin headerrequired

Version header.

Value is always 2025.0

Request Body

objectin body

The user or group who gets access to the item.

stringin bodyrequired
"23522323"

The ID of the user or group.

Alternatively, use login to specify a user by email address.

stringin bodyrequired
"user"

The type of collaborator to invite. Possible values are user or group.

stringin bodyrequired
"john@example.com"

The email address of the user who gets access to the item.

Alternatively, use id to specify a user by user ID.

objectin body

Hubs reference.

stringin bodyrequired
"42037322"

ID of the object.

stringin bodyrequired
"hubs"

The value will always be hubs.

Value is always hubs

stringin bodyrequired
"editor"

The level of access granted to hub. Possible values are editor, viewer, and co-owner.

Response

application/jsonHub Collaboration

Returns a new hub collaboration object.

application/jsonClient error

Returns an error when the user does not have the right permissions to create the collaboration.

application/jsonClient error

An unexpected client error.

post
Create hub collaboration
You can now try out some of our APIs live, right here in the documentation.
Log in

Response Example

{
  "id": "12345678",
  "type": "hub_collaboration",
  "acceptance_requirements_status": {
    "strong_password_requirement": {
      "enterprise_has_strong_password_required_for_external_users": true,
      "user_has_strong_password": true
    },
    "terms_of_service_requirement": {
      "is_accepted": true,
      "terms_of_service": {
        "id": "11446498",
        "type": "terms_of_service"
      }
    },
    "two_factor_authentication_requirement": {
      "enterprise_has_two_factor_auth_enabled": true,
      "user_has_two_factor_authentication_enabled": true
    }
  },
  "accessible_by": {
    "id": "11446498",
    "type": "user",
    "login": "ceo@example.com",
    "name": "Aaron Levie"
  },
  "hub": {
    "id": "12345",
    "type": "hubs"
  },
  "role": "editor",
  "status": "accepted"
}