DEV Community

Alex Spinov
Alex Spinov

Posted on

Resend Has a Free Email API That Developers Actually Love

Resend is an email API built for developers. Send transactional emails with a clean REST API and React Email templates — no SMTP configuration needed.

Send an Email

import { Resend } from 'resend';

const resend = new Resend('re_123456789');

const { data, error } = await resend.emails.send({
  from: 'hello@yourdomain.com',
  to: 'user@example.com',
  subject: 'Welcome!',
  html: '<h1>Welcome aboard!</h1><p>Thanks for signing up.</p>'
});
Enter fullscreen mode Exit fullscreen mode

With React Email Templates

import { render } from '@react-email/render';
import { WelcomeEmail } from './emails/welcome';

const html = render(<WelcomeEmail name="Alice" />);

await resend.emails.send({
  from: 'hello@yourdomain.com',
  to: 'alice@example.com',
  subject: 'Welcome, Alice!',
  html
});
Enter fullscreen mode Exit fullscreen mode

React Email Component

// emails/welcome.tsx
import { Html, Head, Body, Container, Heading, Text, Button } from '@react-email/components';

export function WelcomeEmail({ name }: { name: string }) {
  return (
    <Html>
      <Head />
      <Body style={{ fontFamily: 'sans-serif' }}>
        <Container>
          <Heading>Welcome, {name}!</Heading>
          <Text>We are excited to have you on board.</Text>
          <Button href="https://myapp.com/dashboard"
            style={{ background: '#000', color: '#fff', padding: '12px 24px' }}>
            Go to Dashboard
          </Button>
        </Container>
      </Body>
    </Html>
  );
}
Enter fullscreen mode Exit fullscreen mode

REST API

curl -X POST https://api.resend.com/emails \
  -H "Authorization: Bearer re_123" \
  -H "Content-Type: application/json" \
  -d '{"from":"hello@yourdomain.com","to":"user@example.com","subject":"Test","html":"<p>Hello!</p>"}'
Enter fullscreen mode Exit fullscreen mode

Batch Send

const { data } = await resend.batch.send([
  { from: 'hi@app.com', to: 'user1@ex.com', subject: 'Hi', html: '<p>Hello 1</p>' },
  { from: 'hi@app.com', to: 'user2@ex.com', subject: 'Hi', html: '<p>Hello 2</p>' }
]);
Enter fullscreen mode Exit fullscreen mode

Why This Matters

  • Developer-first: Clean API, great DX, React templates
  • Free tier: 3,000 emails/month, 100/day
  • High deliverability: Built on AWS SES infrastructure
  • Webhooks: Track opens, clicks, bounces

Need custom email automation or notification systems? I build developer tools. Check out my web scraping actors on Apify or reach out at spinov001@gmail.com for custom solutions.

Top comments (0)