Get Email Attachment Info
Purpose
The API retrieves the attachment information of a particular email, based on the message ID passed in the request URL.
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}/attachmentinfo
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 from which the email needs 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 List Emails API.
Query Parameters
- includeInline boolean
- This parameter specifies whether to include inline information in the response.
- Allowed values :
- true - The inline information will be included in the response.
- false - The inline information will not be included in the response.
- Default value : false.
* - 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/1671434730313114778/attachmentinfo?includeInline=true" \
-X GET \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****"
Sample Success Response
Copied{
"status": {
"code": 200,
"description": "success"
},
"data": {
"attachments": [
{
"attachmentSize": 6737,
"attachmentName": "test.odt",
"attachmentId": "138907275303090130"
},
{
"attachmentSize": 15321,
"attachmentName": "spathiphyllum.jpg",
"attachmentId": "138907275303110000"
}
],
"inline": [
{
"attachmentSize": 71730,
"attachmentName": "import.jpg",
"attachmentId": "138907275356550040",
"cid": "0.28869215390.9068479665823862258.1852945fb3b__inline__img__src"
}
],
"messageId": "1671434730313114778"
}
}
Sample Failure Response
Copied{
"status": {
"code": 400,
"description": "Invalid Input"
},
"data": {
"moreInfo": "Message id 167143473031311477 is invalid"
}
}