You can add a user with a POST request to the following URL: /user.
Permission to run the request: Account Owner, Administrator, Organization Administrator.
|X-Auth-Account-Url (required)||Base URL of the account, e.g.|
|X-Auth-Email (required)||Administrator e-mail address.|
|X-Auth-Password (required)||Administrator password.|
E-mail address of the added user.
If user identification by login is enabled in your iSpring Learn account, the X-Email parameter is not required. In this case, that is the X-Login parameter which is required.
|X-Login (optional)||Login of the added user. The X-Login parameter is requied if user identification by login is enabled in your iSpring Learn account.|
|X-Password (optional)||Password for the added user. If it's not specified, the password will be generated automatically.|
|X-Organization-Id (optional)||Organization ID to which a user will be added.|
|X-Send-Login-Email (optional, default: 1)||1 - send an e-mail to the added user.|
0 - do not send an e-mail to the added user.
|X-Invitation-Message (optional)||Text of an invitation message that will be added to the e-mail.|
Assign a role to the new user:
|X-Groups (optional)||Comma-separated list of group IDs to which a user will be added.|
Organization admins can add new users and assign them to groups within their own organization. Admin can't assign a role with higher privileges than his own.
When a request is processed successfully, the system returns code 201. Response body will contain ID of the added user. The response may include the X-Exceeded-Groups header with a comma-separated list of group IDs, to which a user cannot be added.
|409||User with the same email is already registered.||A user with the specified e-mail address already exists.|
|409||User with the same login is already registered.||A user with the specified login already exists.|
|403||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.|
|403||Permission Denied||Authorized user does not have enough permissions to handle the operation. Example: Organization admin can't add users to another organization.|
|400||Bad Request||Some of the sent parameters are incorrect.|
|201||Created||A new user has been added.|
POST /user HTTP/1.1 Host: api.ispringonline.com X-Auth-Account-Url: http://myaccount.ispringlearn.com X-Auth-Email: firstname.lastname@example.org X-Auth-Password: password X-Email: email@example.com X-Password: password X-Send-Login-Email: 1 X-Invitation-Message: message X-Organization-Id: 226 X-Role: administrator X-Groups: 1,2,3
HTTP/1.1 201 Created Connection: close X-Exceeded-Groups: 3 <user_id>