Page tree
Skip to end of metadata
Go to start of metadata

You can add a user with a POST request to the following URL: /user.

Permission to run the request: Account Owner, Administrator, Organization Administrator.

 

Request Headers

ParameterDescription
X-Auth-Account-Url (required)Base URL of the account, e.g. http://myaccount.ispringlearn.com
X-Auth-Email (required)Administrator e-mail address.
X-Auth-Password (required)Administrator password.
X-Email (required)E-mail address of the added user.
X-Login (optional)Login of the added user.
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.
X-Role (optional)

Assign a role to the new user:

10 - regular user,

20 - publisher,

30 - organization admin

40 - account admin

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.

 

Possible Response Codes

CodeTextDescription
409User with the same email is already registered.A user with the specified e-mail address already exists.
409User with the same login is already registered.A user with the specified login already exists.
403Number of user accounts is exceededA user hasn't been added, because the number of user accounts supported by your subscription plan has been exceeded.
403Permission DeniedAuthorized user does not have enough permissions to handle the operation. Example: Organization admin can't add users to another organization.
400Bad RequestSome of the sent parameters are incorrect.
201CreatedA new user has been added.

 

Sample Request

Sample Response

  •