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. 

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.

Partner details

Function

Command

Purpose

Parameters reference link

Add Child OrganizationorgManagement addChildOrgAdd 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. 

Child organization details

Function

Command

Purpose

Parameters reference link

Organization DetailsorgManagement 
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. 

Subscription details

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 StorageorgManagement 
getOrgUserSubscription
Get the base plan, extra storage, allotted and used 
storage details of a particular user. 
User Storage
Update User StorageorgManagement 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.

Allowed IP details

Function

Command

Purpose

Parameters reference link

Add Allowed IPsorgManagement 
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 listorgManagement 
getAllowedIP
Used to fetch the list of allowed IP ranges for your organization.Get Allowed IPs list
Delete Allowed IPsorgManagement 
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. 

Domain details

Function

Command

Purpose

Parameters reference link

Add Domain to an organizationdomainManagement 
addDomain
Adds the specified domain to 
the given organization.  
Add Domain to an organization
Fetch All DomainsdomainManagement 
fetchAllDomains
Fetch the details of all the domains 
in the organization.
Fetch All Domains
Fetch a specific DomaindomainManagement 
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 PrimarydomainManagement 
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 recorddomainManagement 
verifyMxRecord
To verify MX record of your domain.Verify MX record
Verify SPF recorddomainManagement 
VerifySpfRecord
To verify SPF record of your domain.Verify SPF record
Add a Domain AliasdomainManagement 
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 detailsdomainManagement 
addDkimDetail
To add a DKIM detail for your domain.Add DKIM details
Set DKIM details as defaultdomainManagement 
makeDkimDefault
To set a DKIM detail as default for your domain.Set DKIM details as default
Delete a DKIM detaildomainManagement 
deleteDkimDetail
To delete a present DKIM detail of your domain.Delete a DKIM detail
Verify DKIM public keydomainManagement 
verifyDkimKey
To verify a DKIM public key of a particular domain.Verify DKIM public key
Enable subdomain strippingdomainManagement 
enableSubDomainStripping
To enable sub-domain stripping for your domain. Enable subdomain stripping
Disable subdomain strippingdomainManagement 
disableSubDomainStripping
To disable sub-domain stripping for your domain. Disable subdomain stripping
Add catchall addressdomainManagement 
addCatchAllAddress
To make an email address available in your 
organization as the catch-all account.
Add catchall address
Delete catchall addressdomainManagement 
deleteCatchAllAddress
To delete the catchall account of your domain.Delete catchall address
Add notification addressdomainManagement 
addNotificationAddress
To make an email address available in your organization 
as the notification address.
Add notification address
Delete notification addressdomainManagement 
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. 

Group details

Function

Command

Purpose

Parameters reference link

To get all groups in the organizationgroupManagement 
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 groupgroupManagement
fetchSpecificGroups
Get the details of one of the groups in the organization.To get the details of a particular group
To create a new groupgroupManagement 
createGroup
Create a new group with the specified settings.To create a new group
To enable Streams for a new groupgroupManagement 
enableStreams
To enable Streams for a specific group.To enable Streams for a new group
To add mail group membersgroupManagement 
addMailGroupMember
To add group members and define the respective roles.To add mail group members
To change status of membersgroupManagement 
updateMemberStatus
To change the status of a member added to a groupTo change status of members
To change member rolesgroupManagement 
changeMemberRole
To change the role of a member in a group.To change member roles
To change member detailsgroupManagement 
updateGroupMemberDetails
To change the details of a member in a group.To change member details
To delete the group membersgroupManagement 
deleteMailGroupMember
To delete the individual members from a group.To delete the group members
To update group namegroupManagement 
updateGroupName
To update the name of the group.To update group name
To change general and text settingsgroupManagement 
updateMailGroupOptions
To update the general and text settings of the group.To change general and text settings
To change admin settingsgroupManagement 
updateMailGroupAdvOptions
To change the administrator settings of the group.To change admin settings
To get mails for moderationgroupManagement 
getMailsHeldForModeration
To get the group emails that need to be moderatedTo get mails for moderation
To get moderated mail contentgroupManagement getContentOfEmailHeldForModerationGet the content of the emails that have been moderatedTo get moderated mail content
To moderate mailgroupManagement 
moderateMessages
To moderate the email that is held for moderation and deliver the email to the member accountsTo moderate mail
To add email aliasgroupManagement addGroupAliasTo add email aliases for a group.To add email alias
To remove email aliasgroupManagement deleteGroupAliasTo remove email aliases from the group email address. To remove email alias
To delete a groupgroupManagement deleteGroupTo 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.

User details

Function

Command

Purpose

Parameters reference link

Enable useruserManagement enableUserUsed by the admin to enable a user account.Enable user
Add useruserManagement addUserTo add an user to the organization.Add user
Add email aliasuserManagement addEmailAliasTo add an email alias for a user in the organization.Add email alias
Update TFA statususerManagement updateTFAStatusTo change the TFA preference of a user from enabled to disabled or vice-versa.Update TFA status
Delete email aliasuserManagement deleteEmailAliasTo remove the email alias for the user in the organization.Remove email alias
Enable mail accountuserManagement enableMailAccountTo enable the mail account functionality for a user account.Enable mail account
Disable mail accountuserManagement disableMailAccountTo 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 accountuserManagement disableUserTo disable the mail account functionality for a user account. Disable user account
Fetch mail account details of all usersuserManagement fetchOrgUsersDetailsTo 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 detailuserManagement fetchParticularUserTo fetch the details of the specified user in the specified organization, when requested by the organization's admin. Fetch a specific user detail
Delete useruserManagement deleteUserUsed to delete a user's mailbox.Delete user
Update outgoing statususerManagement updateOutgoingStatusTo change the outgoing status of a user from enabled to disabled or vice-versa.Update outgoing status
Update incoming statususerManagement updateIncomingStatusTo change the incoming status of a user from enabled to disabled or vice-versa.Update incoming status
Change user roleuserManagement changeUserRoleTo change the role of any user in the organization.Change user role
Update IMAP statususerManagement updateIMAPStatusTo change the IMAP status of a user from enabled to disabled or vice-versa. Update IMAP status
Update POP statususerManagement updatePOPStatusTo change the POP status of a user from enabled to disabled or vice-versa. Update POP status
Change ActiveSync statususerManagement updateMobileSyncStatusTo change the ActiveSync status of a user from enabled to disabled or vice-versa.Change ActiveSync status
Reset user passworduserManagement resetUserPasswordTo 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. 

Mail Policy details

Function

Command

Purpose

Parameters reference link

Create org policypolicyManagement createPolicyTo create an organization policy.Create org policy
Create email restrictionpolicyManagement createMailRestrictionUsed for creating an email restrictionCreate email restriction
Create account restrictionpolicyManagement createAccountRestrictionUsed for creating an account restriction.Create account restriction
Create access restrictionpolicyManagement createAccessRestrictionUsed for creating an access restriction.Create access restriction
Create forward restrictionpolicyManagement createForwardRestrictionUsed for creating a forward restriction.Create forward restriction
Get all policiespolicyManagement getAllPoliciesUsed to retrieve the list of policies created.Get all policies
Get all account restrictionspolicyManagement getAllAccountRestrictionUsed to retrieve details of all the account restrictions created.Get all account restrictions
Get all email restrictionspolicyManagement getAllMailRestrictionTo retrieve details of all the email restrictions created.Get all email restrictions
Get all access restrictionspolicyManagement getAllAccessRestrictionTo retrieve details of all the access restrictions created.Get all access restrictions
Get all forward restrictionspolicyManagement getAllForwardRestriction To retrieve details of all the forward restrictions created.Get all forward restrictions
Get policy userspolicyManagement getPolicyUsersTo retrieve a list of users associated with a policy.Get policy users
Get policy groupspolicyManagement getPolicyGroupsTo retrieve a list of groups associated with a policy.Get policy groups
Apply policy to users/groupspolicyManagement applyPolicyToUsersTo apply a particular policy to users/groups.Apply policy to users/groups
Assign email restriction to a policypolicyManagement changeMailRestrictionIDUsed to assign a specific email restriction to a particular policy.Assign email restriction to a policy
Assign account restriction to a policypolicyManagement changeAccountRestrictionIDTo assign a specific account restriction to a particular policy.Assign account restriction to a policy
Assign access restriction to policypolicyManagement changeAccessRestrictionIDTo assign a specific access restriction to a particular policy.Assign access restriction to policy
Assign forward restrictionpolicyManagement changeMailForwardPolicyIDTo 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.

Log details

Function

Command

Purpose

Parameters reference link

Get login historyauditLogs getLoginHistoryTo retrieve a detailed log of login activities for organization accounts.Get login history
Get audit recordsauditLogs getAuditRecordsTo retrieve audit records for admin activities within the organization.Get audit records