---
title: "Adds the user to the role with the specified id."
method: POST
path: "/roles/{roleId}/adduser"
tags: ["roles"]
---

# Adds the user to the role with the specified id.

`POST /roles/{roleId}/adduser`

<Check title="Required Permissions" icon="key">The user must be an admin or have `workspace-manage-config:write` permissions.</Check>

## Path parameters

- `roleId` string, uuid, required

## Headers

- `Authorization` string, required

## Request body

- UserInRoleForm
  - `userId` string, uuid, required — The id of the user to add to the role.

## Response `200`

OK

- RolesPostRoleAddUserByRoleIdResponse200 — Empty response body

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `500` — Internal Server Error

---

[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)
