Email API v.2 - Attachments Object Explained

Attachments is an array of Attachment objects that in turn reflect actual attached files.
It is an Optional object used to add attachments to an email message.
Email Plus limits the length of the attached files depending on the plan you have purchased.

Request fields

attachments An array of attachmentObject in the following format:
[{"content":"base64 encoded data", "type":"mime/type", "filename":"attachment file name you wish"}, ...]

PathTypeDescription
contentStringThe attachment content base64encoded
If provided, must not be blank
typeStringThe attachment (mime) type If provided must not be blank
filenameStringThe attachment file name
If provided, must not be blank. Size must be between 0 and 128 inclusive

The property content contains the actual data in base64 encoding.
The property type indicates how the content are to be treated by indicating the appropriate MIME type for MIME/MultiPart format.
The property filename sets the desired filename to be suggested when the recipient tries to save the attachment. It must correspond to the type indicated by type property.