Skip to main content
Attach files with the POST /send-email endpoint. They’re specified in the attachments field of the body.
This page covers the API. You can also attach files from the platform when creating a campaign: in the creation panel, under Attachments. There you upload files straight from your computer (no public URL needed) and the same types and limits below apply.

Attachment structure

Each item in the attachments array accepts these fields: Each attachment must include filename and exactly one of url or content.

Allowed types

Only the following MIME types are allowed: If the MIME type doesn’t match these, the send fails in the background (see validation below).
Attachments cost you deliverability. On bulk sends, a binary attachment is a strong spam signal and your domain reputation pays for it. For audio or video, a button linking to your own page usually works better: lighter, plays in the browser, and tells you who opened it (an attachment doesn’t).

Limits

Attachments via URL

With the url field, the server downloads the file before sending it. Security measures:
  • HTTP/HTTPS only: Other URL schemes are rejected.
  • SSRF protection: URLs pointing to private or reserved IP addresses are blocked.
  • Timeout: The download has a 30-second limit. If the remote server doesn’t respond in time, the send fails.

Attachments via base64

With the content field, the value must be the file encoded in base64 without prefixes (no data:...;base64,). Only the raw base64 string.

Asynchronous validation

The /send-email endpoint is asynchronous: the HTTP response confirms the email was queued, but attachments are downloaded and validated in the background. If an attachment exceeds the limits, has a disallowed MIME type, or its URL is not accessible, the send fails asynchronously and is recorded in the activity history (current_status: "failed", with the detail in error_message). To confirm the result, query the Activity API with the email_id, or subscribe to webhooks.

Examples

Attachment via URL

Response (email queued; attachments are processed in the background):

Attachment via base64

Multiple attachments

The response uses the same queued structure as the first example. The attachments field is not validated in the HTTP response; check the final status with the Activity API.