Send email with attachments
UsePOST /sending/messages/with-attachments with your API key as X-API-Key. The message field contains the same JSON message used in Sending email. Add each file using a repeated files field.
Upload a file separately
The upload endpoint stores one file, up to 10 MB, when attachment storage is configured:data.file with key, fileName, contentType, sizeBytes and publicUrl. A separate upload does not send an email. To attach a file to a message, use the multipart sending example above.
Include multiple files
Repeatfiles for every attachment. Paths refer to files on the machine running your request. The message can contain plain text, HTML or both.
Node.js: send local files
Node.js 22+ providesfetch, FormData and Blob. Run this on your server, with your sending key in the WAZOBIA_API_KEY environment variable.
fetch set the multipart Content-Type and boundary. Setting Content-Type: application/json or a boundary manually will break file uploads. The combined 5 MB attachment limit applies to all files together.