Adding attachments to your emails could cause your deliverability to suffer. This happens because some mail servers will reject the message due to the attachment size or type. The message could also be rejected by email filters, which may flag emails with attachments as malicious.
We recommend placing a link in the body of the email and having that link redirect the customer to the file attachment hosted online. Doing this will also allow you to track click events so you will know if a customer has downloaded the attachment.
Sendwithus’ API takes an array of file objects in the “files” parameter of the send call. A file object consists of an “id” (the filename) and a “data” key.
Refer to our Sending API for more information.