# Resend — Modern Email API for Developers
> Developer-first email API with React Email templates, webhooks, and deliverability built-in. Send transactional emails with beautiful templates in 3 lines of code. By the creator of Novu. 15,000+ stars.
## Install
Save as a script file and run:
## Quick Use
```bash
npm install resend
```
```typescript
import { Resend } from "resend";
const resend = new Resend("re_your_api_key");
await resend.emails.send({
from: "you@yourdomain.com",
to: "user@example.com",
subject: "Welcome!",
html: "
Welcome to our app!
",
});
```
Get your free API key at [resend.com](https://resend.com).
---
## Intro
Resend is a modern email API built for developers with 15,000+ GitHub stars. It combines simple sending APIs, React Email templates (build emails like React components), webhooks for delivery tracking, and built-in deliverability monitoring. Send transactional emails in 3 lines of code without dealing with SMTP, SPF, DKIM, or email rendering quirks. Best for developers building web apps who need reliable email delivery with beautiful templates. Works with: any language (REST API), TypeScript/Python/Go/Ruby SDKs. Setup time: under 3 minutes.
---
## Why Resend Over SendGrid/SES
| Feature | Resend | SendGrid | AWS SES |
|---------|--------|----------|---------|
| Setup time | 3 minutes | 30 minutes | 1 hour |
| Template system | React Email | Handlebars | Raw HTML |
| Dashboard | Beautiful, real-time | Cluttered | Minimal |
| Free tier | 3,000 emails/month | 100/day | 62,000/month |
| Developer experience | Excellent | OK | Poor |
### React Email Templates
```tsx
// emails/welcome.tsx
import { Html, Head, Body, Container, Text, Button } from "@react-email/components";
export default function WelcomeEmail({ name }: { name: string }) {
return (
Hi {name}, welcome to our platform!
);
}
```
```typescript
import WelcomeEmail from "./emails/welcome";
await resend.emails.send({
from: "hello@example.com",
to: "user@example.com",
subject: "Welcome!",
react: WelcomeEmail({ name: "Alice" }),
});
```
### Webhooks
```typescript
// Track delivery events
app.post("/webhooks/resend", (req, res) => {
const { type, data } = req.body;
// type: "email.delivered" | "email.bounced" | "email.opened" | "email.clicked"
console.log(`Email ${data.email_id}: ${type}`);
});
```
### Multi-Language SDKs
```python
# Python
from resend import Resend
client = Resend(api_key="re_...")
client.emails.send({"from": "...", "to": "...", "subject": "...", "html": "..."})
```
```go
// Go
client := resend.NewClient("re_...")
client.Emails.Send(&resend.SendEmailRequest{From: "...", To: []string{"..."}, Subject: "...", Html: "..."})
```
### Key Stats
- 15,000+ GitHub stars
- React Email templates
- 3,000 free emails/month
- Webhooks for delivery tracking
- TypeScript, Python, Go, Ruby SDKs
### FAQ
**Q: What is Resend?**
A: A modern email API with React Email templates, delivery webhooks, and developer-first design. Send transactional emails in 3 lines of code.
**Q: Is Resend free?**
A: Free tier: 3,000 emails/month, 1 domain. Pro plans from $20/month.
**Q: Can I use Resend without React?**
A: Yes, pass raw HTML or plain text. React Email is optional.
---
## Source & Thanks
> Created by [Resend](https://github.com/resend). Licensed under MIT.
>
> [resend](https://github.com/resend/resend-node) — stars 15,000+
Thanks for making email actually pleasant to work with.
---
## 快速使用
```bash
npm install resend
```
```typescript
import { Resend } from "resend";
const resend = new Resend("re_your_key");
await resend.emails.send({ from: "you@domain.com", to: "user@example.com", subject: "Welcome!", html: "