---
title: "PATCH /v1/users/{userId}/roles/{roleId}"
method: PATCH
path: "/v1/users/{userId}/roles/{roleId}"
---

# PATCH /v1/users/{userId}/roles/{roleId}

`PATCH /v1/users/{userId}/roles/{roleId}`

Update user role.

## Path parameters

- `userId` string, uuid, required
- `roleId` string, uuid, required

## Request body

- object
  - `enabled` boolean

## Response `204`

Updated the user role

- object[]
  - `id` string, uuid, required

## Other responses

- `400` — The request is invalid.
- `401` — The user is not authenticated.
- `403` — The user is not authorized to access this resource.
- `500` — An error occurred while processing the request.

## Changes

- **2024-11-07** `bf0b42ebdc02` — 1 info
  - the response property `items/id` became required for the status `204`
- **2023-08-22** `2b43f8cf5d91` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/nhs/apis/admin-api-nhs-innovation-service/changes/v1/users/:userId/roles/:roleId/patch.md)

---

[API](https://skmtc.dev/nhs/apis/admin-api-nhs-innovation-service.md) · [All operations](https://skmtc.dev/nhs/apis/admin-api-nhs-innovation-service/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nhs/admin-api-nhs-innovation-service/revisions/e3ae090557ab/schema)
