You can add a user with a POST request to the following URL: /user.
Permissions to run the request: Account Owner, Administrators, Department Administrators.
Department Administrators can add users only to the department they manage and its sub-departments.
|X-Auth-Account-Url (required)||The base URL of the account, e.g.|
The login of Account Owner, Administrator, or Department Administrator.
|X-Auth-Password (required)||The password of Account Owner, Administrator, or Department Administrator.|
|email (optional)||The email of the new user.|
|login (required)||The login of the new user.|
|password (optional)||The password of the new user.|
|departmentId (required)||The ID of the department the user will be added to.|
|sendLoginEmail (optional, default: true)||The parameter that determines whether an email is sent to the added user.|
|invitationMessage (optional)||The text of an invitation message in the email.|
The user might be assigned to one of the roles:
|groups (optional)||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.|
As soon as the request is successfully processed, the system returns code 201. Response body will contain ID of the added user.
The role parameter might take one of the following values:
Possible Response Codes
|201||Successful operation||A new user has been added.|
|400||Bad Request||Some of the sent parameters are incorrect.|
|401||Unauthorized||An authorization error.|
The user doesn't have enough permissions to add another users. For instance, Department Administrators can't add users to a department they don't manage.