You can add a user into iSpring Learn with the addUser method.
Permissions to run the request: Account Owner, Administrators, Department Administrators.
Department Administrators can add users only to the department they manage and its daughter departments.
|credentials (required)||credentials||Read the description of the Credentials object.|
|email (optional)||string||Email of the new user.|
|login (required)||string||Login of the new user.|
|password (optional)||string||Password of the new user.|
|departmentId (required)||string||Department ID the user will be added to.|
|sendLoginEmail (optional, default: true)||bool||Parameter that determines whether an email is sent to the added user.|
|invitationMessage (optional)||string||Text of an invitation message in the email.|
The user might be assigned to one of the roles:
|groups (optional)||string||An array with the IDs of the groups the user will be added to.|
manageableDepartmentIds (required if the user's role is department_administrator or publisher)
An array with the IDs of the departments the user will manage if their role is Department Administrator or Publisher.
After the request has been completed, the system returns an object with the following properties:
|userId||string||ID of the added user.|
|User with the same email is already registered.||A user with the specified e-mail address already exists.|
|User with the same login is already registered.||A user with the specified e-mail address already exists.|
|Number of user accounts is exceeded||A user hasn't been added because the number of user accounts supported by your subscription plan has been exceeded.|
|Permission Denied||An authorized user does not have enough permissions to handle the operation. For example, Department Administrator can't add users to a department they don't manage.|
|Wrong parameters||Some of the sent parameters are incorrect.|