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

# Update user

`PATCH /scim/v2/users/{userId}`

Update the specified user by applying a list of [SCIM 2.0 patch operations](https://datatracker.ietf.org/doc/html/rfc7644#section-3.5.2). Attributes not referenced in the request are left unchanged.

To replace the entire user resource in a single request, use the [Replace user](/api/users/replace-user) endpoint.

<Warning>
  Omni does not have a reversible "deactivated" state for users. Setting `active` to `false` revokes the user's membership, which is **not reversible**: their schedules are deleted (unless transferred first) and their Personal Access Tokens are disabled. See [Revoking user memberships](/administration/users/delete) before using this operation.
</Warning>

## Path parameters

- `userId` string, required

## Request body

- object
  - `schemas` string[], required — The SCIM schema URIs for the request. Must include `urn:ietf:params:scim:api:messages:2.0:PatchOp`.
  - `Operations` object[], required — The list of patch operations to apply to the user.
    - `op` 'add' | 'replace' | 'remove', required — The operation to perform.
    - `path` string — The attribute path the operation targets. Omit to apply the operation to the resource as a whole.
    - `value` union, required — The value to apply for the operation. Required for `add` and `replace` operations.
      - string
      - number
      - boolean
      - string[]
      - object
        - `active` boolean
        - `displayName` string
        - `userName` string, email

## Response `200`

User updated successfully

- ScimUser
  - `id` string — Unique identifier for the user
  - `userName` string — The user's email address
  - `displayName` string — The user's display name
  - `active` boolean — Whether the user is active
  - `emails` object[] — The user's email addresses
    - `primary` boolean — Whether this is the user's primary email
    - `value` string — The email address
  - `groups` object[] — User groups that the user belongs to
    - `display` string — The group's display name
    - `value` string — The group's unique identifier
  - `meta` object
    - `resourceType` string — The resource type. This will be `User`.
    - `created` string, date-time — The time the user was created
    - `lastModified` string, date-time — The time the user was last updated
  - `schemas` string[] — SCIM information about the type of schemas used in the API. For example, `urn:ietf:params:scim:schemas:core:2.0:User`
  - `urn:omni:params:1.0:UserAttribute` object — [User attributes](/administration/users/attributes) as key/value pairs, where keys map to the IDs of user attributes defined in Omni. This is the **Reference** column in the **User attributes** page.
  - `urn:omni:params:scim:schemas:extension:user:2.0` object — Omni SCIM extension schema containing additional user metadata
    - `lastLogin` string, date-time, nullable — The timestamp of the user's last login. Will be `null` if the user has never logged in.

## Other responses

- `400` — Invalid patch operations
- `429` — Too Many Requests - Rate limit exceeded (60 requests/minute)

---

[API](https://skmtc.net/omni/apis/omni-api.md) · [All operations](https://skmtc.net/omni/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omni/omni-api/revisions/6b02f7349d0e/schema)
