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.

The hard part starts before and continues after the send call: can the service authorize the business action, identify a duplicate, receive an authenticated bounce event, trace a message a week later and separate marketing from password resets? An AWS team can evaluate SES against the infrastructure it already operates. A TypeScript team can compare Resend’s template integration with Postmark’s stream and history workflow. Test the operating tasks rather than declaring a universal shortest integration or lowest total cost.

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; inspect the selected official or community client for your languageWebhooks secured with Basic Auth + IP allowlist; inbound processing is available45-day default history; longer retention has plan/add-on terms100/month, no overages$15/month starting at 10,000
SequenzyCampaigns and product-state flowsVerify current data, permissions and exit behaviorVerify current data, permissions and exit behaviorVerify current data, permissions and exit behaviorCurrent capabilities and email-volume pricing
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 dated list-price calculations, not a deliverability forecast. Use the actual volume selection, not a range’s starting price. For SES, multiply the Essentials sending component by the number of thousands before adding other charges. SendGrid’s Email API page showed Essentials at $19.95 for 50,000 and $34.95 for 100,000; Pro was $89.95 at 100,000. Its wider advertised ranges do not make those starting prices apply to every volume.

Monthly volumeResendPostmark BasicMailgunAmazon SES EssentialsSparkPost
10,000$20 (Pro tier)$15 (Basic includes 10,000)$15 (Basic includes 10,000)10 × $0.16 = $1.60$15 minimum paid Startup selection includes 50K
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 at 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)$75 Foundation; $90 Scale with different retention/features100 × $0.16 = $16$30 Startup; $80 Growth 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. The snippet illustrates a call shape: supply the application-owned export identifier, fail clearly on a missing server-only key, check both returned errors and exceptions, and resolve the permitted recipient from authorized account state. Keep a durable application ledger beyond the provider’s window and reconcile uncertain acceptance before another attempt.

Postmark webhook verification shape

export function verifyPostmark(req: Request, username: string, password: string) {
  const expected = 'Basic ' + Buffer.from(username + ':' + password).toString('base64');
  if (req.headers.get('authorization') !== expected) return false;
  // Enforce the IP allowlist at trusted ingress, not from a client header.
  return true;
}
// Require HTTPS and deduplicate each event type and identifier.

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. The example checks credentials only: obtain them from your secret store, redact them from access logs and enforce the IP allowlist at a trusted proxy. A client-supplied forwarding header is not proof of origin. Validate the payload, store the event durably and deduplicate by event type plus its documented identifier. Delivery, bounce and click events for one MessageID are different events; a uniqueness constraint on MessageID alone would discard useful updates.

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 Essentials’ sending component is $0.16 per thousand at the listed volumes. Pro had a separate $105 account/region monthly fee plus $0.22 per thousand; credits for eligible new AWS accounts are conditional. Plan event storage, a dead-letter queue, monitoring, suppression and regional quotas. A low transport bill does not establish the lowest complete operating cost. Reconcile uncertain sends before considering a regional retry.

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, compare Resend Pro’s captured $35 stop with Scale’s $90 package before paying for support or domain allowances you do not need. Mailgun Scale is $90; SES has the lowest listed transport bill, with event handling and operations still yours.

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.

Keep the event and send records separate

Persist an authenticated, runtime-validated event before acknowledgment, with a database uniqueness constraint for its type and documented identifier. Resolve an authorized actor, recipient and approved sender from server-owned state. Create a separate unique send intention and recheck current eligibility and suppression before dispatch. Quarantine invalid or unmapped records, redact secrets and bodies, and distinguish pending, accepted, rejected and uncertain outcomes. During migration, assign one production sender per purpose and cohort.

Developer email API FAQ

The SendGrid answers below refer to the dated selections on Twilio’s SendGrid pricing page.

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

Try the operation your team can maintain. Resend’s Node send call and React Email integration can fit a TypeScript repository; its dated Pro tier included 50,000 emails for $20. Postmark is an alternative when explicit streams and message history matter. Confirm the deployed runtime, sender DNS, authorized recipient, retry policy and webhook handling in a controlled pilot rather than assuming a short call is production-ready.

What is the cheapest API at 100,000 emails?

SES Essentials’ captured sending component is 100 × $0.16 = $16 for 100,000 messages, before other charges and operating work. Resend Pro showed $35 and Scale $90; Mailgun Foundation showed $75 and Scale $90. SparkPost Startup showed $30 at 100K, while Growth showed $80 for that volume. Compare the required retention, support, quotas and incident ownership rather than treating a plan’s range headline as its price at every volume.

Do I need SMTP if an API exists?

No. Use the API when its structured response, metadata and operation model fit your application. SMTP can suit a legacy application or shared relay, but both paths need sender authentication, recipient authorization, suppression and bounce/complaint handling. An accepted API request or SMTP submission does not establish inbox placement or reading.

How should I handle webhook retries?

Use the provider’s documented authentication: verify the original-byte signature when offered, or appropriate credentials and trusted-ingress controls for Postmark. Store the validated typed event durably before acknowledgment. Deduplicate by event type and documented identifier so distinct events for one message survive. Apply effects transactionally or through an idempotent consumer. Quarantine invalid or unmapped records, and keep credentials and bodies out of logs.

When is SendGrid the right choice?

Evaluate SendGrid when its selected SDK, Email API feature set and account operations fit your organization. The dated terms listed a 60-day trial at 100 emails daily. Essentials showed $19.95 at 50,000 and $34.95 at 100,000; Pro showed $89.95 at 100,000. Marketing Campaigns is a separate product. Compare the chosen volume, retention and add-ons rather than applying a starting price across the entire advertised range.

Should I use one provider for every email?

A transactional stream and a newsletter have different permission, suppression and incident requirements. One vendor can host both when its stream model and plan cover those needs. Define the boundaries and assign one production sender to each message purpose and cohort. Preserve suppression history and a tested export path. A second provider adds isolation only if the routing and uncertain-outcome reconciliation prevent duplicate sends.