---
title: Quickstart · Next.js
description: Send transactional email with Envimaily in Next.js. Copy-paste HTTP example.
locale: en
---

# Quickstart · Next.js

Send transactional email through Envimaily's HTTP API (`https://api.envimaily.com`) with **Next.js**.

## 1. Account & key

1. Sign up at [https://app.envimaily.com/dev/signup](https://app.envimaily.com/dev/signup)
2. Create an `em_` key under **API keys**
3. Copy the token once — it is not shown again

## 2. Example

```ts
// app/api/send/route.ts
import { NextResponse } from 'next/server';

export async function POST() {
  const res = await fetch('https://api.envimaily.com/v1/emails', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.ENVIMAILY_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      from: 'onboarding@envimaily.com',
      to: ['you@example.com'],
      subject: 'Hello from Next.js',
      html: '<p>Sent from a Route Handler.</p>',
    }),
  });
  return NextResponse.json(await res.json(), { status: res.status });
}
```

## 3. Without a verified domain

Use the shared test sender `onboarding@envimaily.com` and send only to the account owner email. After SPF/DKIM verification, send from your domain.

## 4. Limits

| Plan | Month | Day |
|------|-------|-----|
| Dev Free | 1,000 | 100 |
| Dev Pro | 50,000 | 5,000 |

Next: [Domains & DNS](/docs/domains) · [Emails API](/docs/api/emails) · [Migrate from Resend](/docs/migrate/resend)
