---
title: "Update user role"
method: PATCH
path: "/users/{userId}"
tags: ["Users"]
---

# Update user role

`PATCH /users/{userId}`

Updates the role of a user in the organization.

    Scope: users:write

## Path parameters

- `userId` string, required — Unique identifier of the user.

## Request body

- object
  - `role` 'admin' | 'member' | 'viewer', required — Role of the user within the organization.

## Response `204`

User role updated successfully

## Other responses

- `400` — Invalid request or cannot demote last admin
- `401` — Invalid or missing API key
- `404` — User not found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/whitewall-dev/apis/waizer-public-api.md) · [All operations](https://skmtc.dev/whitewall-dev/apis/waizer-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/whitewall-dev/waizer-public-api/revisions/1b646f6b7fa8/schema)
