Transactional + marketing
in one SDK
Stop juggling multiple email services. Send transactional emails, build campaigns, automate sequences—all with a single TypeScript SDK.
await stack0.mail.send({
from: 'hello@yourdomain.com',
to: 'user@example.com',
subject: 'Welcome!',
html: '<h1>Thanks for signing up!</h1>',
});$0.50 / 1,000 emails • Plans starting at $5/month
Everything in one place
No more stitching together multiple services for transactional and marketing email
Send
Single, batch, broadcast, and scheduled sending
Templates
Reusable templates with variable substitution
Campaigns
Create, schedule, and analyze email campaigns
Sequences
Automated drip campaigns and workflows
Analytics
Opens, clicks, bounces, and time series data
Reliable transactional email
Password resets, order confirmations, notifications—delivered fast with full tracking. High deliverability backed by proper SPF, DKIM, and DMARC.
Welcome Email
Greet new users immediately after signup
await stack0.mail.send({from: 'hello@yourdomain.com',to: 'user@example.com',subject: 'Welcome to our app!',html: '<h1>Thanks for signing up!</h1>',});
Password Reset
Secure password reset with unique tokens
await stack0.mail.send({from: 'security@yourdomain.com',to: user.email,templateId: 'password-reset',templateVariables: {resetLink: `https://app.com/reset/${token}`,expiresIn: '1 hour'},});
Order Receipt
Transaction confirmations with order details
await stack0.mail.send({from: 'orders@yourdomain.com',to: customer.email,templateId: 'order-receipt',templateVariables: {orderId: order.id,total: order.total,items: order.items,},});
Marketing without the bloat
Build audiences, send campaigns, automate sequences—all from the same API. No need for a separate marketing tool.
Audiences
Segment contacts into lists. Import in bulk, track subscription status, and manage preferences.
Campaigns
Design and schedule email campaigns. Target specific audiences with personalized content.
Sequences
Build automated email flows with timers, conditions, and event triggers. Visual flow builder included.
Events
Define custom events to trigger sequences. Track user behavior and automate responses.
// Track event to trigger a sequenceawait stack0.mail.events.track({eventName: 'purchase_completed',contactEmail: 'user@example.com',properties: {amount: 99.99,product_id: 'prod_123'},});// The sequence automatically:// 1. Sends thank you email immediately// 2. Waits 3 days// 3. Sends review request// 4. Waits 7 days// 5. Sends upsell offer
Built for developers
TypeScript-first, excellent types, intuitive API design
TypeScript-First SDK
Full type safety with autocomplete. Catch errors at compile time, not runtime.
Template Variables
Use {{name}}, {{company}}, or any variable in your templates. Preview with test data.
Webhook Events
Real-time notifications for delivery, opens, clicks, bounces, and complaints.
Analytics Dashboard
Track delivery rates, engagement metrics, and time series analytics in one place.
// Send with template and variablesawait stack0.mail.send({from: 'hello@yourdomain.com',to: 'user@example.com',templateId: 'welcome-email',templateVariables: {name: 'John',company: 'Acme Inc',loginUrl: 'https://app.acme.com/login'},});// Template: "Hi {{name}}, welcome to {{company}}!"
Proper email authentication
We handle SPF, DKIM, and DMARC configuration for you. Just add a few DNS records and you're set for maximum deliverability.
Authorizes Stack0 to send on your behalf
v=spf1 include:stack0.dev ~allCryptographic signature for email authenticity
CNAME record pointing to stack0.devPolicy for handling authentication failures
v=DMARC1; p=quarantine; rua=mailto:...Verification takes minutes. Add DNS records, click verify, and start sending.
Coming from another provider?
If you're using Resend, you already know our API. Just change the import.
From Resend
Nearly identical API, same simplicity, plus marketing features
Before (Resend)
import { Resend } from 'resend'
const resend = new Resend(key)
await resend.emails.send({
from: '...',
to: '...',
subject: '...',
html: '...',
})After (Stack0)
import { Stack0 } from '@stack0/sdk'
const stack0 = new Stack0({ apiKey })
await stack0.mail.send({
from: '...',
to: '...',
subject: '...',
html: '...',
})From SendGrid
Simpler API, better DX, lower cost
Before (SendGrid)
sgMail.setApiKey(key)
await sgMail.send({
to: '...',
from: '...',
subject: '...',
text: '...',
html: '...',
})After (Stack0)
const stack0 = new Stack0({ apiKey })
await stack0.mail.send({
from: '...',
to: '...',
subject: '...',
html: '...',
})Better than Resend
Same great DX, plus campaigns, sequences, and audiences built in.
Simpler than SendGrid
No enterprise bloat. Clean API, fair pricing, TypeScript-first.
Unified Platform
Works with CDN, Screenshots, and other Stack0 products. One SDK.
Simple, usage-based pricing
Pay only for what you send. No hidden fees, no per-seat charges.
Transactional & marketing. Inbound & outbound.
Example usage costs
Plans starting at $5/month. All features included.
Ready to simplify your email?
One SDK for transactional and marketing. No more juggling services.