Overview
This supplementary API allows you to send transactional emails via Encharge.
Encharge really shines when it comes to sending automated emails. However, if you need to send transactional emails (e.g. password resets), this API has got your back.
For example, you can use this API to send emails like:
- Password reset email
- Single sign-on email with a magic login link
- Payment receipt email
- and more
Sending HTML over email is a mess. Knowing what email clients support what HTML features can be a full-time job.
With Encharge, you can use our Visual Drag-and-Drop editor or our Simple editor to create a standard-compliant email that will look properly in all email clients. Then, you can send the template using this API.
Further reading:
If you haven't registered for Encharge yet, create an account. Then, get your API key from your Account.
Open the Emails section in Encharge. Click the + icon in the lower-left to create a new email. You can skip this step if you've already created your email template.
An example follows in Node.js. You can use API documentation in Postman to generate an example in your preferred language.
const axios = require('axios');
// Send a POST request
axios({
method: 'post',
url: 'https://api.encharge.io/v1/emails/send?token=yourAPIKey',
data: {
"to": "[email protected]",
// 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"
}
}
});
Last modified 1yr ago