
Resend
Run a local Resend-compatible email API so you can build and test transactional mail, magic links, and inbox flows without sending real messages or burning production quota.
Install
npx skills add https://github.com/vercel-labs/emulate --skill resendWhat is this skill?
- Stateful in-memory Resend emulation: emails, domains, API keys, audiences, and contacts persist across requests
- POST /emails is captured only—no real delivery; inspect via REST or browser inbox UI
- Starts with npx emulate --service resend or createEmulator({ service: 'resend' }) on port 4000 by default
- Accepts any re_-prefixed Bearer token for Authorization parity with production SDKs
- Triggers on magic link, verification email, local inbox, and RESEND_BASE_URL configuration tasks
Adoption & trust: 111 installs on skills.sh; 1.3k GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Journey fit
Email provider wiring is canonical on the Build shelf under integrations—the skill targets RESEND_BASE_URL-style local hooks while features are being implemented. Resend client setup, webhooks, and auth email paths are third-party API integration work, not launch SEO or ops monitoring.
Common Questions / FAQ
Is Resend safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Resend
# Resend Email API Emulator Fully stateful Resend API emulation. Emails, domains, API keys, audiences, and contacts persist in memory. Sent emails are captured and viewable through the inbox UI or the REST API. No real emails are sent. Every call to `POST /emails` stores the message locally so you can inspect it programmatically or in the browser. ## Start ```bash # Resend only npx emulate --service resend # Default port (when run alone) # http://localhost:4000 ``` Or programmatically: ```typescript import { createEmulator } from 'emulate' const resend = await createEmulator({ service: 'resend', port: 4000 }) // resend.url === 'http://localhost:4000' ``` ## Auth Pass tokens as `Authorization: Bearer <token>`. Any `re_` prefixed token is accepted. ```bash curl http://localhost:4000/emails \ -H "Authorization: Bearer re_test_key" ``` When no token is provided, requests fall back to the default user. ## Pointing Your App at the Emulator ### Environment Variable (Resend SDK) The official Resend Node.js SDK reads `RESEND_BASE_URL` at module load time. Set it to the emulator URL and the SDK works without any code changes: ```bash RESEND_BASE_URL=http://localhost:4000 ``` ```typescript import { Resend } from 'resend' // No baseUrl argument needed; the SDK reads RESEND_BASE_URL automatically. const resend = new Resend('re_test_key') await resend.emails.send({ from: 'hello@example.com', to: 'user@example.com', subject: 'Hello', html: '<p>It works!</p>', }) ``` ### Embedded in Next.js (adapter-next) When using `@emulators/adapter-next`, the emulator runs inside your Next.js app at `/emulate/resend`. Set `RESEND_BASE_URL` via `next.config.ts`: ```typescript // next.config.ts import { withEmulate } from '@emulators/adapter-next' export default withEmulate({ env: { RESEND_BASE_URL: `http://localhost:${process.env.PORT ?? '3000'}/emulate/resend`, }, }) ``` ```typescript // app/emulate/[...path]/route.ts import { createEmulateHandler } from '@emulators/adapter-next' import * as resend from '@emulators/resend' export const { GET, POST, PUT, PATCH, DELETE } = createEmulateHandler({ services: { resend: { emulator: resend, seed: { domains: [{ name: 'example.com' }], }, }, }, }) ``` ### Direct fetch If you cannot use the SDK or env var, call the emulator directly: ```typescript await fetch('http://localhost:4000/emails', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer re_test_key', }, body: JSON.stringify({ from: 'hello@example.com', to: 'user@example.com', subject: 'Hello', html: '<p>It works!</p>', }), }) ``` ## Seed Config ```yaml resend: domains: - name: example.com region: us-east-1 contacts: - email: test@example.com first_name: Test last_name: User audience: Default ``` ## Retrieving Sent Emails This is the key differentiator of the emulator: every email sent via `POST /emails` is stored and queryable. ### Inbox UI Browse sent emails in the browser: ``` http://localhost:4000/inbox ``` ### REST API ```bash # List all sent emails curl http://localhost:4000/emails \ -H "Authorization: Bearer re_test_key" # Get a single email by ID curl http://localhost:4000/emails/<id> \ -H "Authorization: Bearer re_test_key" ``` ### Extracting Data from Emails (tes