Set a user's roles and permissions

Grants or retracts selected abilities and roles for a user after confirming that the user belongs to the administrator's active school.

Authentication

AuthorizationBearer

The signed-in SchoolSet user token sent by the frontend.

Request

This endpoint expects an object.
user_idintegerRequired>=1
abilitieslist of stringsOptional
retract_abilitieslist of stringsOptional
rolestring or list of strings or nullOptional
retract_roleslist of stringsOptional

Response

The selected roles and abilities were applied to the user.
statusstringOptional
messagestringOptional
datalist of anyOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error