Get Email Content

Purpose

This API is used to retrieve the content of a specific email using the message ID.

OAuth Scope

Use the scope

MailApps.messages.ALL (or) MailApps.messages.READ

ALL - Full access to the messages.

READ - Read the messages using the message ID.

To generate Authtoken, refer here.

Request URL

Method: GET

https://mail360.zoho.com/api/accounts/{account_key}/messages/{messageId}/content

Path Parameters

  • account_key* string
    • This key is used to identify the account from which the emails have to be retrieved. It is generated during account addition.
    • This parameter can be fetched from Get all accounts API.
  • messageId* long
    • This is a unique key used to identify a specific email.

Query Parameters

  • includeBlockContent boolean
    • This parameter specifies whether the block content needs to be included or not. 
    • The possible value can be
      • true - include block content.
      • false - do not include block content.

 

* - Mandatory parameter

Note:

While the Messages APIs focus on individual messages, the Threads APIs deal with entire conversation threads, each of which contains multiple messages.

Sample request

Copiedcurl "https://mail360.zoho.com/api/accounts/x7**0s/messages/15**40001/content?includeBlockContent=true" \
-X GET \
-H "Accept: application/json" \
-H "Authorization:Zoho-oauthtoken 80**896d59" 

Sample response

Copied{
    "status": {
        "code": 200,
        "description": "success"
    },
    "data": {
        "messageId": 1586347664165010002,
        "content": "<meta /><div><div style=\"font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10.0pt;\"><div><br /></div><div id=\"\">Test,<br />Vacation reply.<br /></div><br /><br /></div><br /></div><br /><span style=\"color: rgb(0,0,0); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13.333333px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.0px; text-align: left; text-indent: 0.0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0.0px; display: inline; float: none; background-color: rgb(255,255,255);\">M110 Disclaimer <br /><br />Rebecca.<br /></span>"
    }
}

Sample Failure Response

Copied{
    "status": {
        "code": 500,
        "description": "Internal Error"
    },
    "data": {
        "moreInfo": "Internal Error"
    }
}