Add user to groups

POST {{baseUrl}}/api/v1/users/:user_id/groups/associate?groups=<list>

This API adds a user to the groups specified.

OAuth Scope

  • Desk.contacts.UPDATE
  • Desk.settings.UPDATE

Request Params

KeyDatatypeRequiredDescription
helpCenterIdstringID of the help center from which the groups must be validated
groupsstringIDs of the groups to which the user must be added

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring

RESPONSES

status: OK

{&quot;results&quot;:[{&quot;success&quot;:true,&quot;id&quot;:&quot;24073000002957051&quot;,&quot;errors&quot;:null},{&quot;success&quot;:false,&quot;id&quot;:&quot;24073000002793019&quot;,&quot;errors&quot;:{&quot;errorCode&quot;:&quot;FORBIDDEN&quot;,&quot;httpCode&quot;:403,&quot;error&quot;:&quot;Restricted&quot;}},{&quot;success&quot;:false,&quot;id&quot;:&quot;24073000002723212&quot;,&quot;errors&quot;:{&quot;errorCode&quot;:&quot;FORBIDDEN&quot;,&quot;httpCode&quot;:403,&quot;error&quot;:&quot;Restricted&quot;}},{&quot;success&quot;:false,&quot;id&quot;:&quot;24073000002732252&quot;,&quot;errors&quot;:{&quot;errorCode&quot;:&quot;FORBIDDEN&quot;,&quot;httpCode&quot;:403,&quot;error&quot;:&quot;Restricted&quot;}}]}