Skip to main content
You can add files to any email you send through AhaSend: an invoice as a PDF, a calendar invite as an .ics file, a CSV export. Over the API you put each file in the attachments array of the request; over SMTP you attach files the way your mail library already does. Available on Free, Pro and Max. See plans and features.

How do I attach a file with the API?

Add an attachments array to your Create Message request. Each attachment has a file name, a content type and the file’s content in data.
The data value in this example is shortened; send the complete base64 string of your file. Attachments work the same way with Create Template Message and Create Conversation Message.

How do I send a calendar invite?

An .ics file is plain text, so it can go in data without encoding:

How do I send attachments over SMTP?

Attach files with your mail library as usual when you send through the SMTP relay. AhaSend sends the message as you built it and doesn’t change its MIME structure.

How large can attachments be?

Base64 makes a file about a third larger, so a 15 MB PDF is already close to the limit once encoded. For large files, send a download link instead: the message stays small and lands more reliably in the inbox.

Can I receive attachments on incoming mail?

Yes. Message routes can include the attachments of incoming messages in the payload they send to your endpoint, base64-encoded with their file name, content type and Content-ID.