By Clara Whitmore · Updated 2026-10-07

Email APIs for developers

The best email API for developers depends on your failure budget

Choose Resend for a modern, code-owned workflow; Postmark when transactional streams and message history matter; Amazon SES when AWS scale and price dominate; Mailgun when you need inbound routing; SendGrid for a broad, established platform; or SparkPost for high-volume sending. The comparison below makes those trade-offs concrete.

Every API can accept a message. The hard part is what happens after the send call: can your service identify a duplicate, receive a verified bounce event, trace a message a week later, and keep marketing traffic away from password resets? Start with that operating question. If your application is already on AWS, SES is usually the cost-first answer. If your team wants templates and deploys in TypeScript, Resend is the shortest path. If support needs a durable delivery trail, Postmark is the calmer choice.

Prices below were checked on October 7, 2026 and link to each vendor’s pricing page. API and webhook descriptions summarize the public product surface; they are selection guidance, not a claim that any provider guarantees inbox placement.

Quick verdict by developer situation

  • Next.js, TypeScript, small team: start with Resend; its $20 Pro tier includes 50,000 emails a month and paid plans expose webhook endpoints.
  • Receipts and password resets: choose Postmark when separate message streams and a searchable delivery trail matter more than a broad marketing suite.
  • AWS-native or very high volume: choose Amazon SES and budget engineering time for SNS, IAM, CloudWatch and bounce processing.
  • Inbound replies or routing rules: choose Mailgun, whose published plans include inbound routing and an email API.
  • Many languages and an established account: evaluate SendGrid; its Email API page lists a 100-email/day free trial for 60 days, Essentials from $19.95/month, Pro from $89.95/month and custom Premier pricing.
  • 50,000-plus sends with analytics needs: consider SparkPost; its Startup tier starts at $15 for 50K–100K emails and Growth starts at $80 for 100K–2.5M.

Side-by-side API comparison

ProviderAPI style and SDKsWebhooks / inboundLogs and retentionFree tierEntry price
ResendREST API; JavaScript/TypeScript workflow plus SDKs for common server languagesWebhook endpoints on paid plans; inbound is not the central productDelivery events and dashboard logs; confirm retention for your plan3,000/month, 100/day, 3 domains$20/month for 50,000
PostmarkREST API and SMTP; libraries for Node, Ruby, Python, PHP, .NET and JavaWebhooks secured with Basic Auth + IP allowlist; inbound processing is availableMessage-stream history is a core workflow; confirm the retention window you need100/month, no overages$15/month starting at 10,000
SendGridREST v3 API and SMTP; broad language SDK coverageEvent Webhook; inbound parse is a separate capabilityActivity and event reporting; retention varies by plan and add-on100 emails/day for 60 days on the free trialEssentials from $19.95/month; Pro from $89.95/month; Premier custom
MailgunREST API and SMTP relay; SDKs and HTTP clients work across languagesConfigurable webhooks plus inbound routing1 day on Free/Basic, 5 days on Foundation, 30 days on Scale100/day, 1 custom domain$15/month for 10,000
Amazon SESAWS SES v2 API, SMTP and AWS SDKsSNS notifications and Mail Manager inbound; you assemble the event pipelineCloudWatch and your own S3/database become the durable logFree plan available for six months after account creation; eligible new AWS customers can receive credits$0.16 per 1,000 on Essentials
SparkPostREST API and SMTP; language choice is largely client-library drivenEvent webhooks; inbound and routing depend on configurationAnalytics are a selling point; confirm retention for your plan1,000/month, 50/day$15/month for 50K–100K

What the published prices mean at 10k, 50k and 100k sends

These are list-price calculations, not a deliverability forecast. For fixed tiers, use the tier that contains the volume. For SES, multiply the published Essentials rate by the number of thousands. SendGrid’s Email API page lists Essentials from $19.95/month for 50,000–100,000 emails and Pro from $89.95/month for 100,000–2,500,000, so use the tier range and confirm overages in a written quote.

Monthly volumeResendPostmark BasicMailgunAmazon SES EssentialsSparkPost
10,000$20 (Pro tier)$15 (Basic includes 10,000)$15 (Basic includes 10,000)10 × $0.16 = $1.60Startup tier begins at 50K–100K, so the published starting price is $15
50,000$20 (Pro includes 50,000)$55 at the 50,000 slider stop (Pro $60.50, Platform $66)$35 (Foundation includes 50,000)50 × $0.16 = $8$15 (Startup range includes 50K)
100,000$35 (Pro at the 100,000 slider stop; Scale is $90)No 100,000 slider stop; the next stop is 125,000 at $115 (Pro $126.50, Platform $138)$90 (Scale includes 100,000)100 × $0.16 = $16$80 (Growth starts at 100K)

Postmark prices by slider stop rather than by formula, which is why the table shows its stops and leaves 100,000 empty: Basic is $15 at 10,000, $55 at 50,000 and $115 at 125,000. Resend’s pricing page lists a $35 stop for Pro at 100,000 emails, with Scale at $90 for the same volume and a heavier support and domain allowance. Mailgun’s Basic and Foundation records publish extra-email rates from $1.80 and $1.30 per thousand; check the Scale terms before committing. SES looks dramatically cheaper because the number above is only message transport; add your queue, event store, monitoring and engineering time.

Two small integrations you can reason about

Resend send call (TypeScript)

import { Resend } from 'resend';
const resend = new Resend(process.env.RESEND_API_KEY);
await resend.emails.send(
  {
    from: 'Product <product@example.com>', to: ['user@example.com'],
    subject: 'Your export is ready', html: '<p>Download your export.</p>',
  },
  { idempotencyKey: exportId },
);

Resend documents this SDK option (or the Idempotency-Key HTTP header) for deduplicating retries; keys are kept for 24 hours. Use a stable key for each business event.

Postmark webhook verification shape

export function verifyPostmark(req: Request, username: string, password: string, allowedIps: Set<string>) {
  const expected = 'Basic ' + Buffer.from(username + ':' + password).toString('base64');
  if (req.headers.get('authorization') !== expected) return false;
  const sourceIp = req.headers.get('x-forwarded-for')?.split(',')[0]?.trim();
  return !sourceIp || allowedIps.has(sourceIp);
}
// After verification, parse and enqueue once by MessageID.

Postmark’s webhook docs describe HTTP Basic Auth in the webhook URL and allowlisting Postmark’s published webhook IPs; Postmark does not provide HMAC signatures. Validate the payload, then enqueue idempotently by MessageID so a retry cannot double-apply a suppression.

Choose by stack, volume and ownership

JavaScript or TypeScript product team: Resend keeps the send path close to application code and pairs naturally with React Email. Postmark is the better fit when the same team also needs a durable operational view of each transactional message. Either way, put API keys in a secret manager and separate staging domains from production.

Python, Ruby, PHP or .NET estate: Postmark and SendGrid have mature library coverage. Mailgun is attractive when your application receives replies or needs routing rules. Compare the shape of the SDK you will maintain, rather than counting language names on a marketing page.

AWS platform team: SES is compelling at every listed volume because the arithmetic is $0.16 per thousand on Essentials. It is a building block, not a turnkey observability product. Plan the SNS topic, dead-letter queue, CloudWatch alarms, suppression store and regional failover before the first production send.

50k to 100k monthly: Resend Pro, Mailgun Foundation, Postmark with an overage-aware tier, or SparkPost Startup fit different operating styles. Use the cost table as a shortlist, then test bounce events, exports and support response in a real pilot. At 100k, Mailgun Scale and Resend Scale are simple fixed tiers; SES remains cheapest on transport cost.

For a deeper two-provider decision, read our Resend versus Postmark comparison and the guide to transactional email services. Teams choosing an API for a new SaaS can also use the B2B SaaS shortlist. For a separate SaaS lifecycle job, Sequenzy’s pricing page lists a free allowance of 2,500 emails and a $19/month tier for 15,000 emails; it is not ranked here.

Pitfalls that create incidents

  • Domain authentication: publish SPF, DKIM and DMARC, then verify alignment on the exact From domain. A green API response only means the provider accepted the request.
  • Bounces and complaints: consume event webhooks, store recipient state, and suppress hard bounces before the next retry. Do not treat a 202 response as delivery.
  • Idempotency: assign a stable key to each business event. Queue retries and webhook retries are normal; duplicate receipts are a product bug.
  • Stream separation: keep receipts and password resets away from newsletters. Separate domains or streams make incident response and suppression rules understandable.
  • Log retention: Mailgun’s published retention moves from one day on Free/Basic to 30 days on Scale. If support needs older evidence, export events to your own store.

Developer email API FAQ

Which email API is easiest for a Next.js app?

Resend is the most natural first trial for a TypeScript team because its send call is small and its Pro plan includes 50,000 emails for $20. Postmark is the alternative when the application is primarily transactional and support needs message-level history. Test DNS, retries and webhook handling before moving production traffic.

What is the cheapest API at 100,000 emails?

On the published Essentials rate, Amazon SES is 100 × $0.16 = $16 for 100,000 messages. That is transport pricing; you still build or pay for queues, event processing, storage and monitoring. Resend Scale and Mailgun Scale are $90 tiers that trade a higher bill for more turnkey tooling.

Do I need SMTP if an API exists?

No. Use the API when you want structured responses, explicit metadata and a code-owned integration. SMTP is useful for legacy applications or a shared relay, but it does not remove the need to process bounces and complaints.

How should I handle webhook retries?

Verify the signature over the raw body, enqueue the event, acknowledge quickly, and deduplicate by the provider’s event or message identifier. A database uniqueness constraint is safer than an in-memory “seen” set.

When is SendGrid the right choice?

SendGrid is worth evaluating when your organization values a long-established platform, broad SDK coverage and a large feature surface. Twilio’s SendGrid pricing page lists a 60-day free trial, Essentials from $19.95/month, Pro from $89.95/month and custom Premier pricing; compare the applicable volume range and overages with the fixed tiers above.

Should I use one provider for every email?

Usually no. A transactional stream and a newsletter have different consent, suppression and incident requirements. One vendor can host both when its stream model is clear, but design the boundaries first and keep a tested export path.