Skip to content

Email API

Send transactional emails, build campaigns, automate sequences — all with one TypeScript SDK.

$0.50 / 1,000 emails

  • Fast Delivery
  • High Deliverability
  • Click & Open Tracking
// Send transactional email
await stack0.mail.send({
subject: 'Welcome to our app!',
html: '<h1>Thanks for signing up!</h1>',
})
// Send with template
await stack0.mail.send({
to: user.email,
templateId: 'password-reset',
templateVariables: {
resetLink: `https://app.com/reset/${token}`,
},
})
TransactionalMarketingTemplatesCampaignsSequencesAnalytics

Built for production

Send Emails

Single, batch, broadcast, or scheduled delivery with templates.

stack0.mailqueued
await stack0.mail.send({
to,
subject,
html,
})
response178 ms
{
id: "msg_1lcja",
status: "queued",
createdAt: "2026-09-02T14:03:06Z",
}

Manage Audiences

Segment contacts into lists. Import in bulk, track subscriptions.

stack0.mailcreated
await stack0.mail.audiences.addContact({
email,
tags,
})
response215 ms
{
id: "msg_1bcbf",
status: "created",
createdAt: "2026-09-02T14:03:06Z",
}

Run Campaigns

Design, schedule, and analyze email campaigns with A/B testing.

stack0.mailqueued
await stack0.mail.campaigns.send({
audienceId,
templateId,
})
response233 ms
{
id: "msg_9tdm5",
status: "queued",
createdAt: "2026-09-02T14:03:06Z",
}

Automate Sequences

Build drip workflows with timers, conditions, and event triggers.

stack0.mailevent recorded
await stack0.mail.events.track({
eventName,
contactEmail,
})
response279 ms
{
id: "msg_1qnh7",
status: "event recorded",
createdAt: "2026-09-02T14:03:06Z",
}

Track Analytics

Delivery rates, opens, clicks, bounces, and unsubscribes.

stack0.mail200 OK
await stack0.mail.analytics.get({
campaignId,
})
response146 ms
{
id: "msg_s76hi",
status: "200 OK",
createdAt: "2026-09-02T14:03:06Z",
}

Domain Authentication

We handle SPF, DKIM, and DMARC. Add DNS records and you're set.

dnsverified
SPF: v=spf1 include:stack0.dev ~all

We handle SPF, DKIM, and DMARC. Add DNS records and you're set.

  • Fast Delivery

    Sub-second sending with proper SPF, DKIM, and DMARC authentication.

  • High Deliverability

    Automatic bounce handling and suppression list management.

  • Click & Open Tracking

    Real-time tracking for opens, clicks, and engagement metrics.

  • Template Variables

    Use {{name}} syntax or any variable in reusable templates.

  • TypeScript SDK

    Full type safety with autocomplete in your editor.

  • Webhooks

    Real-time delivery, open, click, and bounce events.

Built for real applications

Welcome Emails

Onboard new users with personalized welcome sequences.

Simple, usage-based

$20/mo includes $10 of usage. Metered beyond that, at the same rate for everyone.

Email

$0.50/ 1,000 emails


  • Transactional & marketing email
  • Templates with variables
  • Campaigns & sequences
  • Full analytics dashboard
  • Webhook events
  • Domain authentication
  • Same rate at any volume
Get Started

Frequently asked questions

Ready to build?

Get started in minutes.

Start Sending