GET
cURL
Downloads one attachment. Use the message id and attachment id from Get a thread. The file always comes back as a download (Content-Disposition: attachment), with the original filename in filename*. Content-Type is the attachment’s own type when it is well formed, and application/octet-stream otherwise.
  • Only attachments listed on a thread can be downloaded. Images embedded in a message’s body (inline images) are not listed and return 404.
  • Attachments over 25 MB are listed but their contents were never stored, so they return 404 with a message saying so.
  • An attachment outside the key’s team or domain returns 404, the same as one that does not exist.
  • An attachment from a message the virus check flagged returns 403: “We blocked this file because it may contain a virus.”
Needs an API key with full access.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

messageId
string
required
Required string length: 1 - 64
Pattern: ^[A-Za-z0-9_-]+$
Example:

"cm9msg123"

attachmentId
string
required
Required string length: 1 - 64
Pattern: ^[A-Za-z0-9_-]+$
Example:

"cm9att123"

Response

200 - application/octet-stream

The attachment's bytes, always as a download (Content-Disposition: attachment). Content-Type is the attachment's own type when it is well formed, otherwise application/octet-stream. Inline images embedded in a message body are not downloadable. At most 25 MB.

The response is of type file.