List attachments of a message

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Returns the list of attachments on a specific shared mailbox message. Use the fields parameter to control which attachment properties are included.

Request URL

https://mail.zoho.com/api/v2/sharedmailbox/{mailboxIdentifier}/messages/{messageId}/attachments Copied!

Note:

Use the request URL with the domain that matches the DC where your account is hosted. Refer Multiple data centers section for data center information.

Scope

ZohoMail.messages.READCopied!
(or)
ZohoMail.messages.ALLCopied!

Request Parameters

- Path Parameters

mailboxIdentifierstringMandatory

Email address or numeric zgid (group ID) of the shared mailbox group.

Example
support@zylker.com
Maximum Length :256Copied!
messageIdstring(matches: ^[0-9]+$)Mandatory

Numeric ID of the message (long as string).

Example
1001234567890
Maximum Length :19Copied!

- Query Parameters

fieldsstringOptional

Comma-separated list of attachment fields to return in the response. When omitted, all fields are returned.

Example
attachmentId,attachmentName,attachmentSize,attachmentFormat
Maximum Length :1000Copied!

Sample Request

Curl
Java
Python
Deluge
Php
Copied!
curl --request GET \
  --url 'https://mail.zoho.com/api/v2/sharedmailbox/support@zylker.com/messages/1001234567890/attachments?fields=attachmentId%2CattachmentName%2CattachmentSize%2CattachmentFormat' \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52'

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Object

Response envelope for listing attachments on a shared mailbox message.

Show Sub-Attributes
dataJSON Object

Attachment list data.

Show Sub-Attributes
attachmentsJSON Array

List of attachments on the message.

Show Sub-Attributes
JSON Object

An attachment on a message or comment in a shared mailbox.

Show Sub-Attributes
sourceIdstring

Source namespace/user ID associated with the attachment (long as string).

canBeBleachedboolean

True when the attachment can be sanitized/bleached. Present only when true.

applicationTypeinteger

Application type for cloud attachments. Present when > 0.

attachmentFileTypeNamestring

Human-readable file type category name derived from the file extension. Values:'IMAGE', 'DOCUMENT', 'MEDIA', 'COMPRESSED', 'OTHERS'.

attachmentTypeinteger

Attachment type code (e.g. inline, regular, cloud, huge).

attachmentDocumentIdstring

Document ID associated with the attachment for Zoho Docs integration.

attachmentStatusinteger

Attachment status code.

contentIdstring

Content ID for inline (embedded) attachments. Present when set.

openWithDocIdstring

Document ID for open-with integrations. Present when set.

receivedAtlong

Time the attachment was received, in epoch milliseconds. Present only when known.

shareTypeinteger

Share type of the attachment.

createdTimeUuidstring

Time-based UUID of the attachment.

isPasswordProtectedboolean

True when the attachment is password-protected. Present only when true.

isDeletedboolean

True when the attachment has been deleted. Present only when true.

expiryTypestring

Expiry type for time-limited attachment links. Present when set.

digeststring

Content digest/hash of the attachment. Present when set.

attachmentIdstring

Numeric attachment ID (long as string).

thumbnailHeightinteger

Image height in pixels. Present when thumbnail dimensions are available.

thumbnailUrlstring

External thumbnail URL, when available.

isAttachmentInlineboolean

True when the attachment is inline (embedded in the body).

expiryValuestring

Expiry value for time-limited attachment links. Present when set.

inferredFormatstring

Server-inferred file format when the extension is missing or ambiguous. Present when set.

isFavoriteAttachmentboolean

True if the attachment is tagged as a favourite.

scanDetailsJSON Object

Virus/malware scan details for the attachment.

Show Sub-Attributes
lastVirusScanTimestampinteger

Epoch timestamp of the last virus scan.

isScanCacheValidboolean

True when the cached scan result is still valid.

isEncryptedScanPerformedboolean

True when an encrypted scan was performed.

scanStatusstring

Result of the virus scan (e.g. 'CLEAN', 'INFECTED').

errorCodeinteger

Scan error code. Present when scanStatus indicates an error.

attachmentEncryptionStatusinteger

Encryption status code of the attachment.

isPreviewAvailableboolean

True when a web preview is available for this attachment.

isThumbnailboolean

True when this is a thumbnail attachment.

attachmentTagsarray[string]

Label/tag IDs associated with the attachment.

attachmentPartIdstring

MIME part identifier within the message.

thumbnailWidthinteger

Image width in pixels. Present when thumbnail dimensions are available.

timeStampstring

Epoch milliseconds (as string) of the received or created time.

sharedEmailIdsarray[string]

Email IDs of recipients. Present for huge attachment type only.

thumbnailDatastring

Base64-encoded JPEG thumbnail (data URI). Present for image attachments with thumbnail data.

isCommentAttachmentboolean

True when this attachment belongs to a comment.

attachmentSizestring

File size in bytes (long as string).

previewEngineFileIdstring

Preview engine file ID for document previews. Present when set.

attachmentFileTypeinteger

Numeric file type code (101=image, 102=document, 103=media, 104=compressed, 105=others).

attachmentFormatstring

File extension derived from the file name (e.g. 'pdf', 'png').

displayDatestring

Date of the attachment formatted for the user's time zone and date format.

commentIdstring

Comment ID this attachment belongs to. Present when isCommentAttachment is true.

attachmentNamestring

File name of the attachment.

applicationIdstring

Application ID for cloud attachments. Present when set.

requestIdstring

Unique identifier for the request.

statusJSON Object

Request status code and description (200 on success).

Example
{
  "code": 200,
  "description": "OK"
}
Show Sub-Attributes
codeinteger

HTTP-style numeric status code returned by the API (e.g. 200 for success).

descriptionstring

Human-readable text describing the outcome of the request.

- HTTP code 400

Response Body - application/json
JSON Object

Standard error envelope returned for failed requests. Exactly one of 'error' (single error) or 'errors' (multiple validation errors) is present.

Show Sub-Attributes
requestIdstring

Unique identifier of the request, useful for support and tracing.

errorJSON Object

Details of a single error, present when the request fails with one error.

Example
{
  "errorMessage": "The 'view' path parameter must be one of: all, unread, unassigned, assigned, archived, spam, trash.",
  "errorCode": "INVALID_INPUT",
  "locationType": "pathParam",
  "location": "view"
}
Show Sub-Attributes
errorMessagestring

Human-readable description of the error.

errorCodestring

Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).

locationTypestring

Where the offending input was supplied. Omitted when 'location' is omitted.

Allowed Values :
Show Values ▾
pathParamCopied!
queryParamCopied!
requestBodyCopied!
headerCopied!
Copied!Copy all as JSON Array
locationstring

Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.

errorsJSON Array

List of errors returned when a request fails validation on multiple parameters.

Show Sub-Attributes
JSON Object

Details of a single error. 'location' and 'locationType' are present only when the error is attributable to a specific input.

Show Sub-Attributes
errorMessagestring

Human-readable description of the error.

errorCodestring

Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).

locationTypestring

Where the offending input was supplied. Omitted when 'location' is omitted.

Allowed Values :
Show Values ▾
pathParamCopied!
queryParamCopied!
requestBodyCopied!
headerCopied!
Copied!Copy all as JSON Array
locationstring

Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.

statusJSON Object

HTTP-like status code and human-readable description of the error.

Example
{
  "code": 200,
  "description": "OK"
}
Show Sub-Attributes
codeinteger

HTTP-style numeric status code returned by the API (e.g. 200 for success).

descriptionstring

Human-readable text describing the outcome of the request.

- HTTP code 401

Response Body - application/json
JSON Object

Standard error envelope returned for failed requests. Exactly one of 'error' (single error) or 'errors' (multiple validation errors) is present.

Show Sub-Attributes
requestIdstring

Unique identifier of the request, useful for support and tracing.

errorJSON Object

Details of a single error, present when the request fails with one error.

Example
{
  "errorMessage": "The 'view' path parameter must be one of: all, unread, unassigned, assigned, archived, spam, trash.",
  "errorCode": "INVALID_INPUT",
  "locationType": "pathParam",
  "location": "view"
}
Show Sub-Attributes
errorMessagestring

Human-readable description of the error.

errorCodestring

Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).

locationTypestring

Where the offending input was supplied. Omitted when 'location' is omitted.

Allowed Values :
Show Values ▾
pathParamCopied!
queryParamCopied!
requestBodyCopied!
headerCopied!
Copied!Copy all as JSON Array
locationstring

Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.

errorsJSON Array

List of errors returned when a request fails validation on multiple parameters.

Show Sub-Attributes
JSON Object

Details of a single error. 'location' and 'locationType' are present only when the error is attributable to a specific input.

Show Sub-Attributes
errorMessagestring

Human-readable description of the error.

errorCodestring

Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).

locationTypestring

Where the offending input was supplied. Omitted when 'location' is omitted.

Allowed Values :
Show Values ▾
pathParamCopied!
queryParamCopied!
requestBodyCopied!
headerCopied!
Copied!Copy all as JSON Array
locationstring

Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.

statusJSON Object

HTTP-like status code and human-readable description of the error.

Example
{
  "code": 200,
  "description": "OK"
}
Show Sub-Attributes
codeinteger

HTTP-style numeric status code returned by the API (e.g. 200 for success).

descriptionstring

Human-readable text describing the outcome of the request.

- HTTP code 403

Response Body - application/json
JSON Object

Standard error envelope returned for failed requests. Exactly one of 'error' (single error) or 'errors' (multiple validation errors) is present.

Show Sub-Attributes
requestIdstring

Unique identifier of the request, useful for support and tracing.

errorJSON Object

Details of a single error, present when the request fails with one error.

Example
{
  "errorMessage": "The 'view' path parameter must be one of: all, unread, unassigned, assigned, archived, spam, trash.",
  "errorCode": "INVALID_INPUT",
  "locationType": "pathParam",
  "location": "view"
}
Show Sub-Attributes
errorMessagestring

Human-readable description of the error.

errorCodestring

Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).

locationTypestring

Where the offending input was supplied. Omitted when 'location' is omitted.

Allowed Values :
Show Values ▾
pathParamCopied!
queryParamCopied!
requestBodyCopied!
headerCopied!
Copied!Copy all as JSON Array
locationstring

Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.

errorsJSON Array

List of errors returned when a request fails validation on multiple parameters.

Show Sub-Attributes
JSON Object

Details of a single error. 'location' and 'locationType' are present only when the error is attributable to a specific input.

Show Sub-Attributes
errorMessagestring

Human-readable description of the error.

errorCodestring

Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).

locationTypestring

Where the offending input was supplied. Omitted when 'location' is omitted.

Allowed Values :
Show Values ▾
pathParamCopied!
queryParamCopied!
requestBodyCopied!
headerCopied!
Copied!Copy all as JSON Array
locationstring

Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.

statusJSON Object

HTTP-like status code and human-readable description of the error.

Example
{
  "code": 200,
  "description": "OK"
}
Show Sub-Attributes
codeinteger

HTTP-style numeric status code returned by the API (e.g. 200 for success).

descriptionstring

Human-readable text describing the outcome of the request.

- HTTP code 404

Response Body - application/json
JSON Object

Standard error envelope returned for failed requests. Exactly one of 'error' (single error) or 'errors' (multiple validation errors) is present.

Show Sub-Attributes
requestIdstring

Unique identifier of the request, useful for support and tracing.

errorJSON Object

Details of a single error, present when the request fails with one error.

Example
{
  "errorMessage": "The 'view' path parameter must be one of: all, unread, unassigned, assigned, archived, spam, trash.",
  "errorCode": "INVALID_INPUT",
  "locationType": "pathParam",
  "location": "view"
}
Show Sub-Attributes
errorMessagestring

Human-readable description of the error.

errorCodestring

Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).

locationTypestring

Where the offending input was supplied. Omitted when 'location' is omitted.

Allowed Values :
Show Values ▾
pathParamCopied!
queryParamCopied!
requestBodyCopied!
headerCopied!
Copied!Copy all as JSON Array
locationstring

Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.

errorsJSON Array

List of errors returned when a request fails validation on multiple parameters.

Show Sub-Attributes
JSON Object

Details of a single error. 'location' and 'locationType' are present only when the error is attributable to a specific input.

Show Sub-Attributes
errorMessagestring

Human-readable description of the error.

errorCodestring

Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).

locationTypestring

Where the offending input was supplied. Omitted when 'location' is omitted.

Allowed Values :
Show Values ▾
pathParamCopied!
queryParamCopied!
requestBodyCopied!
headerCopied!
Copied!Copy all as JSON Array
locationstring

Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.

statusJSON Object

HTTP-like status code and human-readable description of the error.

Example
{
  "code": 200,
  "description": "OK"
}
Show Sub-Attributes
codeinteger

HTTP-style numeric status code returned by the API (e.g. 200 for success).

descriptionstring

Human-readable text describing the outcome of the request.

- HTTP code 429

Response Body - application/json
JSON Object

Standard error envelope returned for failed requests. Exactly one of 'error' (single error) or 'errors' (multiple validation errors) is present.

Show Sub-Attributes
requestIdstring

Unique identifier of the request, useful for support and tracing.

errorJSON Object

Details of a single error, present when the request fails with one error.

Example
{
  "errorMessage": "The 'view' path parameter must be one of: all, unread, unassigned, assigned, archived, spam, trash.",
  "errorCode": "INVALID_INPUT",
  "locationType": "pathParam",
  "location": "view"
}
Show Sub-Attributes
errorMessagestring

Human-readable description of the error.

errorCodestring

Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).

locationTypestring

Where the offending input was supplied. Omitted when 'location' is omitted.

Allowed Values :
Show Values ▾
pathParamCopied!
queryParamCopied!
requestBodyCopied!
headerCopied!
Copied!Copy all as JSON Array
locationstring

Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.

errorsJSON Array

List of errors returned when a request fails validation on multiple parameters.

Show Sub-Attributes
JSON Object

Details of a single error. 'location' and 'locationType' are present only when the error is attributable to a specific input.

Show Sub-Attributes
errorMessagestring

Human-readable description of the error.

errorCodestring

Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).

locationTypestring

Where the offending input was supplied. Omitted when 'location' is omitted.

Allowed Values :
Show Values ▾
pathParamCopied!
queryParamCopied!
requestBodyCopied!
headerCopied!
Copied!Copy all as JSON Array
locationstring

Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.

statusJSON Object

HTTP-like status code and human-readable description of the error.

Example
{
  "code": 200,
  "description": "OK"
}
Show Sub-Attributes
codeinteger

HTTP-style numeric status code returned by the API (e.g. 200 for success).

descriptionstring

Human-readable text describing the outcome of the request.

- HTTP code 500

Response Body - application/json
JSON Object

Standard error envelope returned for failed requests. Exactly one of 'error' (single error) or 'errors' (multiple validation errors) is present.

Show Sub-Attributes
requestIdstring

Unique identifier of the request, useful for support and tracing.

errorJSON Object

Details of a single error, present when the request fails with one error.

Example
{
  "errorMessage": "The 'view' path parameter must be one of: all, unread, unassigned, assigned, archived, spam, trash.",
  "errorCode": "INVALID_INPUT",
  "locationType": "pathParam",
  "location": "view"
}
Show Sub-Attributes
errorMessagestring

Human-readable description of the error.

errorCodestring

Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).

locationTypestring

Where the offending input was supplied. Omitted when 'location' is omitted.

Allowed Values :
Show Values ▾
pathParamCopied!
queryParamCopied!
requestBodyCopied!
headerCopied!
Copied!Copy all as JSON Array
locationstring

Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.

errorsJSON Array

List of errors returned when a request fails validation on multiple parameters.

Show Sub-Attributes
JSON Object

Details of a single error. 'location' and 'locationType' are present only when the error is attributable to a specific input.

Show Sub-Attributes
errorMessagestring

Human-readable description of the error.

errorCodestring

Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).

locationTypestring

Where the offending input was supplied. Omitted when 'location' is omitted.

Allowed Values :
Show Values ▾
pathParamCopied!
queryParamCopied!
requestBodyCopied!
headerCopied!
Copied!Copy all as JSON Array
locationstring

Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.

statusJSON Object

HTTP-like status code and human-readable description of the error.

Example
{
  "code": 200,
  "description": "OK"
}
Show Sub-Attributes
codeinteger

HTTP-style numeric status code returned by the API (e.g. 200 for success).

descriptionstring

Human-readable text describing the outcome of the request.

Sample Response: HTTP 200

Copied!
  {
    "data": {
      "attachments": [
        {
          "attachmentFileTypeName": "DOCUMENT",
          "isAttachmentInline": false,
          "attachmentType": 1,
          "isFavoriteAttachment": false,
          "attachmentDocumentId": "9001234567891",
          "scanDetails": {
            "lastVirusScanTimestamp": 1746172800,
            "isScanCacheValid": true,
            "isEncryptedScanPerformed": false,
            "scanStatus": 1
          },
          "attachmentStatus": 1,
          "isPreviewAvailable": true,
          "isThumbnail": false,
          "attachmentTags": [
            "90666666666"
          ],
          "attachmentPartId": "1.2",
          "receivedAt": 1746172800000,
          "shareType": 0,
          "createdTimeUuid": "d4a1f2b0-2c3e-11f0-9a1b-0242ac120002",
          "timeStamp": "1746172800000",
          "attachmentSize": "204800",
          "isPasswordProtected": false,
          "isDeleted": false,
          "attachmentFileType": 102,
          "attachmentFormat": "pdf",
          "displayDate": "May 2, 2025 10:30 AM",
          "attachmentName": "invoice_98765.pdf",
          "attachmentId": "9001234567890"
        }
      ]
    },
    "requestId": "zmreq-abc12345-def6-7890",
    "status": {
      "code": 200,
      "description": "OK"
    }
  }
                
▼ Show full

Sample Response: HTTP 400

Copied!
  {
    "requestId": "zmreq-abc12345-def6-7890",
    "error": {
      "errorMessage": "The 'messageId' path parameter must be a numeric message ID.",
      "errorCode": "INVALID_INPUT",
      "locationType": "pathParam",
      "location": "messageId"
    },
    "status": {
      "code": 400,
      "description": "Bad Request"
    }
  }
                
▼ Show full

Sample Response: HTTP 401

Copied!
  {
    "requestId": "zmreq-abc12345-def6-7890",
    "error": {
      "errorMessage": "The OAuth access token is missing, malformed or has expired.",
      "errorCode": "INVALID_INPUT"
    },
    "status": {
      "code": 401,
      "description": "Unauthorized"
    }
  }
                
▼ Show full

Sample Response: HTTP 403

Copied!
  {
    "requestId": "zmreq-abc12345-def6-7890",
    "error": {
      "errorMessage": "The authenticated user does not have permission to perform this operation on this shared mailbox.",
      "errorCode": "INVALID_INPUT"
    },
    "status": {
      "code": 403,
      "description": "Forbidden"
    }
  }
                
▼ Show full

Sample Response: HTTP 404

Copied!
  {
    "requestId": "zmreq-abc12345-def6-7890",
    "error": {
      "errorMessage": "Message '1001234567890' was not found in this shared mailbox.",
      "errorCode": "INVALID_INPUT"
    },
    "status": {
      "code": 404,
      "description": "Not Found"
    }
  }
                
▼ Show full

Sample Response: HTTP 429

Copied!
  {
    "requestId": "zmreq-abc12345-def6-7890",
    "error": {
      "errorMessage": "The rate limit for this API has been exceeded. Retry after the lock period has elapsed.",
      "errorCode": "INVALID_INPUT"
    },
    "status": {
      "code": 429,
      "description": "Too Many Requests"
    }
  }
                
▼ Show full

Sample Response: HTTP 500

Copied!
  {
    "requestId": "zmreq-abc12345-def6-7890",
    "error": {
      "errorMessage": "Something went wrong. Please try again later.",
      "errorCode": "INTERNAL_SERVER_ERROR"
    },
    "status": {
      "code": 500,
      "description": "Internal Server Error"
    }
  }
                
▼ Show full