Updates a user's group membership. Only admins of this group or users with admin-level permissions will be able to use this API.
434534
The ID of the group membership.
id,type,name
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.
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.
true
A key value pair of custom permissions.
"member"
The role of the user in the group.
Value is one of member
,admin
Returns a new group membership object.
An unexpected client error.
curl -i -X PUT "https://api.box.com/2.0/group_memberships/434534" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"role": "admin"
}'
{
"id": "11446498",
"type": "group_membership",
"created_at": "2012-12-12T10:53:43-08:00",
"group": {
"id": "11446498",
"type": "group",
"group_type": "managed_group",
"name": "Support"
},
"modified_at": "2012-12-12T10:53:43-08:00",
"role": "member",
"user": {
"id": "11446498",
"type": "user",
"login": "ceo@example.com",
"name": "Aaron Levie"
}
}