Send your first email

Once you have your API Key and a configured SMTP account and a configured Template, you can start using the API.

https://api.youremailapi.com/mailer/

API parameters

PARAM REQUIRED FORMAT DESCRIPTION
subject Yes string The subject with which the email will be sent
to Yes string The recipient's email
smtp_account Yes string Token of the SMTP account with which you want to send the mail
template Yes string Token of the template with which you want to send the email
reply_to No array List of emails that can be answered. Example: YourEmailAPI <contact@youremailapi.com>
bcc No array List of emails to which a carbon copy will be sent
variables No object<string,any> In the event that your template has variables, you can replace them in this section
attachments No array Array of tokens related to previously uploaded files. See attachments for instructions

Example request with Curl


curl -XPOST -H 'apikey: API_KEY_HERE' -H "Content-type: application/json" -d '{ "subject": "My First Email", "to": "youremail@youremailapi.com", "smtp_account": "a smtp account token", "template": "a template token", "variables": { "%VAR%": "value" } "attachments": [ "c1798e9220511634267073e1f118796214ad39a94ae4a85699b2fdb95fe482ce", "69ca3ae3c06a9afce511698500710a46c187368abd05e0b20c7e50a77f6ab5a2" ] }' 'https://api.youremailapi.com/mailer/'