GET - List of emails in a folder

 Purpose

The API retrieves the list of all the emails in a specific folder or the list of emails, based on the predefined conditions like Status/ Flag/ Labels and so on. 

 Request URL

 https://mail.zoho.com/api/accounts/<accountId>/messages/view

Request Parameters

ParameterData TypeDescription
accountID*LongThe unique Zoho Account number associated with the particular account.

 Request Body

ParameterData TypePossible ValuesDescription
folderIdlong-Folder Id of the folder for which the emails need to be retrieved. 
startint-The start sequence number of the emails to be retrieved, to retrieve a specific set of emails. The default value is 1.
limitint1 - 200The number of emails to be retrieved from the start value mentioned. The default value is 10. 
statusstringunread; readTo retrieve emails by read or unread status. 
flagidInteger-To retrieve emails based on a specific flag. 
labelidlong-To retrieve emails based on a specific label. 
sortBystringdate, messageId, sizeThe list of emails can be sort by date, messageid or size. The default sort order is date. 
sortorderbooleantrue - ascending; fasle - descendingThe sort order of the retrieved list, whether ascending or descending need to be specified here.
includetobooleantrue - include; false - do not includeWhether the To details need to be included or not. 
includearchivebooleantrue - include; false - do not includeWhether the Archived emails need to be included or not on the list of emails retrieved. 
includesentbooleantrue - include; false - do not includeWhether Sent emails need to be included or not on the list of emails retrieved.
fieldsstring-The list of fields that need to included in the retrieved list or not. 
attachedMailsbooleantrue - emails with attachments; false - all emailsTo retrieve only the emails with attachments. 
inlinedMailsbooleantrue - emails with inlines; false - all emailsTo retrieve only the emails with inlines. 
flaggedMailsbooleantrue - emails with flags; false - all emailsTo retrieve only flagged emails. 
respondedMailsbooleantrue - emails with replies; false - all emailsTo retrieve only replied emails. 
threadedMailsbooleantrue - emails that are conversations; false - all emailsTo retrieve emails that are a part of conversations. 

* - Mandatory parameter

Response Parameters

ParameterData TypePossible ValuesDescription
hasAttachmentboolean0 - fasle; 1 - trueWhether the email has an attachment or not
fromAddressemail addresssenderdame@domainname.comThe email address from which the email is sent
folderIdint-Folder id in which the emails are present
messageIdint-The unique id associated with each email
senderstring-The username of the email sender
summarystring-The summary of the email dispalyed in the email listing
status2int0 - default; 1 - replied; 2 - forward; 3 - replayandforwardedIf the email has been replied to, forwarded or replied to and forwarded
sentDateinGMTlong-The date when the email has been sent
sizeint-The size of the email
statusint0 - unread; 1- readThe read or unread state of the email
priorityint1 - highest; 2 - High; 3 - Normal; 4 - low; 5 - lowestThe priority set for the email
threadCountint-The number of emails that are part of this conversation
flagidstringflag_not_set; info; important; followupThe identifier for the flag that has been set
subjectstring-The subject of the email
threadIdlong int-The id for the thread tthat 
receivedtimelong-The time when the email was received

 Response Codes

Please refer Response Codes.

Refer to email API for other mailing options using the API.

Sample Response

Copied{
  "status": {
    "code": 200,
    "description": "success"
  },
  "data": [
    {
      "URI": "https://mail.zoho.com/api/accounts/9000000000993/folders/9000000000905/messages/9000000010029",
      "hasAttachment": 0,
      "fromAddress": "mysenders@otherzoho.com",
      "folderId": 9000000000305,
      "messageId": 9000000019029,
      "sender": "Daniel Bond",
      "summary": "We are happy to welcome you onboard",
      "status2": "1",
      "sentDateInGMT": 1270171976000,
      "size": 540,
      "status": "0",
      "priority": 3,
      "threadCount": 0,
      "flagid": flag_not_set,
      "subject": "Great to see you",
      "threadId": 1,
      "receivedtime": 1425388373920
    },
    {
      "URI": "https://mail.zoho.com/api/accounts/9000000000993/folders/9000000000905/messages/9000000019022",
      "hasAttachment": 0,
      "fromAddress": "mysenders@othermail.com",
      "folderId": 9000000000905,
      "messageId": 9000000019022,
      "sender": "Elizabeth Salma",
      "summary": "A great opportunity to meet you all",
      "status2": "1",
      "sentDateInGMT": 1270171976000,
      "size": 540,
      "status": "0",
      "priority": 3,
      "flagid": flag_not_set,
      "subject": "Hey there",
      "threadId": 0,
      "receivedtime": 1425388373741
    },
    {
      "URI": "https://mail.zoho.com/api/accounts/9000000000299/folders/9000000000905/messages/9000000019020",
      "hasAttachment": 0,
      "fromAddress": "mymanager@mydomain.com",
      "folderId": 9000000000905,
      "messageId": 9000000019020,
      "sender": "Rajiv",
      "summary": "Can you send the status of the last order ",
      "status2": "1",
      "sentDateInGMT": 1270171976000,
      "size": 540,
      "status": "0",
      "priority": 3,
      "flagid": 2,
      "subject": "Status Report",
      "threadId": 0,
      "receivedtime": 1425388373581
    }
  ]
}