PUT

Change Role


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Overrides all the roles of a contributor for the specified site.

Endpoint
PUT
https://www.wixapis.com/roles-management/contributor/change/role

Body Params
accountIdstringRequiredformat GUID

Contributor's account ID.


newRolesArray <SiteRoleAssignment>Required

New roles to assign to the contributor on the site.

Response Object
newAssignedRolesArray <SiteRoleAssignment>

New roles assigned to the contributor on the site.

Change contributor role
Request
cURL
curl -X PATCH \ 'https://www.wixapis.com/roles-management/contributor/change/role' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ -d '{ "accountId": "fed9597b-00a1-4bd6-0000-aff2ec248e7a", "newRoles": [ { "roleId": "6600344420111308827", } ] }'
Response
JSON
{ "newAssignedRoles": [ { "roleId": "6600344420111308827", "assignmentId": "7261756085891267597" } ] }
Errors

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

Did this help?