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

# Update a user

`PATCH /v1/users/{userId}`

Updates the details of a specific user (required scope users:write)

## Path parameters

- `userId` integer, required

## Headers

- `Customer-Id` integer, required

## Request body

- UpdateUserModel — Represents a model for updating a user
  - `name` string — The name associated with the user<br/><br/>Optional: Omit to retain current value
  - `email` string — The email associated with the user<br/><br/>Optional: Omit to retain current value
  - `roleId` integer — The role ID associated with the user<br/><br/>Optional: Omit to retain current value
  - `defaultJobCategoryId` integer, nullable — The default job category ID associated with the user<br/><br/>Optional: Omit to retain current value or provide null to unset
  - `position` string, nullable — The job position or title associated with the user<br/><br/>Optional: Omit to retain current value or provide null to unset
  - `type` 'active' | 'inactive' | 'linkedResource' — Represents the type of licence assigned to a user<p>Possible values:</p><ul><li><b>active</b>: Indicates an active licence</li><li><b>inactive</b>: Indicates an inactive licence</li><li><b>linkedResource</b>: Indicates a licence associated with a linked resource</li></ul>
  - `groupId` integer, nullable — The group identifier associated with the user<br/><br/>Optional: Omit to retain current value or provide null to unset
  - `mobile` string, nullable — The mobile phone number associated with the user. The phone number has to start with a + sign followed by the country code, followed by the number without the first zero<br/><br/>Optional: Omit to retain current value or provide null to unset
  - `customFields` CustomFieldWriteModel[] — Custom fields associated with the user<br/><br/>Optional: Omit to retain current value
    - `definitionId` integer, required — The unique identifier of the associated custom field definition
    - `value` string, nullable — The value of this custom field. If set to null, any existing value will be unset

## Response `204`

No Content

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Content
- `500` — Internal Server Error

---

[API](https://skmtc.net/bigchange/apis/bigchange-dx.md) · [All operations](https://skmtc.net/bigchange/apis/bigchange-dx/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bigchange/bigchange-dx/revisions/916e669fc527/schema)
