---
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}`

## Request

- Base URL: `https://nhse-${ENV}-innovation-service-admin-functions.azurewebsites.net/api`
- URL: `https://nhse-${ENV}-innovation-service-admin-functions.azurewebsites.net/api/v1/users/{userId}/roles/{roleId}`
- Auth: none declared

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

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

---

[API](https://skmtc.dev/nhs-england/apis/admin-api-nhs-innovation-service.md) - [All operations](https://skmtc.dev/nhs-england/apis/admin-api-nhs-innovation-service/llms.txt) - [OpenAPI document](https://skmtc.dev/nhs-england/apis/admin-api-nhs-innovation-service/revisions/97dbf652314e?raw)
