---
title: "Moves a user from their current role to another role."
method: POST
path: "/roles/moveuser"
tags: ["roles"]
---

# Moves a user from their current role to another role.

`POST /roles/moveuser`

Moves a user from their current role to another role.
            At least one user needs to remain in the admin role.

<Check title="Required Permissions" icon="key">The user must be an admin or have `workspace-manage-config:write` permissions.</Check>

## Headers

- `Authorization` string, required

## Request body

- MoveUserInRole
  - `userId` string, uuid — The id of the user to be moved to another role.
  - `toRoleId` string, uuid — The id of the role the user should be moved to.

## Response `200`

OK

- RolesPostRolesMoveUserResponse200 — Empty response body

## Other responses

- `400` — Bad Request
- `404` — Not Found

---

[API](https://skmtc.net/awork-io/apis/api-v1-reference.md) · [All operations](https://skmtc.net/awork-io/apis/api-v1-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/awork-io/api-v1-reference/versions/f784a53f60df/schema)
