Adding a User

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

Request Headers

Parameter Description
X-Auth-Account-Url (required) Base URL of the account, e.g. http://myaccount.ispringonline.com
X-Auth-Email (required) Administrator/Publisher e-mail address.
X-Auth-Password (required) Administrator/Publisher password.
X-Email (required) E-mail address of the added user.
X-Password (optional) Password for the added user. If it's not specified, the password will be generated automatically.
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-Groups (optional) Comma-separated list of group IDs, to which a user will be added.

When a request is processed successfully, the system returns code 201. Reponse 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

Code Text Description
403 Duplicated email A user with the specified e-mail address 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.
201 Created A new user has been added.

Sample Request

POST /user HTTP/1.1
Host: api.ispringonline.com
X-Auth-Account-Url: http://myaccount.ispringonline.com
X-Auth-Email: email@email.com
X-Auth-Password: password
X-Email: user@email.com
X-Password: password
X-Send-Login-Email: 1
X-Invitation-Message: message
X-Groups: 1,2,3

Sample Response

HTTP/1.1 201 Created
Server: nginx
Connection: close
X-Exceeded-Groups: 3

<user_id>