# Add a new user to the organization Creates a new user account in the cloud organization with the specified role, username, and email. The user receives an invitation email immediately upon creation. ## Endpoints `POST /dcapi/users-cloud` ## Request ### Request URL https://[{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)/dcapi/users-cloud ### Scope `DesktopCentralCloud.Admin.CREATE` ### Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **content-type** `string` (Mandatory): `application/userAddition.v1+json` Specifies the request payload format. Set to application/userAddition.v1+json to submit the user data in JSON format. #### Request Body `application/json` - `JSON Object` - **mailID** `string` (Mandatory) Email address of the user. This will be used for user communication and login. - **userName** `string` (Mandatory) Unique username for the user. This will be used for login credentials. - **roleID** `string` (Mandatory) Role identifier to assign to the user. To get available role IDs, use this API. [Get Role ID](https://www.manageengine.com/products/desktop-central/help/api/cloud/users-public-create-user.html?Roles_getRoles) ### Sample Request ```curl curl --request POST \ --url https://appdomains/dcapi/users-cloud \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'content-type: application/userAddition.v1+json' \ --data '{"roleID":"9502000000014452","mailID":"john.smith@example.com","userName":"john.smith"}' ``` ### Sample Request Body Create a new cloud user with email, username, and assigned role. ```json { "roleID": "9502000000014452", "mailID": "john.smith@example.com", "userName": "john.smith" } ``` ## Response Parameters ### HTTP Code 200 #### Response Body `application/json` - `JSON Object` - **loginID** `string` Unique login identifier assigned to the newly created user. - **statusMsg** `string` confirmation message for the create-user operation. - **newUser** `boolean` Indicates whether the created user is a newly invited user (true) or an existing user (false). ### HTTP Code 400 #### Response Body `application/json` - `JSON Object` - **errorCode** `string` Application-specific error code indicating the reason for the request failure. - **errorMsg** `string` Error message describing the cause of the error. ### Possible Response Codes - **200** `HTTP code` - **400** `HTTP code` ### Sample Response: HTTP 200 Successful create user response with assigned login ID and confirmation. ```json { "loginID": "9502000000122681", "statusMsg": "User john.smith has been invited successfully", "newUser": true } ``` ### Sample Response: HTTP 400 Error response when attempting to create a user with an email address that already exists. ```json { "errorCode": "1107", "errorMsg": "User johny@zohocorp.com already exists" } ``` Error response when the user name is null or empty. ```json { "errorCode": "1103", "errorMsg": "UserName Should not be null or empty" } ``` ## Rate Limit ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.