---
title: "Change User Role"
method: POST
path: "/api/v1/admin/users/{user_id}/change-role"
tags: ["admin-users"]
---

# Change User Role

`POST /api/v1/admin/users/{user_id}/change-role`

Change a user's role, auto-transferring owned records if necessary.

When the new role belongs to different record type groups than the current
role, records owned by the user in the old groups are automatically
transferred to the user's manager (parent role in hierarchy).

If the user owns records and no manager exists in the hierarchy, the
request is rejected with a 409 status and ROLE_CHANGE_BLOCKED error code.

## Path parameters

- `user_id` integer, required

## Headers

- `authorization` string, nullable
- `X-API-Key` string, nullable

## Request body

- ChangeRoleRequest — Request body for changing a user's role.
  - `new_role_id` integer, required — The ID of the role to assign to the user

## Response `200`

Successful Response

- ChangeRoleResponse — Response for a successful role change.
  - `detail` string, required
  - `transferred_records` integer

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/ninjavan/apis/salesforce-sales-cloud-replacement.md) · [All operations](https://skmtc.net/ninjavan/apis/salesforce-sales-cloud-replacement/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ninjavan/salesforce-sales-cloud-replacement/versions/fd3a41a6260b/schema)
