POST

Assign Role


Assigns a specific role to group members.

Calling this method overrides the group member's current role.value.

Notes:

  • Only group admins can assign roles.
  • You cannot create new members with this method.
Endpoint
POST
https://www.wixapis.com/social-groups-proxy/roles/v2/groups/{groupId}/roles/assign

Path Params
groupIdstringRequired

Group ID.

Body Params
memberIdsArray <string>format GUIDminItems 0maxItems 100

Member IDs. Limited to 100 member IDs. See the Members API for details.


roleRole

Role to assign.

Response Object
groupIdstringformat GUID

Group ID.


memberIdsArray <string>format GUIDmaxItems 100

Member IDs. Limited to 100 member IDs. See the Members API for details.


roleRole

Assigned role.

Assign Role Example 1
Request
cURL
curl -X POST \ https://wixapis.com/social-groups/v2/groups/8a258cf5-49f3-41dc-b320-65ec2598315b/roles/assign \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Authorization: <AUTH>' -d '{ "siteMemberIds": [ "e6674661-f294-4f1f-9f22-bc11fa8164e7" ], "role": { "value": "ADMIN" } }'
Response
JSON
{ "groupId": "8a258cf5-49f3-41dc-b320-65ec2598315b", "siteMemberIds": ["e6674661-f294-4f1f-9f22-bc11fa8164e7"], "role": { "value": "ADMIN" } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?