MCP-native for Cursor, Claude Code, and Windsurf
Integration · Vercel

Posthawk on
Vercel.

A one-click Deploy to Vercel template gets you a working Next.js 16 App Router project with a form, an API route, a React Email template, and live transactional email delivery — in under 90 seconds. No SaaS dashboards to manage, no copy-paste setup.

~90 seconds from click to first email · Free for 3,000 emails / month
What you ship

A Next.js API route
that just works.

The starter exports one API route. POST { email, name } from anywhere — your form, a webhook handler, an LLM tool call — and Posthawk renders the React Email template and ships the message.

The same SDK call works in Node and Edge runtimes. Switch with a one-line export const runtime = 'edge'.

app/api/welcome/route.ts
// app/api/welcome/route.ts
import { Posthawk } from 'posthawk';
import { WelcomeEmail } from '@/emails/welcome';

// Optional: pin this route to Vercel's Edge runtime.
// The Posthawk SDK works in both Node and Edge.
// export const runtime = 'edge';

const posthawk = new Posthawk(process.env.POSTHAWK_API_KEY!);

export async function POST(req: Request) {
  const { email, name } = await req.json();

  const { data, error } = await posthawk.emails.send({
    from: process.env.POSTHAWK_FROM_EMAIL!,
    to: email,
    subject: `Welcome, ${name}!`,
    react: <WelcomeEmail name={name} />,
  });

  if (error) return Response.json({ error }, { status: 400 });
  return Response.json({ id: data.id });
}
How it works

90 seconds from
button to inbox.

01

Click Deploy to Vercel

Vercel forks the posthawk-dev/nextjs-starter template into your GitHub account and walks you through a setup screen.

02

Paste your API key

Vercel prompts for POSTHAWK_API_KEY and POSTHAWK_FROM_EMAIL. The setup screen links straight to where you create the key in your Posthawk dashboard.

03

Send from any route

Vercel deploys to your *.vercel.app subdomain. Open it, fill in the form, click send — a real email lands in the recipient inbox within ~5 seconds.

Works in Node AND Edge runtimes

The SDK is fetch-based with zero Node-only dependencies. Export `runtime = "edge"` in any API route to opt in — no rewrite, no second package.

React Email built in

Pass a `react` prop to `posthawk.emails.send()` and the SDK renders the component to HTML server-side. The starter ships with a working WelcomeEmail.tsx.

Preview deployments included

Every Vercel preview gets its own working email endpoint with your env vars wired in. Test the welcome flow on a PR branch before merging.

Stable error envelope

The SDK unwraps every response into { data, error }. error.requestId lets you trace any failure across Posthawk's logs in one search.

Ship your first transactional email in 90 seconds.

Click the button, paste your API key, deploy. The starter handles the rest.

Cookie Preferences

I use analytics cookies to understand how you use the site and improve your experience. Privacy Policy