Sample - Box Platform API
PUT/group_memberships/{group_membership_id}

Update group membership

Updates a user's group membership. Only admins of this group or users with admin-level permissions will be able to use this API.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 2 body fields
group_membership_idstringrequired
The ID of the group membership.
fieldsarray<string>optional
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.
rolestringoptional
The role of the user in the group.
Allowed:memberadmin
configurable_permissionsobjectoptional
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.

2 status codes
200Returns a new group membership object.
idstringoptional
The unique identifier for this group membership.
typestringoptional
The value will always be `group_membership`.
Allowed:group_membership
userobjectoptional
groupobjectoptional
rolestringoptional
The role of the user in the group.
Allowed:memberadmin
created_atstringoptional
The time this membership was created.
modified_atstringoptional
The time this membership was last modified.
defaultAn unexpected client error.
typestringoptional
The value will always be `error`.
Allowed:error
statusintegeroptional
The HTTP status of the response.
codestringoptional
A Box-specific error code.
Allowed:createdacceptedno_contentredirectnot_modifiedbad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictprecondition_failed
messagestringoptional
A short message describing the error.
context_infoobjectoptional
A free-form object that contains additional context about the error. The possible fields are defined on a per-endpoint basis. `message` is only one example.
help_urlstringoptional
A URL that links to more information about why this error occurred.
request_idstringoptional
A unique identifier for this response, which can be used when contacting Box support.

Error handling

Any other status is an error: An unexpected client error.