Add User
Table of Contents
Overview
The zoho.one.addUser task is used to add a specified user to an organization.
Syntax
<response> = zoho.one.addUser(<orgID>, <userData>, <connection>);
Scope
ZohoOne.Users.CREATE
where:
Parameter | Description | Data type |
response | is the variable which will hold the details of the user added to the organization. | KEY-VALUE |
<orgID> | is the ID of the organization to which the user needs to be added. | NUMBER |
<userData> | is the variable that will hold the user data. The supported user data that can be included are
| KEY-VALUE |
<connection> | is the name of the Zoho One connection. | TEXT |
Example
The following script adds a user with name - John and designation ID - 48XXXXXX in Zoho One organization with ID - 72XXXXXXX:
userData = Map(); userData.put("first_name", "John"); userData.put("email_id", "John@xxxx.xxx"); userData.put("designation_id", "48XXXXXX"); response = zoho.one.addUser(72XXXXXXX, userData, "zoho_one_connection")
where:
response
This is the KEY-VALUEresponse returned by Zoho One.
72XXXXXXX
This is the NUMBERthat represents the organization ID of Zoho One account.
zoho_one_connection
This is the TEXTthat represents the link name of the connection.
John
This is the FIRST NAME of the user to be added.
John@xxxx.xxx
This is the EMAIL ADDRESS of the user to be added.
48XXXXXX
This is the DESIGNATION ID of the user to be added.
Response
{
"status_code": 201,
"users": {
"is_active": true,
"user_id": "15133************",
"href": "https://one.zoho.com/api/v1/orgs/72*******/users/1513*********"
},
"resource_name": "users",
"message": "Success"
}
"status_code": 201,
"users": {
"is_active": true,
"user_id": "15133************",
"href": "https://one.zoho.com/api/v1/orgs/72*******/users/1513*********"
},
"resource_name": "users",
"message": "Success"
}