---
title: "Assign a Role to Users"
method: POST
path: "/accountmanager.assignrole"
tags: ["User Admin"]
---

# Assign a Role to Users

`POST /accountmanager.assignrole`

Assigns a role to multiple users.

## Request body

- object
  - `data` object, required
    - `assign` boolean, required — Set to `true` to assign the user to the role. Set `false` to remove the role from the user.
    - `typedId` string, required — `TypedId` of the role you want to assign or revoke. Either `typedId` or `uniqeName` is required.
    - `uniqueName` string, required — `uniqueName` of the role you want to assign or revoke. Either `typedId` or `uniqeName` is required.
    - `users` string[], required — The list of users' `typedId`s or `loginName`. Can be mixed.

## Response `200`

OK

- object
  - `response` object
    - `node` string
    - `data` unknown
    - `status` number

---

[API](https://skmtc.net/pricefx/apis/the-pricefx-backend-api.md) · [All operations](https://skmtc.net/pricefx/apis/the-pricefx-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pricefx/the-pricefx-backend-api/versions/0850b5d6be73/schema)
