---
title: "Set User Module Roles"
method: PUT
path: "/settings/users/{user_id}/roles"
tags: ["settings"]
---

# Set User Module Roles

`PUT /settings/users/{user_id}/roles`

Set the user's role in one or more modules, at most one role per module.

Each assignment names a module and either the archetype-tagged company role
to grant there or ``None`` to remove the user's role in that module. Only
company-scoped archetype roles are touched; any global or custom role the
user holds is left alone. Module access follows from the archetype's module.

## Path parameters

- `user_id` string, uuid, required

## Request body

- UpdateUserRolesRequest
  - `assignments` RoleAssignment[], required
    - `module` string, required
    - `role_id` string, uuid, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/kobaltlabs/apis/fastapi.md) · [All operations](https://skmtc.dev/kobaltlabs/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kobaltlabs/fastapi/revisions/425d5b8a3c17/schema)
