Upload attachments

In order to send an attachment in an email, you must first upload it to our server. Each plan has a maximum limit of MB of storage. For example, the free plan can have up to 5 MB of files simultaneously stored on our server.

How to upload files?

To upload one or more files, you must make a POST request to the attachment base URL Next we leave you an example with CURL


curl --location 'https://api.youremailapi.com/files' \ --header 'apikey: {YOUR_API_KEY_HERE}' \ --form 'files=@"{PATH_TO_IMAGE_1}"' \ --form 'files=@"{PATH_TO_IMAGE_2}"'

Response

If everything goes well, the api will return something similar to this:

[
  "c1798e9220511634267073e1f118796214ad39a94ae4a85699b2fdb95fe482ce",
  "69ca3ae3c06a9afce511698500710a46c187368abd05e0b20c7e50a77f6ab5a2"
]

It is an array with two elements of type string, each of these elements represents an uploaded file.

Important: You must save these tokens, since you will need them to send the email with the attachments