Sample - Slack Web API
POST/usergroups.users.update

Update User Group members

Replaces the complete membership list for a User Group. Supply usergroup and the comma-separated users value; the submitted list becomes the group's entire user membership.

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

1 parameter · 3 body fields
tokenstringrequired
Authentication token with the `usergroups:write` scope.

Form data identifying a User Group and replacing its complete list of members.

include_countbooleanoptional
Include the number of users in the User Group.
usergroupstringrequired
The encoded ID of the User Group to update.
usersstringrequired
A comma separated string of encoded user IDs that represent the entire list of users for the User Group.

2 status codes
200Returns the updated User Group object, including its membership-related state and status metadata.
okbooleanrequired
Allowed:true
usergroupobjectrequired
defaultTypical error response
callstackstringoptional
Note: PHP callstack is only visible in dev/qa
errorstringrequired
Allowed:permission_deniednot_authedinvalid_authaccount_inactivetoken_revokedno_permissionorg_login_requireduser_is_botuser_is_restrictedinvalid_arg_nameinvalid_array_arginvalid_charset
okbooleanrequired
Allowed:false

Error handling

usergroup and users are required. users must be a comma-separated string of encoded user IDs representing the complete membership list, and the authentication token must have the usergroups:write scope.