Get Attachment Details of an Email
Purpose
This API is used to retrieve the details of all the attachments of a specific email using a message ID.
OAuth Scope
Use the scope
MailApps.messages.ALL (or) MailApps.messages.READ
ALL - Full access to the messages.
READ - Fetch the attachment details of the messages.
To generate Authtoken, refer here.
Request URL
Method: GET
https://mail360.zoho.com/api/accounts/{account_key}/messages/{messageId}/attachments
Path Parameters
- account_key* string
- This key is used to identify the account from which the attachments have to be retrieved. It is generated during account addition.
- This parameter can be fetched from Get all accounts API.
- messageId* long
- This is the unique key used to identify a specific email.
Query Parameters
- includeInline boolean
- This parameter specifies whether to include the inline attachment details in the response.
- The possible value can be
- true - include inline attachment.
- false - do not include inline attachment.
* - 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**B00s/messages/16*0001/attachments?includeInline=true" \
-X GET \
-H "Accept: application/json" \
-H "Authorization:Zoho-oauthtoken 8**b64f"
Sample response
Copied{
"status": {
"code": 200,
"description": "success"
},
"data": {
"attachments": [
{
"attachmentSize": 5237,
"attachmentName": "aa.jpeg",
"attachmentId": 138056404665890070
}
],
"inline": [
{
"attachmentId": "138933999122460040",
"attachmentName": "1.png",
"attachmentSize": 86973,
"cid": "0.28870117710.2693392459576172169.185c88f48c9__inline__img__src"
}
],
"messageId": 1586347665519010005
}
}