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

# PATCH /users/{userId}

`PATCH /users/{userId}`

## Path parameters

- `userId` string, required

## Headers

- `Content-Type` string, required

## Request body

- PatchUserId
  - `metadata` object
  - `roleIds` string[]

## Response `200`

200 response

- User
  - `createdBy` string, nullable, required
  - `createdTime` string, nullable, required
  - `metadata` object, nullable
  - `profileId` string, nullable
  - `roleIds` string[], nullable
  - `status` 'inactive' | 'active' | 'invite_pending'
  - `updatedBy` string, nullable, required
  - `updatedTime` string, nullable, required
  - `userId` string, required

## Other responses

- `400` — 400 response
- `403` — 403 response
- `404` — 404 response
- `415` — 415 response
- `500` — 500 response

## Changes

- **2023-09-14** `622a6f4fda6c` — 1 warning, 1 info
  - changed the pattern of the request property `roleIds/items/` from `^las:role:[0-9A-Za-z-_]+$` to `^las:role:[0-9A-Za-z-_]{1,32}$`
  - the `roleIds/items/` response's property pattern was changed from `^las:role:[0-9A-Za-z-_]+$` to `^las:role:[0-9A-Za-z-_]{1,32}$` for the status `200`
- **2023-09-07** `7ca8a41be21c` — 1 breaking, 4 warning, 1 info
  - removed the required property `email` from the response with the `200` status
  - removed the request property `avatar`
  - removed the request property `name`
  - removed the optional property `avatar` from the response with the `200` status
  - …2 more
- **2023-08-25** `c8551bfdd99f` — 2 info
  - added the new optional request property `roleIds`
  - added the optional property `roleIds` to the response with the `200` status
- **2023-02-27** `38ef4f3feaaf` — 1 info
  - added the optional property `profileId` to the response with the `200` status
- **2022-09-29** `424af607ab69` — 1 breaking
  - the response property `metadata` became nullable for the status `200`

[Full history](https://skmtc.dev/lucidtechai/apis/lucidtech-api/changes/users/:userId/patch.md)

---

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