CLI Admin Operations
As an administrator, you need to manage your organization's domain, users, groups, policy details, and audit logs. All these functions can be performed by executing the respective commands mentioned below.
Table of Contents
Note:
When an organization's user (who is not an admin) tries to run an admin command, "Invalid access" error is thrown.
Organization details
The organization details help you to get information about the particular organization, subscription details, number of users, number of groups, list of domains, etc. Below are the list of commands under organization details:
Partner details
Partner details section is used by partners with Partner Admin role to add and manage Organizations, subscription details and so on.
Function | Command | Purpose | Parameters reference link |
| Add Child Organization | orgManagement addChildOrg | Add an organization in Zoho Mail, under a partner account to be managed by the partner. | Add Child Organization |
Child organization details
The Organization details section help you to get information about the particular child organization, subscription details, number of users, number of groups, list of domains etc.
Function | Command | Purpose | Parameters reference link |
| Organization Details | orgManagement getOrgDetails | Get the basic details of the organization along with the number of users and groups. | Child Organization Details |
Subscription details
The Subscription details section help you to get information about the organization's pricing plans, users storage details and also update/ allocate storage details for the user based on the organization subscription information.
Function | Command | Purpose | Parameters reference link |
| Organization Subscription | orgManagement getOrgSubscription | Get organizations plan details, add ons and summary of the used and available storage information. | Organization subscription |
| User Storage | orgManagement getOrgUserSubscription | Get the base plan, extra storage, allotted and used storage details of a particular user. | User Storage |
| Update User Storage | orgManagement updateBaseStorage or orgManagement updateExtraStorage | Modify the base storage/ extra storage for a particular user. | Update User Storage |
Allowed IP details
The Allowed IPs section help you to whitelist/ add allowed IPs, assign them to the members of your organization, fetch the allowed IPs list and delete them.
Function | Command | Purpose | Parameters reference link |
| Add Allowed IPs | orgManagement addAllowedIP | Used to add an Allowed IP range for your organization and assign them to the users based on their role or the entire organization. | Add Allowed IPs |
| Get Allowed IPs list | orgManagement getAllowedIP | Used to fetch the list of allowed IP ranges for your organization. | Get Allowed IPs list |
| Delete Allowed IPs | orgManagement deleteAllowedIP | Used to delete an Allowed IP range for your organization. | Delete Allowed IPs |
Domain details
The domain details provide information about the domains in the particular organization, verification information, mail hosting status, etc.
Function | Command | Purpose | Parameters reference link |
| Add Domain to an organization | domainManagement addDomain | Adds the specified domain to the given organization. | Add Domain to an organization |
| Fetch All Domains | domainManagement fetchAllDomains | Fetch the details of all the domains in the organization. | Fetch All Domains |
| Fetch a specific Domain | domainManagement fetchSpecificDomain | Fetch the details of a single domain in the organization. | Fetch a specific Domain |
| Verify a Domain in the organization | domainManagement verifyDomainByCName domainManagement verifyDomainByHTML domainManagement verifyDomainByTXT | Verify the domain by one of the verification methods. | Verify a Domain in the organization |
| Set a Domain as Primary | domainManagement setPrimaryDomain | Make the domain as Primary domain in the Organization. | Set a Domain as Primary |
| Enable email hosting for a domain | domainManagement enableMailHosting | Enable Email Hosting for the specific domain | Enable email hosting for a domain |
| Verify MX record | domainManagement verifyMxRecord | To verify MX record of your domain. | Verify MX record |
| Verify SPF record | domainManagement VerifySpfRecord | To verify SPF record of your domain. | Verify SPF record |
| Add a Domain Alias | domainManagement makeDomainAsAlias | To make the domain as an alias to the other domain. | Add a Domain Alias |
| Remove the Domain Alias | domainManagement removeDomainAsAlias | To remove the existing domain alias and disassociate the domain from the other domain. | Remove the Domain Alias |
| Add DKIM details | domainManagement addDkimDetail | To add a DKIM detail for your domain. | Add DKIM details |
| Set DKIM details as default | domainManagement makeDkimDefault | To set a DKIM detail as default for your domain. | Set DKIM details as default |
| Delete a DKIM detail | domainManagement deleteDkimDetail | To delete a present DKIM detail of your domain. | Delete a DKIM detail |
| Verify DKIM public key | domainManagement verifyDkimKey | To verify a DKIM public key of a particular domain. | Verify DKIM public key |
| Enable subdomain stripping | domainManagement enableSubDomainStripping | To enable sub-domain stripping for your domain. | Enable subdomain stripping |
| Disable subdomain stripping | domainManagement disableSubDomainStripping | To disable sub-domain stripping for your domain. | Disable subdomain stripping |
| Add catchall address | domainManagement addCatchAllAddress | To make an email address available in your organization as the catch-all account. | Add catchall address |
| Delete catchall address | domainManagement deleteCatchAllAddress | To delete the catchall account of your domain. | Delete catchall address |
| Add notification address | domainManagement addNotificationAddress | To make an email address available in your organization as the notification address. | Add notification address |
| Delete notification address | domainManagement deleteNotificationAddress | To delete the notification address of your domain. | Delete notification address |
| Delete a Domain from the Organization | domainManagement deleteDomain | To delete the domain from the Organization. | Delete a Domain from the Organization |
Group details
The group details page helps you manage the groups, members, member roles, individual settings, and group admin settings.
Function | Command | Purpose | Parameters reference link |
| To get all groups in the organization | groupManagement fetchAllGroups | Get the details of all the groups in the organization. | To get all groups in the organization |
| To get the details of a particular group | groupManagement fetchSpecificGroups | Get the details of one of the groups in the organization. | To get the details of a particular group |
| To create a new group | groupManagement createGroup | Create a new group with the specified settings. | To create a new group |
| To enable Streams for a new group | groupManagement enableStreams | To enable Streams for a specific group. | To enable Streams for a new group |
| To add mail group members | groupManagement addMailGroupMember | To add group members and define the respective roles. | To add mail group members |
| To change status of members | groupManagement updateMemberStatus | To change the status of a member added to a group | To change status of members |
| To change member roles | groupManagement changeMemberRole | To change the role of a member in a group. | To change member roles |
| To change member details | groupManagement updateGroupMemberDetails | To change the details of a member in a group. | To change member details |
| To delete the group members | groupManagement deleteMailGroupMember | To delete the individual members from a group. | To delete the group members |
| To update group name | groupManagement updateGroupName | To update the name of the group. | To update group name |
| To change general and text settings | groupManagement updateMailGroupOptions | To update the general and text settings of the group. | To change general and text settings |
| To change admin settings | groupManagement updateMailGroupAdvOptions | To change the administrator settings of the group. | To change admin settings |
| To get mails for moderation | groupManagement getMailsHeldForModeration | To get the group emails that need to be moderated | To get mails for moderation |
| To get moderated mail content | groupManagement getContentOfEmailHeldForModeration | Get the content of the emails that have been moderated | To get moderated mail content |
| To moderate mail | groupManagement moderateMessages | To moderate the email that is held for moderation and deliver the email to the member accounts | To moderate mail |
| To add email alias | groupManagement addGroupAlias | To add email aliases for a group. | To add email alias |
| To remove email alias | groupManagement deleteGroupAlias | To remove email aliases from the group email address. | To remove email alias |
| To delete a group | groupManagement deleteGroup | To delete a group from the organization. | To delete a group |
User details
The user details help you to get and update information about the users and their mail accounts in the organization.
Function | Command | Purpose | Parameters reference link |
| Enable user | userManagement enableUser | Used by the admin to enable a user account. | Enable user |
| Add user | userManagement addUser | To add an user to the organization. | Add user |
| Add email alias | userManagement addEmailAlias | To add an email alias for a user in the organization. | Add email alias |
| Update TFA status | userManagement updateTFAStatus | To change the TFA preference of a user from enabled to disabled or vice-versa. | Update TFA status |
| Delete email alias | userManagement deleteEmailAlias | To remove the email alias for the user in the organization. | Remove email alias |
| Enable mail account | userManagement enableMailAccount | To enable the mail account functionality for a user account. | Enable mail account |
| Disable mail account | userManagement disableMailAccount | To disable the mail account functionality for a user account. This can be done by the Admin for a user or by the user for themselves. | Disable mail account |
| Disable user account | userManagement disableUser | To disable the mail account functionality for a user account. | Disable user account |
| Fetch mail account details of all users | userManagement fetchOrgUsersDetails | To fetch all the user's details for the specified organization, when requested by the organization's admin. | Mail Account Details of All Users |
| Fetch a specific user detail | userManagement fetchParticularUser | To fetch the details of the specified user in the specified organization, when requested by the organization's admin. | Fetch a specific user detail |
| Delete user | userManagement deleteUser | Used to delete a user's mailbox. | Delete user |
| Update outgoing status | userManagement updateOutgoingStatus | To change the outgoing status of a user from enabled to disabled or vice-versa. | Update outgoing status |
| Update incoming status | userManagement updateIncomingStatus | To change the incoming status of a user from enabled to disabled or vice-versa. | Update incoming status |
| Change user role | userManagement changeUserRole | To change the role of any user in the organization. | Change user role |
| Update IMAP status | userManagement updateIMAPStatus | To change the IMAP status of a user from enabled to disabled or vice-versa. | Update IMAP status |
| Update POP status | userManagement updatePOPStatus | To change the POP status of a user from enabled to disabled or vice-versa. | Update POP status |
| Change ActiveSync status | userManagement updateMobileSyncStatus | To change the ActiveSync status of a user from enabled to disabled or vice-versa. | Change ActiveSync status |
| Reset user password | userManagement resetUserPassword | To reset the password of a user in the organization. | Reset user password |
Mail Policy details
The mail policy details help you to create and apply organization policies to users or groups, create restrictions, and assign these restrictions to the policies.
Function | Command | Purpose | Parameters reference link |
| Create org policy | policyManagement createPolicy | To create an organization policy. | Create org policy |
| Create email restriction | policyManagement createMailRestriction | Used for creating an email restriction | Create email restriction |
| Create account restriction | policyManagement createAccountRestriction | Used for creating an account restriction. | Create account restriction |
| Create access restriction | policyManagement createAccessRestriction | Used for creating an access restriction. | Create access restriction |
| Create forward restriction | policyManagement createForwardRestriction | Used for creating a forward restriction. | Create forward restriction |
| Get all policies | policyManagement getAllPolicies | Used to retrieve the list of policies created. | Get all policies |
| Get all account restrictions | policyManagement getAllAccountRestriction | Used to retrieve details of all the account restrictions created. | Get all account restrictions |
| Get all email restrictions | policyManagement getAllMailRestriction | To retrieve details of all the email restrictions created. | Get all email restrictions |
| Get all access restrictions | policyManagement getAllAccessRestriction | To retrieve details of all the access restrictions created. | Get all access restrictions |
| Get all forward restrictions | policyManagement getAllForwardRestriction | To retrieve details of all the forward restrictions created. | Get all forward restrictions |
| Get policy users | policyManagement getPolicyUsers | To retrieve a list of users associated with a policy. | Get policy users |
| Get policy groups | policyManagement getPolicyGroups | To retrieve a list of groups associated with a policy. | Get policy groups |
| Apply policy to users/groups | policyManagement applyPolicyToUsers | To apply a particular policy to users/groups. | Apply policy to users/groups |
| Assign email restriction to a policy | policyManagement changeMailRestrictionID | Used to assign a specific email restriction to a particular policy. | Assign email restriction to a policy |
| Assign account restriction to a policy | policyManagement changeAccountRestrictionID | To assign a specific account restriction to a particular policy. | Assign account restriction to a policy |
| Assign access restriction to policy | policyManagement changeAccessRestrictionID | To assign a specific access restriction to a particular policy. | Assign access restriction to policy |
| Assign forward restriction | policyManagement changeMailForwardPolicyID | To assign a specific forward restriction to a particular policy. | Assign forward restriction |
Log details
The Logs section help you in retrieving various types of logs within an organization.
Function | Command | Purpose | Parameters reference link |
| Get login history | auditLogs getLoginHistory | To retrieve a detailed log of login activities for organization accounts. | Get login history |
| Get audit records | auditLogs getAuditRecords | To retrieve audit records for admin activities within the organization. | Get audit records |