Skip to main content
POST
Create Attachment Upload
Create a presigned URL for uploading an email attachment. After uploading the file to this URL, you must confirm the upload before using the attachment.

Upload Flow

Attachments use a three-step process:
  1. Create Upload - Get a presigned URL (this endpoint)
  2. Upload File - PUT the file directly to the presigned URL
  3. Confirm Upload - Notify MailBreeze the upload is complete
  4. Use Attachment - Include attachment ID when sending emails

Request Body

string
required
Original filename (e.g., report.pdf). Used for display in email clients.
string
required
MIME type of the file (e.g., application/pdf, image/png).
integer
required
File size in bytes. Maximum 40MB for regular attachments, 5MB for inline images.
boolean
default:"false"
Set to true for embedded images in HTML emails (returns contentId).

Examples

Response

string
Unique attachment ID to use when sending emails.
string
Presigned URL for uploading the file. PUT your file here.
string
ISO 8601 timestamp when the upload URL expires (typically 1 hour).
string
For inline attachments only. Use this in HTML: <img src="cid:contentId">.
Example Response
Example Response (Inline Image)

Limits

Errors