Overview
This supplementary API allows you to send transactional emails via Encharge.
Last updated
const axios = require('axios');
// Send a POST request
axios({
method: 'post',
url: 'https://api.encharge.io/v1/emails/send?token=yourAPIKey',
data: {
"to": "recipient@acme.com",
// Name of the template you created in step 1.
"template": "Template Name",
/**
* Dictionary of properties to be replaced in the email.
* For example, passing
* `{ "loginURL": "https://app.encharge.io/login/3n2l3ad99"}`
* will replace
* `{{ loginURL }}` in the email body or subject.
*
*/
"templateProperties": {
"loginURL": "https://app.encharge.io/login/3n2l3ad99"
}
}
});