Appearance
Add User Role
Assign a role to a user within a specified organization or tenant. The user making the request requires ADMIN and MANAGE_PEOPLE permissions to modify user roles.
Parameters
| name * are required parameter | data type | description |
|---|---|---|
roleId * | string | The role identifier to be assigned to the user |
Return Value
A confirmation message with a status code of 201, indicating that the role has been successfully added to the user.
json
{
"statusCode": 201,
"data": true,
"message": "Successfully added role to the users data"
}Error Codes
400 Bad Request: Returned when eitherorgId(part oftargetPath) oruserIdis not valid.401 Unauthorized: Returned when permissions are insufficient.
Examples
bash
curl -X POST -H "Content-Type: application/json" -d '{"roleId": "exampleRoleId"}' -H "Authentication: ZmFrZQ==" https://app.wombat.software/api/{targetPath}/user/:userId/add-rolesENDPOINTS
post
/api/{targetPath}/user/:userId/add-roles