Adds user data to the import staging area. It requires the current import operation status to be either new or ready. If successful, it changes the operation state to ready.
Permission required: run-import
Changelog
| Version | Description |
|---|---|
| 6.3.0 | Added |
The user ID.
The authentication token.
Note:
- A minimum of one email address and one import ID is required. If any user is missing those, the endpoint will fail and no user will be added to the operation.
- Emails and usernames will not be validated, but they must be unique or the user creation will fail.
- If roles are added, they must be valid Rocket.Chat roles, or the endpoint will fail and no user will be added to the operation.
- The default roles will be added to all users automatically.
- If no password is added, a temporary random password will be generated automatically.
- Users flagged as
deletedwill be created asDeactivatedon Rocket.Chat. - Avatar URLs will not be fetched automatically. The workspace administrator needs to use the Download Pending Avatars button in Manage > Workspace > Import on the workspace after the import is completed.
- Import IDs will not be used as IDs by Rocket.Chat, but you can query users by their import ID with the users.info.
{
"users": [
{
"username": "john.doe",
"emails": [
"john.doe@example.com"
],
"importIds": [
"1523"
],
"name": "John Doe",
"password": "P@ssw0rd"
},
{
"username": "jane.doe",
"emails": [
"jane.doe@example.com"
],
"importIds": [
"1524"
],
"name": "Jane Doe"
}
]
}The user name.
The user email addresses.
A list of IDs that can identify the user.
The user's display name.
A password to assign to this user.
The user's timezone, in number of hours relative to UTC.
A list of roles to assign to the user
The user type, must be either "user" or "bot".
The user's profile bio.
Was the user deleted from the previous system?
A URL pointing to the user's avatar picture.
OK
{
"success": true
}Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}Forbidden
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}