v1

latestOpenAPI 3.0.2Apache-2.02026-07-142963051.0 MB
Group memberships

Add user to group

Creates a group membership. Only users with admin-level permissions will be able to use this API.

post/group_memberships

Query parameters

fieldsstring[]

A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.

Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.

Request body

role'member' | 'admin'

The role of the user in the group.

configurable_permissionsobject nullable

Custom configuration for the permissions an admin if a group will receive. This option has no effect on members with a role of member.

Setting these permissions overwrites the default access levels of an admin.

Specifying a value of null for this object will disable all configurable permissions. Specifying permissions will set them accordingly, omitted permissions will be enabled by default.

Example request

{
  "user": {
    "id": "1434325"
  },
  "group": {
    "id": "4545523"
  },
  "role": "member",
  "configurable_permissions": {
    "can_run_reports": true
  }
}

Response

Returns a new group membership object.

idstring

The unique identifier for this group membership.

type'group_membership'

The value will always be group_membership.

role'member' | 'admin'

The role of the user in the group.

created_atstring date-time

The time this membership was created.

modified_atstring date-time

The time this membership was last modified.

Example response

{
  "id": "11446498",
  "type": "group_membership",
  "user": {
    "id": "11446498",
    "type": "user",
    "name": "Aaron Levie",
    "login": "ceo@example.com"
  },
  "group": {
    "id": "11446498",
    "type": "group",
    "name": "Support",
    "group_type": "managed_group"
  },
  "role": "member",
  "created_at": "2012-12-12T10:53:43-08:00",
  "modified_at": "2012-12-12T10:53:43-08:00"
}