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

# PATCH /v1/users/{userId}

`PATCH /v1/users/{userId}`

Update a user.

## Path parameters

- `userId` string, uuid, required — Id of the user to lock.

## Query parameters

- `id` string — Id of the SLS.
- `code` string — Code of the SLS.

## Request body

- object
  - `accountEnabled` boolean, nullable — Enable or disable the user.
  - `role` object, nullable
    - `name` 'ACCESSOR' | 'QUALIFYING_ACCESSOR', required — Name of the role.
    - `organisationId` string, uuid, required — Id of the organisation.

## Response `200`

The user has been updated.

- object
  - `userId` string — Id of the user.

## Other responses

- `400` — Bad request.
- `401` — The user is not authorized to lock a user.
- `404` — The user does not exist.
- `500` — An error occurred while locking a user.

---

[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/9fac5748cbfb/schema)
