Skip to main content
Pass attachments as an array. Each file needs a filename and its content base64-encoded; contentType and contentId are optional.

Fields

string
required
Shown to the recipient. Up to 255 characters; path separators are refused.
string
required
The file, base64-encoded (standard alphabet; line breaks are tolerated).
string
default:"application/octet-stream"
The MIME type, for example application/pdf or image/png. Set it so mail clients open the file correctly.
string
Makes the file an inline part. Reference it from the HTML as <img src="cid:logo">. Letters, digits, ., _, @ and -.

Limits

  • 10 files per email.
  • 3 MB decoded in total per email. Over that the request is a 413 payload_too_large and nothing is queued. For larger files, link to a download.
  • Files are stored encrypted for 30 days, the same window as message bodies, then deleted.
  • The message object lists each attachment’s filename, contentType and size, never the bytes.
Executable and script files (.exe, .js, .bat, .vbs and similar) are blocked by most mail providers regardless of what the API accepts. Send a link instead.