Box Developer Documentation
 
    Latest version

    List user's groups

    get
    https://api.box.com/2.0
    /users/:user_id/memberships

    This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.

    Retrieves all the groups for a user. Only members of this group or users with admin-level permissions will be able to use this API.

    Request

    bearer [ACCESS_TOKEN]
    application/json

    Path Parameters

    stringin pathrequired
    12345

    The ID of the user.

    Query Parameters

    integer (int64)in queryoptional
    1000
    1000

    The maximum number of items to return per page.

    integer (int64)in queryoptional
    1000
    0

    The offset of the item at which to begin the response.

    Queries with offset parameter value exceeding 10000 will be rejected with a 400 response.

    Response

    application/jsonGroup memberships

    Returns a collection of membership objects. If there are no memberships, an empty collection will be returned.

    application/jsonClient error

    An unexpected client error.

    get
    List user's groups
    You can now try out some of our APIs live, right here in the documentation.
    Log in

    Request Example

    cURL
    curl -i -X GET "https://api.box.com/2.0/users/12345/memberships" \
         -H "authorization: Bearer <ACCESS_TOKEN>"

    Response Example

    {
      "entries": [
        {
          "created_at": "2012-12-12T10:53:43-08:00",
          "group": {
            "id": "11446498",
            "type": "group",
            "group_type": "managed_group",
            "name": "Support"
          },
          "id": "11446498",
          "modified_at": "2012-12-12T10:53:43-08:00",
          "role": "member",
          "type": "group_membership",
          "user": {
            "id": "11446498",
            "type": "user",
            "login": "ceo@example.com",
            "name": "Aaron Levie"
          }
        }
      ],
      "limit": 1000,
      "offset": 2000,
      "order": [
        {
          "by": "type",
          "direction": "ASC"
        }
      ],
      "total_count": 5000
    }