GET - Get All Accounts of a User

Purpose

This API is used to retrieve all the accounts details of the authenticated user.

OAuth Scope

Use the scope

ZohoMail.accounts.ALL (or) ZohoMail.accounts.READ

to generate the Authtoken.

ALL - Grants full access to accounts.

READ - Grants access to read account information.

Request URL

Method: GET

https://mail.zoho.com/api/accounts

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

Sample Request

Copiedcurl "https://mail.zoho.com/api/accounts" \
-X GET \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****"

Sample Response

Copied{
   "status": {
       "code": 200,
       "description": "success"
   },
   "data": [
       {
           "country": "us",
           "lastLogin": 1708054510447,
           "mxStatus": true,
           "activeSyncEnabled": false,
           "mobileNumber": "",
           "incomingBlocked": false,
           "language": "en",
           "type": "ZOHO_ACCOUNT",
           "extraStorage": {},
           "incomingUserName": "rebecca@zylker.com",
           "emailAddress": [
               {
                   "isAlias": false,
                   "isPrimary": true,
                   "mailId": "rebecca@zylker.com",
                   "isConfirmed": true
               }
           ],
           "mailboxStatus": "enabled",
           "popBlocked": false,
           "usedStorage": 143295,
           "spamcheckEnabled": true,
           "imapAccessEnabled": true,
           "timeZone": "America/Los_Angeles",
           "accountCreationTime": 1682488069407,
           "mailForward": [
               {
                   "mailForwardTo": "paula@zylker.com",
                   "type": "USER",
                   "status": "UNCONFIRMED"
               }
           ],
           "zuid": 809451734,
           "webBlocked": false,
           "planStorage": 100,
           "firstName": "Rebecca",
           "accountId": "2560636000000008002",
           "sequence": 2,
           "mailboxAddress": "rebecca@zylker.com",
           "lastPasswordReset": 1682488070541,
           "tfaEnabled": false,
           "phoneNumer": "",
           "status": true,
           "lastName": "training",
           "accountDisplayName": "Rebecca",
           "role": "member",
           "gender": "NOT_SPECIFIED",
           "accountName": "bizdemo",
           "displayName": "Rebecca training",
           "isLogoExist": false,
           "URI": "https://mail.zoho.com/api/accounts/2560636000000008002",
           "primaryEmailAddress": "rebecca@zylker.com",
           "enabled": true,
           "mailboxCreationTime": 1682488072077,
           "basicStorage": "professional",
           "vacationResponse": [
               {
                   "replyType": 0,
                   "sendTo": 0,
                   "infiniteDate": false,
                   "subject": "Away on Vacation update!",
                   "toDate": "07/05/2025",
                   "includeSignature": 0,
                   "content": "Will not be available from 13-01-18 to 19-01-18 as I'm away on vacation. Contact me on my personal number in case of emergencies.",
                   "markBusy": 0,
                   "fromDate": "05/04/2024",
                   "accountId": "2560636000000084002",
                   "intervalType": 0,
                   "name": "65",
                   "interval": 0,
                   "accType": 2,
                   "vacationId": "2560636000000149007"
               }
           ],
           "lastClient": "WEB_ZM",
           "allowedStorage": 104857600,
           "sendMailDetails": [
               {
                   "sendMailId": "2560636000000008004",
                   "displayName": "Rebecca Traning",
                   "serverName": "smtpout.mail.zoho.com",
                   "signatureId": "null",
                   "serverPort": 25,
                   "userName": "rebecca@zylker.com",
                   "connectionType": "plain",
                   "mode": "mailbox",
                   "validated": false,
                   "fromAddress": "rebecca@zylker.com",
                   "smtpConnection": 0,
                   "validationRequired": true,
                   "validationState": 0,
                   "status": true
               },
               {
                   "sendMailId": "2560636000000143001",
                   "verifyCode": 5686021185181369376,
                   "displayName": "ckrbjr nb",
                   "serverName": "smtpout.mail.zoho.com",
                   "signatureId": "null",
                   "serverPort": 25,
                   "userName": "rebecca@zylker.com",
                   "connectionType": "plain",
                   "mode": "extfrom",
                   "validated": false,
                   "fromAddress": "p3487260@gmail.com",
                   "smtpConnection": 0,
                   "validationRequired": true,
                   "validationState": 0,
                   "status": false
               },
               {
                   "sendMailId": "2560636000000148006",
                   "displayName": "paula",
                   "serverName": "smtpout.mail.zoho.com",
                   "signatureId": "null",
                   "serverPort": 25,
                   "userName": "rebecca@zylker.com",
                   "connectionType": "plain",
                   "mode": "extfrom",
                   "validated": false,
                   "fromAddress": "paula@zylker.com",
                   "smtpConnection": 0,
                   "validationRequired": true,
                   "validationState": 0,
                   "status": true
               }
           ],
           "popFetchTime": -1,
           "address": {
               "country": "",
               "streetAddr": "",
               "city": "",
               "postalCode": "",
               "state": ""
           },
           "planType": 82,
           "deleteCopy": false,
           "userExpiry": -1,
           "popAccessEnabled": true,
           "imapBlocked": false,
           "iamUserRole": "member",
           "outgoingBlocked": false,
           "policyId": {
               "1082700000003462021": "home POLICY1.",
               "zoid": 3226386
           },
           "smtpStatus": true,
           "extraEDiscoveryStorage": {}
       },
       {
           "accountId": "2560636000000084002",
           "accountDisplayName": "paula",
           "incomingUserName": "paula@zylker.com",
           "sequence": 1,
           "accountName": "bizdemo",
           "vacationResponse": [
               {
                   "replyType": 0,
                   "sendTo": 0,
                   "infiniteDate": false,
                   "subject": "Away on Vacation update!",
                   "toDate": "07/05/2025",
                   "includeSignature": 0,
                   "content": "Will not be available from 13-01-18 to 19-01-18 as I'm away on vacation. Contact me on my personal number in case of emergencies.",
                   "markBusy": 0,
                   "fromDate": "05/04/2024",
                   "accountId": "2560636000000084002",
                   "intervalType": 0,
                   "name": "65",
                   "interval": 0,
                   "accType": 2,
                   "vacationId": "2560636000000149007"
               }
           ],
           "type": "IMAP_ACCOUNT",
           "URI": "https://mail.zoho.com/api/accounts/2560636000000084002",
           "enabled": true
       }
   ]
}