Skip to content

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 parameterdata typedescription
roleId *stringThe 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 of targetPath) or userId is 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-roles

ENDPOINTS

post/api/{targetPath}/user/:userId/add-roles