---
title: "Patch a user"
method: PUT
path: "/api/v4/users/{user_id}/patch"
tags: ["users"]
---

# Patch a user

`PUT /api/v4/users/{user_id}/patch`

Partially update a user by providing only the fields you want to update. Omitted fields will not be updated. The fields that can be updated are defined in the request body, all other provided fields will be ignored.
##### Permissions
Must be logged in as the user being updated or have the `edit_other_users` permission.

## Path parameters

- `user_id` string, required

## Request body

- object
  - `email` string
  - `username` string
  - `first_name` string
  - `last_name` string
  - `nickname` string
  - `locale` string
  - `position` string
  - `props` object
  - `notify_props` 38cb7293UserNotifyProps
    - `email` string — Set to "true" to enable email notifications, "false" to disable. Defaults to "true".
    - `push` string — Set to "all" to receive push notifications for all activity, "mention" for mentions and direct messages only, and "none" to disable. Defaults to "mention".
    - `desktop` string — Set to "all" to receive desktop notifications for all activity, "mention" for mentions and direct messages only, and "none" to disable. Defaults to "all".
    - `desktop_sound` string — Set to "true" to enable sound on desktop notifications, "false" to disable. Defaults to "true".
    - `mention_keys` string — A comma-separated list of words to count as mentions. Defaults to username and @username.
    - `channel` string — Set to "true" to enable channel-wide notifications (@channel, @all, etc.), "false" to disable. Defaults to "true".
    - `first_name` string — Set to "true" to enable mentions for first name. Defaults to "true" if a first name is set, "false" otherwise.

## Response `200`

User patch successful

- 38cb7293User
  - `id` string
  - `create_at` integer — The time in milliseconds a user was created
  - `update_at` integer — The time in milliseconds a user was last updated
  - `delete_at` integer — The time in milliseconds a user was deleted
  - `username` string
  - `first_name` string
  - `last_name` string
  - `nickname` string
  - `email` string
  - `email_verified` boolean
  - `auth_service` string
  - `roles` string
  - `locale` string
  - `notify_props` 38cb7293UserNotifyProps
    - `email` string — Set to "true" to enable email notifications, "false" to disable. Defaults to "true".
    - `push` string — Set to "all" to receive push notifications for all activity, "mention" for mentions and direct messages only, and "none" to disable. Defaults to "mention".
    - `desktop` string — Set to "all" to receive desktop notifications for all activity, "mention" for mentions and direct messages only, and "none" to disable. Defaults to "all".
    - `desktop_sound` string — Set to "true" to enable sound on desktop notifications, "false" to disable. Defaults to "true".
    - `mention_keys` string — A comma-separated list of words to count as mentions. Defaults to username and @username.
    - `channel` string — Set to "true" to enable channel-wide notifications (@channel, @all, etc.), "false" to disable. Defaults to "true".
    - `first_name` string — Set to "true" to enable mentions for first name. Defaults to "true" if a first name is set, "false" otherwise.
  - `props` object
  - `last_password_update` integer
  - `last_picture_update` integer
  - `failed_attempts` integer
  - `mfa_active` boolean
  - `timezone` 38cb7293Timezone
    - `useAutomaticTimezone` boolean — Set to "true" to use the browser/system timezone, "false" to set manually. Defaults to "true".
    - `manualTimezone` string — Value when setting manually the timezone, i.e. "Europe/Berlin".
    - `automaticTimezone` string — This value is set automatically when the "useAutomaticTimezone" is set to "true".
  - `terms_of_service_id` string — ID of accepted terms of service, if any. This field is not present if empty.
  - `terms_of_service_create_at` integer — The time in milliseconds the user accepted the terms of service

## Other responses

- `400` — Invalid or missing parameters in URL or request body
- `401` — No access token provided
- `403` — Do not have appropriate permissions

---

[API](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools.md) · [All operations](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infomaniak/api-reference-developer-tools/revisions/158a854b0c7d/schema)
