Quickstart
Send your first email in under a minute. One command, no pasted API keys.
The fastest start
Run this in your project root. It detects your framework, opens your browser to authorize, writes SEND16_API_KEY, and drops a working example for your stack.
npx create-send16Uses RFC 8628 device-code authorization, the same flow as gh auth login. No passwords or pasted secrets.
Manual setup
If you’d rather wire things up yourself, install the SDK and use the snippets below for your framework.
1. Install the SDK
npm install send16-mail2. Create an API key
Open the dashboard → Developers → API Keys → Create key. Set SEND16_API_KEY in your environment (typically .env.local).
3. Pick your framework
import { Send16 } from 'send16-mail';
// Reads SEND16_API_KEY from process.env automatically.
export const send16 = new Send16();import { send16 } from '@/lib/send16';
import { NextResponse } from 'next/server';
export const runtime = 'nodejs';
export async function GET() {
const { data, error } = await send16.emails.send({
from: 'Acme <hello@yourdomain.com>',
to: ['you@example.com'],
subject: 'Hello from Send16',
html: '<p>This is your first send.</p>',
});
if (error) return NextResponse.json({ error: error.message }, { status: 500 });
return NextResponse.json({ id: data?.log_id });
}Sending MJML? Pass mjml instead of html and Send16 compiles it server-side. See Send an email or try it live in the playground.
4. Verify a sender domain
You can’t send from arbitrary @yourdomain.com addresses until DKIM/SPF/DMARC are set up. Add your domain at Domains. We work out who hosts your DNS, show the exact steps for that host, and check automatically, usually within minutes. If someone else looks after your website, send them a private link with everything they need.