v1

latestOpenAPI 3.1.02026-08-04164270844.7 KB
Users

Create an invited user

🔑

Required OAuth scope: users:write.

Creates a new user account with the invited status. If a user with the same 'mail' or 'username' was previously deleted, this operation will restore their account to an invited status.

If 'mail' is provided, the user receives an invitation email upon creation to activate their account, along with other emails. The account can also be activated via the 'Activate a user' endpoint. If 'sendInvitationEmail' is set to false, the user will not receive the invitation email, but may still receive other emails.

post/api/v2/users

Query parameters

sendInvitationEmail'true' | 'false'

If true (or not provided), the invitation email is sent to the created user. If false, the invitation email is not sent.

Headers

360-api-version'v2.0' required

The version of the API.

Request body

mailstring

The email address of the user. If not given, username must be given.

usernamestring

The username that can be used to log in if the company allows it. If not given, mail must be given.

primaryGroupIdstring ObjectId

The unique ID of the primary group 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.

firstNamestring

The first name of the user.

lastNamestring

The last name of the user.

jobstring

The role title 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'

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

organizationstring

The organization that the user belongs to.

phonestring

The phone number of the user.

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)).

Example request

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

Response

Returns the previously deleted user, who has been successfully restored to an invited status.

_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"
}