---
title: "Add roles to User"
method: POST
path: "/business/v2/employees/{userId}/assignRole"
tags: ["User Roles"]
---

# Add roles to User

`POST /business/v2/employees/{userId}/assignRole`

Endpoint to assign a `Role` to an `User`.

## Path parameters

- `userId` string, required — The `User` ID to assign `Role` to.

## Headers

- `X-Soldo-Fingerprint` string, required — [Advanced authentication](ref:advanced-authentication): `SHA512SUM` of the fingerprint values listed in the fingerprint order for this endpoint.
- `X-Soldo-Fingerprint-Signature` string, required — [Advanced authentication](ref:advanced-authentication): Signature of the `X-Soldo-Fingerprint`.

## Request body

- UpdateUserRoleAssignment — Remove `Role` from `User` JSON parameters.
  - `name` string — The name of the `Role`.
  - `description` string — The description of the `Role`.
  - `scope` string — The name of the scope.

## Response `200`

The returned resource is a single `User`.

- AssignedUserRoles
  - `id` string — The `User` ID.
  - `roles` UserRole[] — The list of `UserRole` of the `User`.
    - `id` string — The ID of the `UserRole`.
    - `name` string — The name of the `UserRole`.
    - `description` string — The description of the `UserRole`.
    - `scope` string — The scope of the `UserRole`.

## Other responses

- `400` — Your request has missing arguments or is malformed.

---

[API](https://skmtc.net/soldo/apis/soldo-business-api-v2-0.md) · [All operations](https://skmtc.net/soldo/apis/soldo-business-api-v2-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/soldo/soldo-business-api-v2-0/revisions/7be21448a2b3/schema)
