v1

latestOpenAPI 3.1.02026-08-04164270844.7 KB
Users

Edit a user

🔑

Required OAuth scope: users:write.

Edits specific fields of an existing user. Fields not included in the request payload remain unchanged.

patch/api/v2/users/{userId}

Path parameters

userIdstring ObjectId required
Example:507f1f77bcf86cd799439011

The unique ID of the user.

Headers

360-api-version'v2.0' required

The version of the API.

Request body

firstNamestring nullable

The first name of the user.

lastNamestring nullable

The last name of the user.

phonestring nullable

The phone number of the user.

jobstring nullable

The role title of the user.

organizationstring nullable

The organization that the user belongs to.

customstring nullable

The value of the Additional information field in the user’s profile. This is not the value of the custom fields associated with the user.

lang'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'fi' | 'fr' | 'hr' | 'ht_HT' | 'hu' | 'id' | 'it' | 'ja' | 'kar_MM' | 'ko' | 'lt' | 'mh_MH' | 'nl' | 'nl_BE' | 'no' | 'pl' | 'pt' | 'ro' | 'ru' | 'rw_RW' | 'sk' | 'sl' | 'so_SO' | 'sv' | 'sw_KE' | 'th' | 'ti_ET' | 'tr' | 'uk' | 'zh' | 'vi'

The default language of the user, in a bigram format (en, fr, de, etc.).

toBeDeactivatedAtstring date-time nullable

The date and time when the user will be deactivated, in the YYYY-MM-DDThh:mm:ss.sssZ format (ISO 8601 in Coordinated Universal Time (UTC)). Note that this parameter cannot be set on a user that is already deactivated.

mailstring nullable

The email address of the user. Must not correspond to an existing user in the company.

primaryGroupIdstring ObjectId nullable

The unique ID of the primary group of the user.

usernamestring nullable

The username that can be used to log in if the company allows it. Options are: lowercase letters, numbers, and the following special characters: _ - . + # ! $ % & ' * / = ? ^ ` { | } ~.

profileImageIdstring ObjectId nullable

The unique ID of the media to use as the user's profile image. Set to null to remove the current image. Recommended size: 256px × 256px.

Example request

{
  "firstName": "John",
  "lastName": "Smith",
  "phone": "+33123456789",
  "job": "Architect",
  "organization": "360Learning",
  "custom": "Half-time worker",
  "toBeDeactivatedAt": "2024-09-10T23:00:00.000Z",
  "mail": "john.smith@yopmail.com",
  "primaryGroupId": "507f1f77bcf86cd799439011",
  "username": "johnsmith",
  "profileImageId": "507f1f77bcf86cd799439011"
}

Response

Returns the updated user.

_idstring ObjectId required

The unique ID of the user.

mailstring

The email address of the user.

usernamestring

The username that can be used to log in if the company allows it.

status'active' | 'invited' | 'deleted' required

The status of the user.

lang'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'fi' | 'fr' | 'hr' | 'ht_HT' | 'hu' | 'id' | 'it' | 'ja' | 'kar_MM' | 'ko' | 'lt' | 'mh_MH' | 'nl' | 'nl_BE' | 'no' | 'pl' | 'pt' | 'ro' | 'ru' | 'rw_RW' | 'sk' | 'sl' | 'so_SO' | 'sv' | 'sw_KE' | 'th' | 'ti_ET' | 'tr' | 'uk' | 'zh' | 'vi' required

The default language of the user, in a bigram format (en, fr, de, etc.).

firstNamestring

The first name of the user.

lastNamestring

The last name of the user.

jobstring

The role title of the user.

organizationstring

The organization that the user belongs to.

phonestring

The phone number of the user.

customstring

The value of the Additional information field in the user’s profile. This is not the value of the custom fields associated with the user.

deletedAtstring[]

The list of dates and times when the user’s profile was soft deleted, in the YYYY-MM-DDThh:mm:ss.sssZ format (ISO 8601 in Coordinated Universal Time (UTC)).

primaryGroupIdstring ObjectId

The unique ID of the primary group of the user.

reactivatedAtstring[]

The list of dates and times when the user’s profile was reactivated, in the YYYY-MM-DDThh:mm:ss.sssZ format (ISO 8601 in Coordinated Universal Time (UTC)).

lastLoginDatestring date-time

The date and time when the user last logged in, in the YYYY-MM-DDThh:mm:ss.sssZ format (ISO 8601 in Coordinated Universal Time (UTC)).

toBeDeactivatedAtstring date-time

The date and time when the user will be deactivated, in the YYYY-MM-DDThh:mm:ss.sssZ format (ISO 8601 in Coordinated Universal Time (UTC)).

profileImageIdstring ObjectId

The unique ID of the profile image of the user.

Example response

{
  "_id": "507f1f77bcf86cd799439011",
  "mail": "john.smith@yopmail.com",
  "username": "johnsmith",
  "firstName": "John",
  "lastName": "Smith",
  "job": "Engineer",
  "organization": "360Learning",
  "phone": "+33123456789",
  "custom": "Half-time worker",
  "primaryGroupId": "507f1f77bcf86cd799439011",
  "profileImageId": "507f1f77bcf86cd799439011"
}