Request: POST /user
Permissions to Run the Request
Account Owner, Account Administrators, Department Administrators, or custom roles.
Department Administrators and users with a custom role can add users only to the departments they manage and their sub-departments.
|X-Auth-Account-Url (required)||The base URL of the account, e.g.|
The login of Account Owner, Account Administrator, Department Administrator, or a user with a custom role.
|X-Auth-Password (required)||The password of Account Owner, Account Administrator, Department Administrator, or a user with a custom role.|
|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.|
If you assign one of the standard roles to the user (apart from Account Owner and Publisher), set one of the following values to the role parameter:
If you assign one of the custom roles to the users, set the custom value to the role parameter.
|roleId (required if the user role is Publisher or a custom role)|
The roleId parameter is used, if you assign one of the custom roles or the Publisher role to the user.
manageableDepartmentIds (required if the user's role is Department Administrator, Publisher, or a custom role)
|An array with the IDs of the departments the user will manage.|
|groups (optional)||An array with the IDs of the groups the user will be added to.|
If in the account there are required user profile fields (apart from the fields of the 'Country' format), they should be also put into the request.
Possible Response Codes
|201||Successful operation||A new user has been added. The response body contains ID of the added user.|
|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.