resend-node

The official Node.js and TypeScript SDK for sending email through the Resend API.

SDK
npm
v6.34.1
971 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
89 /100 Excellent
Development Activity 100
Maintenance 100
Community 60
Maturity 56
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
86 /100 Excellent
Architecture 85
Code Quality 88
Innovation 80
Learning Curve 90

Resend’s official Node.js SDK is a fully typed client for the Resend email API, letting you send transactional and marketing email with a few lines of code. It wraps every Resend endpoint — emails, batches, broadcasts, domains, contacts, audiences/segments, API keys, webhooks, and more — behind a single ergonomic Resend class.

Beyond plain text and HTML, the SDK can render React email components to HTML at send time via @react-email/render, so you can author templates as JSX and ship them without a separate build step. It targets modern Node.js (>=20), ships dual ESM/CJS builds, and returns a consistent { data, error } shape on every call.

What You Get

  • A single typed Resend client exposing every Resend API resource (emails, batch, broadcasts, domains, contacts, segments, API keys, webhooks, templates, and more).
  • First-class React email support that renders JSX templates to HTML at send time via the optional @react-email/render peer dependency.
  • A consistent { data, error } return shape on every call, so failures are handled as values rather than thrown exceptions.
  • Dual ESM/CJS builds with bundled .d.ts type declarations and idempotency-key support for safe retries.

Common Use Cases

  • Sending transactional email such as sign-up confirmations, password resets, and receipts from a Node.js backend.
  • Delivering marketing broadcasts and managing contacts, segments, and suppressions programmatically.
  • Rendering React Email components to HTML and sending them directly without a separate template pipeline.

Under The Hood

Architecture — The public surface is a single Resend class in src/resend.ts that holds a base URL, user agent, and an auth Headers object, then instantiates one resource controller per API area (Emails, Batch, Broadcasts, Domains, Contacts, Segments, ApiKeys, Webhooks, and more) as readonly fields. Each controller receives the Resend instance and calls its shared post/get/put/patch/delete helpers, which funnel into one fetchRequest method wrapping the native fetch; that method normalizes every outcome into a { data, error, headers } response so errors are returned as values. React templates are rendered to HTML in src/render.ts, which lazily imports @react-email/render only when a react payload is supplied.

Tech Stack — Written in TypeScript targeting Node.js >=20, with a build via tsdown producing dual ESM/CJS output plus .d.ts declarations. Runtime dependencies are minimal: postal-mime for inbound email parsing and standardwebhooks for webhook verification, with @react-email/render as an optional peer dependency. Tooling uses Biome for lint/format, Vitest for tests, and PollyJS for recorded HTTP fixtures.

Code Quality — Testing is thorough: 36 *.spec.ts files sit alongside the source, plus integration specs backed by recorded HAR fixtures under __recordings__ and a separate e2e/ suite. Each resource is split into a controller plus a dedicated interfaces/ directory, giving strong type coverage and consistent naming. Error handling is deliberate — fetchRequest distinguishes JSON API errors, malformed responses, and network failures, returning a typed ErrorResponse in each case.

API Design — The developer experience is a highlight: a two-line setup (new Resend(key) then resend.emails.send(...)) gets you sending, method names mirror REST verbs and resource names, and the uniform { data, error } return removes try/catch boilerplate. All request and response types are exported from the package root, the README documents text, HTML, and React flows, and idempotency keys are a first-class option for safe retries.

Used by 40 apps in this directory

TypeScript
53%
MIT

MentraOS

AI Development · Developer Tools

2,391

The open source operating system and SDK that lets developers build one app and run it across smart glasses from Even Realities, Vuzix, Mentra Live, and more.

View details
92
Repo Health
77
Technical
66
Dependency
Built with
TypeScript 53%
Java 16%
Updated 6 days ago
TypeScript
96%
AGPL 3.0

Midday

Invoicing Finance · Productivity

15,091

All-in-one AI-powered business operations platform for freelancers and solo entrepreneurs to manage invoicing, time tracking, banking, and financial intelligence.

View details
51
Repo Health
78
Technical
67
Dependency
Built with
TypeScript 96%
Updated 4 months ago
TypeScript
98%
Other

Novu

Developer Tools

40,195

Open-source communication infrastructure that connects your products and AI agents to every channel your users live on — Inbox, Email, SMS, Push, Chat, and more.

View details
93
Repo Health
80
Technical
64
Dependency
Built with
TypeScript 98%
Updated 6 days ago
TypeScript
99%
Apache 2.0

Onlook

AI Design Tools · Design Tools

26,996

An open-source, AI-first visual editor that lets designers and developers build, style, and deploy React apps directly in code — no handoff required.

View details
63
Repo Health
80
Technical
64
Dependency
Built with
TypeScript 99%
Updated 1 weeks ago
TypeScript
82%
AGPL 3.0

OpenStatus

Devops · Monitoring

9,221

Open-source status pages and uptime monitoring with global synthetic checks, monitoring-as-code, and AI agent integration via MCP.

View details
77
Repo Health
82
Technical
69
Dependency
Built with
TypeScript 82%
MDX 14%
Updated 1 weeks ago
TypeScript
91%
AGPL 3.0

OpenPanel

Analytics

7,187

Open-source Mixpanel alternative with session replay, MCP integration, and privacy-first product analytics you fully control.

View details
83
Repo Health
74
Technical
64
Dependency
Built with
TypeScript 91%
Updated 1 weeks ago
TypeScript
85%
MIT

openwork

AI Assistants · Automation

24,237

OpenWork is a free, open-source desktop app for running AI agent workflows on your own files with 50+ LLMs, extensible skills, and MCP server support — the open-source alternative to Claude Cowork and Codex.

View details
87
Repo Health
89
Technical
67
Dependency
Built with
TypeScript 85%
Updated 6 days ago
Vue
41%
AGPL 3.0

Operational

Analytics · Automation · Monitoring

474

Open-source event tracker with real-time push notifications and action buttons for tech founders.

View details
54
Repo Health
68
Technical
68
Dependency
Built with
Vue 41%
JavaScript 39%
MDX 13%
Updated 4 weeks ago
TypeScript
99%
Other

Papermark

Digital Signiture · File Storage

9,263

Open-source DocSend alternative with page-by-page analytics, secure data rooms, and custom domains for document sharing.

View details
78
Repo Health
63
Technical
66
Dependency
Built with
TypeScript 99%
Updated 2 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers