- Developer Hub
- SparkPost API
- Email Tools
- Slack Channel
- User Guides & Migrations
- Submit a Ticket
- SparkPost Academy
- Deliverability Guide
- Email Explained
- White Papers & Guides
- Webinars & Videos
- SparkPost vs. SendGrid
- Contact Us
An email API (application programming interface) gives applications access to the functionality available in an email platform, such as generating and sending transactional emails, manipulating templates, and enabling access to email metrics.
While many applications use basic SMTP (Simple Mail Transport Protocol) support for sending email, developers can also leverage an email platform’s APIs to gain programmatic access to basic email sending, and also access additional capabilities not offered by legacy protocols.
SMTP, the standard protocol used to send email, is a traditional case of “easy to learn, hard to master.” While it’s straightforward to send simple messages one at a time, it is more complicated to assemble and manage rich content, and sending at volume requires knowing how to properly scale your messaging infrastructure and follow all the best practices imposed by the various ISPs (Internet Service Providers) to ensure your message doesn’t end up in the spam folder. It’s easier to let someone else handle the sending and rely on an API to perform necessary email functions.
When used with cloud email delivery, an email API makes it easy to send email, particularly transactional messages, from your app or website—without needing to manage servers and their operational requirements. Instead, your app relies on the email API to manage things such as message assembly, message sending, and reporting.
An email API also enables you to easily access many kinds of metrics, such as how many messages delivered, how many messages were rejected by the ISP (and why), and how many recipients opened a message and clicked on its links. Typically, a cloud email platform will offer a dashboard you can use to easily view this data.
Cloud email delivery is an example of SaaS, which stands for “software as a service.” Cloud email delivery platforms excel in the sending and management of transactional messages, given the need to send them continuously, 24 hours a day. They’re built with safeguards in place to protect against denial-of-service attacks, Internet outages, weather events, and other problems that can cause email sending problems. No one wants their email system to fail on a busy day, such as Cyber Monday.
Email notifications and transactional emails are a perfect use case for an email API. Typical examples include:
- Account creation notices
- Password resets
- Suspicious log-in notifications
- App error messages
- Purchase receipts
- Shipping notifications
- Legal notices
In general, the process of generating and sending a notification or transactional email with an email API looks something like this:
- An event occurs, such as an e-commerce purchase or a password reset, in a web-based service or a mobile app.
- The service or app communicates with an API on the cloud email delivery service and provides such information as the customer email address, the details of the purchase or password reset, and other details.
- The email service creates a message with those details, using a template that has already been established for that specific purpose. (For example, you probably want a purchase email to look and read differently from a password reset email, given what a customer likely expects in each situation.)
- The email service transmits the message, negotiating the various technical “handshakes” required to ensure the email is delivered into the customer’s inbox.
- The email service records specific details about the delivery of the message, such as whether it failed and why, if it was opened, if the recipient clicked any of the links in the email, and so forth. Those details are available in a dashboard.
In the past, sending such emails would require the creation and maintenance of physical servers, with the need to employ people well-versed in the associated technical requirements. In addition, each transactional event would require the generation and sending of a fully-formed email message, an inefficient process that was susceptible to errors and didn’t scale well.
Today, a cloud email delivery service requires the resources of a programming team that’s already working on a web-based service and/or mobile app. They simply need to plug their code into an API. Once that work is done, the developers can continue putting their main focus on creating differentiated value for that service and/or app, which directly impacts a company’s revenue stream, and let the email service perform its job.Email APIs are the most performant way to send and manage email notifications and other transactional email messages.
In addition to notifications and other transactional messages, API-driven email is well suited for:
- Growth marketing and growth hacking efforts that depend on individualized triggers to drive customer engagement. For example, a social media platform that wants to let users know about activity on their posts, or any service or app that wants to send “You’ve completed X% of your profile; finish it today” kinds of messages.
- Enterprise senders who need personalized content and time-sensitive delivery that scales on-demand.
More Essential Email Resources
Develop your email industry expertise and master best practices with SparkPost’s email resources.
The Big Rewards of Email Deliverability
Learn how third-party data shows the deliverability difference between SparkPost and also-ran cloud service providers yields hard, bottom-line benefits.read more
Ready to learn more?
This great ebook explains 10 things you might not realize about email. Download the survival guide to email today.SparkPost © 2018 All Rights Reserved
Send this to a friend