On this page
What Is an Email API?
An email API is a set of HTTP endpoints, offered by an email service, that lets your application send (and sometimes receive) email by making a request instead of running its own mail server. The service handles delivery and reports back what happened to each message.
Key takeaways
- An email API is how your code hands a message to a sending service over HTTPS, with an API key.
- The service signs and delivers the message. Between the service and the recipient's mail server, the protocol is still SMTP.
- Use the API for new code. Use SMTP when the software can only speak SMTP.
- Pick on docs, SDK coverage, webhooks and pricing. "Most flexible for developers" usually means those three first.
If you have ever pasted an API key into a config file and watched a password-reset email appear a second later, you have used one. This page is the plain version: what it is, what happens on each call, how it differs from SMTP, and which words around it (ESP, SMTP server, SES) mean what.
What is an email API?
An email API is a set of HTTP endpoints, offered by an email service, that lets your application send (and sometimes receive) email by making a request instead of running its own mail server. Your code sends a JSON message to a URL, and the service does the rest: delivery, retries, sender reputation and status events.
That last part is the point. You are not just sending one message, you are renting delivery infrastructure that already has a sending history. Most services also let you look up what happened to a message afterwards, through logs or events.
Choosing one? Start with our ranking of the best email APIs. A transactional email API in practice, meaning receipts and password resets, has its own page: transactional email API.
How an email API works
An email API works in five steps: your code builds a message, sends it over HTTPS with an API key, the service delivers it, the receiving mail server accepts it, and the service reports the outcome back.
- Your code builds the message. It collects the sender, recipient, subject and body, or a template ID and variables.
- Your code sends an HTTPS request with an API key. The key says which account is sending.
- The service validates, queues, signs and sends. It checks the key and the sender domain, queues the message, adds the DKIM signature and connects to the recipient's mail server.
- The receiving mail server accepts or rejects. Gmail, Outlook or whichever provider hosts the mailbox decides whether the message is delivered, deferred or bounced.
- Events come back. The service reports delivered, bounced or complained through a webhook, and keeps a log you can search or query.
Only the first hop is the API. From the service to the recipient's server, mail still travels over SMTP, the protocol defined in RFC 5321. Here is what step 2 looks like in practice, copied from Postmark's documentation:
curl "https://api.postmarkapp.com/email" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Postmark-Server-Token: server token" \
-d '{
"From": "sender@example.com",
"To": "receiver@example.com",
"Subject": "Postmark test",
"TextBody": "Hello dear Postmark user.",
"HtmlBody": "<html><body><strong>Hello</strong> dear Postmark user.</body></html>",
"MessageStream": "outbound"
}'
From Postmark's docs (Sending email with API), checked November 11, 2026.
Field names and the key header differ per vendor. Resend's docs, for example, use lowercase from and to and an Authorization: Bearer header, where Postmark uses From, To and X-Postmark-Server-Token. The request shape is the same idea everywhere. What goes into a production request (tags, metadata, idempotency, templates) is on the transactional email API page.
Email API vs SMTP
Use an email API for new code, and SMTP when the software you are connecting can only speak SMTP, such as a CMS, a legacy app or a device. Most services offer both, so the choice is about your code, not about which provider you pick. The relay side is explained in what is an SMTP relay.
| Email API | SMTP | |
|---|---|---|
| Setup | An HTTPS call with an API key, through an SDK or any HTTP client | Host, port, username and password in the mail settings you already have |
| Speed | No independent comparison of delivery speed between the two methods exists | Same: we found none |
| Features | The request body exposes the provider's features: templates, tags, batch sending | Some features only through custom headers, some not documented over SMTP |
| Security | HTTPS, with a key you can often scope or rotate | TLS for the connection (RFC 8314 recommends it), a username and password |
| Use it when | You are writing new code | The software only speaks SMTP |
Two details from the vendor docs show the feature gap. SendGrid documents stored templates in its Mail Send API, but stored-template use over SMTP is not documented in its docs (checked November 11, 2026). Resend's SMTP takes an API key as the password, so the credential is the same either way (our free SMTP servers table, November 10, 2026).
All 14 sending services we checked in our tool index, from Amazon SES to ZeptoMail, list both an API and SMTP (vendor docs, November 2026). The full table and the trade-offs are in SMTP vs email API.
What is an email service provider (ESP)?
An email service provider (ESP) is a company that runs sending infrastructure for you and gives you ways to use it. The API is one way in. A dashboard, an SMTP relay and plugins are others.
An ESP sends mail. A mailbox provider, such as Gmail, Outlook or Yahoo, hosts the recipient's inbox and decides what to do with what arrives. So an ESP is not an API, and an API is not an ESP: the API is a door into the ESP.
Some ESPs lean toward app email and some toward marketing. Brevo and Mailjet are marketing platforms that also sell sending by API. Resend and Postmark are built for app email.
What is an SMTP server?
SMTP stands for Simple Mail Transfer Protocol, the standard way mail moves between servers. An SMTP server accepts a message and passes it on to the next server until it reaches the recipient's. RFC 5321 (J. Klensin, October 2008) specifies it.
A sending service's SMTP relay is an SMTP server that accepts mail from your app and delivers it for you, so your app never talks to Gmail directly. The service still handles signing, retries and reputation. For host, port and TLS values by service, see SMTP settings for free SMTP servers. To make other servers use TLS when delivering mail to your domain, see MTA-STS.
Types of email APIs
Email APIs fall into five types, and only the first three are about sending or receiving through a service. Check which one a vendor means before you compare.
| Type | What it does | Example use |
|---|---|---|
| Sending (transactional) | Sends one-to-one messages triggered by your app | Receipts, password resets, alerts |
| Marketing or campaign | Manages contacts and lists and sends to many people | A newsletter sent from your CRM |
| Inbound (receiving) | Receives mail at an address and passes it to your app, usually by webhook | Reply by email, support tickets, autoresponders |
| Mailbox | Reads and sends from a person's own inbox | The Gmail API |
| Verification | Checks whether an address looks valid before you send | Sign-up forms |
Sending is the type most people mean by "email API". It is covered in transactional email API, and the kind of mail it carries is defined in what is transactional email. Ten sending services in our index, including Postmark and Mailgun, list an inbound feature; the directory is inbound email services. Amazon SES's docs list autoresponders, unsubscribe systems and ticketing as receiving uses (AWS docs).
Mailbox APIs are a different kind of tool. Google describes the Gmail API as a RESTful API that lets you access Gmail mailboxes and send mail (Google for Developers). It acts for one person's account, not for your application's sending domain, so we leave it out of our rankings. Verification is out of scope too. SendGrid, for one, lists Email Address Validation as a separate API key scope.
What an email API gives you
An email API gives you delivery infrastructure and tooling so you don't have to build them: you send a request and the service handles the rest. Here is the list.
- Deliverability groundwork. Servers and IPs with a sending history, plus domain authentication setup.
- Logs and events. A record of what happened to each message. How long it lasts varies: Mailtrap keeps logs 3 days on Free and 30 on Enterprise, Resend 30 days on Free, Pro and Scale, Postmark 45 days on every plan (vendor pricing pages, November 2026).
- Templates. Stored layouts you call by ID. Postmark allows up to 100 per server by default, SES up to 20,000 per region (vendor docs, November 11, 2026).
- Scale. Batch endpoints send many messages per call: up to 500 on Postmark and Mailtrap, 100 on Resend, 50 on SES (vendor API references, November 11, 2026).
- Suppression. Addresses that bounced or complained are blocked automatically, so your reputation isn't dragged down by repeat sends.
- SDKs. Official client libraries in your language, from 4 languages for SparkPost to 9 for Resend (vendor docs, November 2026).
What does it cost? Sending usually bills per message or per plan, and the extras (log retention, dedicated IPs) are where bills diverge. Prices are in transactional email pricing compared, and we keep them off this page.
Build or buy? You can run your own mail server. Then you own IP reputation, retries, bounce handling and monitoring, and several clouds restrict port 25 by default (self-hosting notes). For most apps, the service is cheaper than the hours.
What to look for in an email API
Six things separate email APIs in practice: docs, SDKs, deliverability, webhooks, pricing and uptime terms. Here is each with one concrete check.
- Docs. Is there a published OpenAPI spec you can generate a client from? Resend, Mailgun and Mailtrap publish one; Postmark links an interactive API Explorer instead (vendor docs, November 11, 2026).
- SDKs. Is your language on the list? SparkPost (now Bird Email) lists official SDKs in four languages, Mailtrap in eight.
- Deliverability. Mostly your own authentication and sending habits, not the vendor. Al Iverson makes that case in Which ESP is best for deliverability? (Spam Resource, July 2026). We found no independent send-to-inbox speed comparison across providers. The ranking's deliverability section shows what each service gives you for it.
- Webhooks. Are events signed? Mailgun and Mailtrap sign with HMAC-SHA256, Resend uses Svix, and Postmark documents no HMAC signing (Basic Auth and IP allowlisting instead). See email APIs with webhooks.
- Pricing. Free tiers range from 100 emails a month (Postmark) to 4,000 (Mailtrap), with different caps (vendor pricing pages, November 6 and 10, 2026). See free email APIs.
- Uptime terms. SLAs differ: Amazon SES commits to 99.9% monthly uptime per region, Mailgun's SLA page says 99.99% for API and SMTP, and Postmark publishes none (vendor pages, November 11, 2026).
So what is "the most flexible email API for developers"? Flexibility mostly means SDK coverage, clear docs and good webhooks. Rank candidates on those with the best email APIs and email APIs with webhooks.
How we compared: vendor docs, API references, pricing pages and status pages, checked November 11, 2026. We ran no sending tests, and the site has no ads, affiliate links or paid placements.
Email API: FAQ
What is an email API used for?
An email API is used to send email from application code: receipts, password resets, alerts and notifications. Some also receive mail, so your app can react to replies, and most report delivery events back by webhook. If you only need to send, the sending side is covered in transactional email API.
What is the difference between an email API and SMTP?
An email API takes an HTTPS request with a JSON body, while SMTP is the older protocol every mail library and CMS already speaks. API is the better choice for new code because it exposes more of the provider's features. SMTP is for software you can't change. See SMTP vs email API.
Is an email API the same as an email service provider?
No. An email service provider (ESP) is the company that sends your mail. The API is one way to reach it, next to a dashboard and an SMTP relay. An ESP also differs from a mailbox provider such as Gmail, which hosts the recipient's inbox. See what an ESP is.
Do I need a developer to use an email API?
Usually someone who can make an HTTP request, or install an SDK, yes. Without one, you can still send through an ESP's dashboard, SMTP settings or a plugin. Postmark's official libraries list includes a WordPress plugin and Zapier Actions (Postmark docs, checked November 11, 2026). For anything custom, plan for a developer.
Is an email API free?
Some services have free plans, but they are capped. Postmark's Developer plan allows 100 emails a month, Resend's free plan 3,000 a month capped at 100 a day, and Mailtrap's 4,000 a month capped at 150 a day (vendor pricing pages, November 6 and 10, 2026). Compare them in free email APIs.
What does a REST email API request look like?
It is an HTTPS POST to the service's send endpoint, with an API key in a header and a JSON body holding the sender, recipient, subject and content. Postmark's official curl example is in the snippet above. Field names and the key header change from one vendor to the next.
What is SES in AWS?
Amazon SES (Simple Email Service) is Amazon's email sending and receiving service. AWS describes it as a platform for sending and receiving email using your own addresses and domains (AWS docs). It has an API and SMTP. Read our Amazon SES review.
Is the Gmail API an email API?
It is a different kind. The Gmail API reads and sends mail from a person's own Gmail mailbox, with that person's consent, while an email API of the kind on this page sends from your app's domain through a sending service. See types of email APIs.