Introduction
Flaresend is a transactional email API that runs in your own Cloudflare account.
Flaresend gives your apps a Resend-style email API on top of Cloudflare Email Service. You deploy one Worker, and every app you run sends through it: other Workers call it over a service binding, and everything else calls a REST API with a project key.
Every send is logged, retried on failure, tracked through delivery, and reported back to you with signed webhooks. Nothing leaves your Cloudflare account.
Quickstart
Send your first email in under five minutes.
API Reference
Every endpoint, parameter and error code.
SDK
@flaresend/client for Node.js, Bun, Deno, browsers and Workers.
Self-hosting
Deploy the mailer Worker to your own account.
Send in one call
import { Flaresend } from '@flaresend/client';
const flaresend = new Flaresend({
apiKey: process.env.FLARESEND_API_KEY!,
baseUrl: 'https://mailer.example.com',
});
await flaresend.emails.send({
from: 'Acme <hello@acme.com>',
to: 'ada@example.com',
subject: 'Hello from Flaresend',
html: '<p>It works.</p>',
});https://mailer.example.com stands for the URL of your own mailer Worker. Flaresend is not a hosted service: you deploy it once, then point every app at it.
What you get
Two ways to send
REST with a project API key from anywhere, or RPC over a service binding from Workers, with no key at all.
Safe retries
Idempotency keys, queue retries with backoff, and a status that never goes backwards.
Templates
Built-in React Email templates, plus templates you edit in the dashboard with version history.
Webhooks
Signed events for delivered, bounced, complained, opened, clicked and more.
How it fits together
202 queuedRead How it works for the details of each step.
Transactional email only
Cloudflare Email Service is for transactional email. Marketing and bulk campaigns are not permitted. Flaresend's broadcasts are off by default and capped at 500 recipients, for small lists of people who opted in.