---
title: "Bulk Update User Roles"
method: PATCH
path: "/users/{userId}/roles/bulk"
tags: ["User"]
---

# Bulk Update User Roles

`PATCH /users/{userId}/roles/bulk`

Adds and/or removes roles for a single user in one operation. Remove operations are processed before add operations.

## Path parameters

- `userId` string, required

## Headers

- `tenant-id` string

## Request body

- UserRoleBulkUpdateRequest
  - `add` string[]
  - `remove` string[]

## Response `200`

User roles updated successfully

- BulkRoleUpdateResponse — Response for bulk role update operation
  - `message` string — Success message

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.net/certifyos/apis/certify-api-layer.md) · [All operations](https://skmtc.net/certifyos/apis/certify-api-layer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/certifyos/certify-api-layer/revisions/3d27e9019c7b/schema)
