users/email_accounts/folders/messages/attachments

Supported methods

List methods:GET

Instance methods:GET

Attachments list

GET: Listing of email attachments

GET https://api.context.io/lite
/users/id/email_accounts/label/folders/folder/messages/message_id/attachmentstest it
idUnique id of a user accessible through your API key
labelThe label property of the email account instance. You can use 0 as an alias for the first email account of a user.
folderThe full folder path using / as the path hierarchy delimiter.
message_idUnique id of a message. This must be a email_message_id of an existing message in the thread.

Parameters

nametypedescription
optional:
delimiterstringIf / isn't fancy enough as a hierarchy delimiter when specifying the folder you want to obtain, you're free to use what you want, just make sure you set this delimiter parameter to tell us what you're using.

Response body

[
  {
    "size": numberSize of file in bytes.,
    "type": stringMIME type as specified in message source, ie text/html,
    "file_name": stringName of file,
    "body_section": stringMIME section this file can be found in (useful if you're parsing raw source),
    "content_disposition": stringValue of the Content-Disposition header of the MIME part containing this file, if specified. Typically 'inline' or 'attachment',
    "email_message_id": stringValue of RFC-822 Message-ID header this file is attached to,
    "x_attachment_id": stringValue of the X-Attachment-Id header of the MIME part containing this file, if specified. A random unique string which differentiates this attachment from others.,
    "attachment_id": numberThe index of the attachment. Used for retrieving the actual file (see below)
  },
  ...
]

Attachment Instance

GET: Retrieve an email attachment

This call retrieves an attachment from an email message, and sets the request Content Type and encoding to appopriate values.

GET https://api.context.io/lite
/users/id/email_accounts/label/folders/folder/messages/message_id/attachments/attachment_idtest it
idUnique id of a user accessible through your API key
labelThe label property of the email account instance. You can use 0 as an alias for the first email account of a user.
folderThe full folder path using / as the path hierarchy delimiter.
message_idUnique id of a message. This must be a email_message_id of an existing message in the thread.
attachment_idThe index of the file attachment.

Parameters

nametypedescription
optional:
delimiterstringIf / isn't fancy enough as a hierarchy delimiter when specifying the folder you want to obtain, you're free to use what you want, just make sure you set this delimiter parameter to tell us what you're using.

Response body

(the requested file)