This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates the assignments of roles and conditions for an existing team member. Changing assignments changes the team member’s access to account assets.
Important: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only.
ID of team member being affected.
New assignments to apply to the team member in this account.
Existing assignment IDs to remove. To retrieve all existing assignment IDs for a team member, call Search Team.
The new assignments, assigned to the given team member.
curl -X PATCH \
'https://www.wixapis.com/roles-management/v2/team/assignments' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
-d '{
"userId": "fed9597b-00a1-4bd6-0000-aff2ec248e7a",
"newAssignments": [
{
"policyId": "6600344420111308827"
}
],
"assignmentIdsToRemove": [
"7167886595789334551"
]
}'
{
"assignments": [
{
"policyId": "6600344420111308827",
"assignmentId": "7167886595789334588",
"subject": {
"id": "fed9597b-00a1-4bd6-0000-aff2ec248e7a",
"subjectType": "USER"
}
}
]
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.