Email

Create email attachment

Create attachments by POSTing to the attachments URI. The body of the request must be a JSON object describing and including the contents of a file to attach.

post/api/attachments

Request

Request body

content_typestring required

The mimetype of the uploaded file including the charset parameter, if needed. Example: "text/plain; charset=\"UTF-8\""

datastring required

Base64-encoded bytes of the file contents representing a maximum of 2.5 MiB of data when decoded. Padding with = chars is optional.

filenamestring required

The name of the uploaded file (max 255 UTF-8 bytes). Multiple files with the same name are allowed in separate requests.

Response

The email attachment was created. The response body will contain the IDs of the created attachments.

attachment_idstring[]

The attachment ID for a newly-created attachment. Reference this ID in the attachments list in the Email overrides.

okboolean

Either true or false. Represents if the operation completed successfully or not. If false, other properties defined here will not necessarily be present.

Changes

No recorded changes to this operation across all 9 revisions of this API.