Get Email Content of an Email

Purpose

This API is used to retrieve the message contents of an email based on the message ID passed in the request URL. In case, you retrieve an email from a thread, you can add the includeBlockContent parameter to get the reply email and the parent email separately. If block content is available but the includeBlockContent parameter is not passed, then the original email content can only be retrieved.

OAuth Scope

Use the scope

ZohoMail.messages.ALL (or) ZohoMail.messages.READ

to generate the Authtoken.

ALL - Grants full access to messages.

READ - Grants access to read messages.

Request URL

Method: GET

https://mail.zoho.com/api/accounts/{accountId}/folders/{folderId}/messages/{messageId}/content

Path Parameters

  • accountId* long
    • This parameter is used to identify the specific account to fetch details.
    • This parameter can be retrieved from the Get User Account Details API.
  • folderId* long
    • This parameter is used to identify the specific folder for which the emails need to be retrieved. 
    • This parameter can be retrieved from the Get All Folders API.
  • messageId* long
    • This parameter is the unique ID associated with the particular email. 
    • This parameter can be retrieved from the List Emails API.

 

Query Parameters

  • includeBlockContent boolean
    • This parameter specifies whether to include the block quote content in an email along with the email content.
    • Possible values are:
      • true - include block content along with the original email content.
      • false - do not include block content along with the original email content.

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

Sample Request

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

Sample Response

Copied{
   "status": {
       "code": 200,
       "description": "success"
   },
   "data": {
       "messageId": 1709876190693100009,
       "content": "<meta content=\"text/html;charset=UTF-8\" /><div><div style=\"font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt\"><div style=\"font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt\"><div><br /></div><div>Hello Rebecca<br /></div><div id=\"x_1757349787\"><p><span class=\"x_1727483614colour\" style=\"color: rgb(42, 42, 42)\">Sent using <a style=\"color: rgb(89, 143, 222)\" target=\"_blank\">Zoho Mail</a></span><br /></p></div><div><br b</div></div></div><br /></div>"
   }
}