POST - Add a User to Organization
Purpose
This API is used to add a user to the organization.
OAuth Scope
Use the scope
ZohoMail.organization.accounts.ALL (or) ZohoMail.organization.accounts.CREATE
to generate the Authtoken.
ALL - Full access to accounts.
CREATE - Create accounts.
Request URL
Method: POST
https://mail.zoho.com/api/organization/<zoid>/accounts
Path Parameters
- zoid long, mandatory
- zoid denotes the unique Zoho Organization Identifier for the organization.
- The value can be retrieved using the GET Organization details API.
Request Body- JSON
- primaryEmailAddress string, mandatory
- primaryEmailAddress denotes the domain-based email address which should be the primary email address for the user to be created.
- password string, mandatory
- password denotes the password for the user to be created.
- displayName string
- displayName denotes the display name that you want to assign to the user.
- role string
- role denotes the role to be assigned for the user to be created.
- The value can be either member or admin.
- country string
- country denotes the country the user works from.
- language string
- language denotes the choice of language for the user.
- timeZone string
- timeZone denotes the timezone the user works from.
- oneTimePassword Boolean
- oneTimePassword denotes whether the password that you have provided for the user is a one-time password.
- The value can be either true or false. If true, the user will be asked to change the password on the first login.
- groupMailList JSON Array
- groupMailList denotes an array of the group's email addresses to which the user needs to be added.
- The maximum number of group email addresses that can be added is 100.
To Add to Zoho People
In case your organization is also using Zoho People, you can add the same user in Zoho People also. You need to additionally pass the related fields - employeeId, department, designation, mobileNumber, and extension in the Request Body. Note that the employeeId field is mandatory to add the data to People.
- employeeId string, mandatory
- Provide the employee ID of the user.
- department string
- Provide the department in which the user works.
- designation string
- Provide the designation the user holds.
- mobileNumber string
- Provide the mobile number of the user.
- extension string
- Provide the extension number of the user.
Response Codes
Please refer Response Codes.
Sample Request
Copied{
"role": "member",
"primaryEmailAddress": "newuser1@mybizemail.com",
"timeZone": "Asia/Kolkata",
"language": "En",
"displayName": "New User 1",
"password": "Abc@123",
"country": "in",
"groupMailList": ["newgroupmail@mybizemail.com","newgroup@mybizemail.com"]
}