Use this pre-built prompt to get started faster.
Prerequisites
Before you start, you’ll need:- A Resend API key
- A verified domain
Guide
Create a Next.js function
Create a route file under
app/api/send/route.ts if you’re using the App Router.route.ts
Send email locally
Run function locally:Open the endpoint URL to send an email:
http://localhost:3000/api/sendExamples
Vercel Functions Example
See the full source code.