GET - List emails based on Search parameters

 Purpose

The API retrieves the list of emails, based on the custom search terms and parameters. Refer this page, for instructions and syntax to build the custom Search String to be used as the request parameter for using multiple parameters.  

 Request URL

 http://mail.zoho.com/api/accounts/<accountId>/messages/search

 Request Parameters

ParameterData TypeDescription
searchKey*StringTo search for new emails, provide the searchKey as newMails.
The custom Search Key built using the Search Syntax defined in this help page. 
receivedTimelongBy default, the value is before 2 minutes. 
startintThe start sequence number of the emails to be retrieved, to retrieve a specific set of emails. The default value is 1.
limitintThe number of emails to be retrieved from the start value mentioned. The default value is 10. 
includetobooleanWhether the To details need to be included or not. 
fieldsstringThe list of fields that need to included in the retrieved list or not. 

* - Mandatory parameter

 Response Codes

Please refer Response Codes.

Sample Response


				{
  "status": {
    "code": 200,
    "description": "success"
  },
  "data": [
    {
      "URI": "http://mail.zoho.com/api/accounts/9000000000993/folders/9000000000905/messages/9000000019029",
      "hasAttachment": 0,
      "fromAddress": "mysender@otherzoho.com",
      "folderId": 9000000000905,
      "messageId": 9000000019029,
      "sender": "Maria Daniel",
      "summary": "It is extremely important for us to focus on",
      "status2": "reply",
      "sentDateInGMT": 1270171976000,
      "size": 540,
      "status": "read",
      "priority": 3,
      "threadCount": 0,
      "flagid": 2,
      "subject": "Marketing Strategy",
      "threadId": 1,
      "receivedtime": 1425388373920
    },
    {
      "URI": "http://mail.zoho.com/api/accounts/9000000000993/folders/9000000000905/messages/9000000046832",
      "hasAttachment": 0,
      "fromAddress": "info@clientdomain.com",
      "folderId": 9000000000905,
      "messageId": 9000000046832,
      "sender": "Van Tsuan",
      "summary": "Can we have an additional discount",
      "status2": "none",
      "sentDateInGMT": 1270171976000,
      "size": 540,
      "status": "unread",
      "priority": 3,
      "flagid": 2,
      "subject": "Re:Quote for 1000 users",
      "threadId": 0,
      "receivedtime": 1425388373741
    },
    {
      "URI": "http://mail.zoho.com/api/accounts/9000000000993/folders/9000000000905/messages/900000001482014",
      "hasAttachment": 0,
      "fromAddress": "mymanager@mydomain.com",
      "folderId": 9000000000905,
      "messageId": 900000001482014,
      "sender": "singh",
      "summary": "Since it is a 1000 user deal, offer 5% more ",
      "status2": "none",
      "sentDateInGMT": 1270171976000,
      "size": 540,
      "status": "unread",
      "priority": 3,
      "flagid": 2,
      "subject": "Re:Fw:Re:Quote for 1000 users",
      "threadId": 0,
      "receivedtime": 1425388373581
    }
  ]
}