Skip to main content
Get started

Quickstart

From zero to the first delivered email, in any language.

1. Create an API key

In the dashboard, under API keys, create a key with the sending_access scope and keep it in your environment. Scopes and authentication

.env
COFFEEMAIL_API_KEY=cm_live_sua_chave

2. Verify the sender domain

Add the domain and publish the DNS records. Meanwhile, use the sandbox to test. Domain verification guide

3. Install the SDK

Pick the language. All of them have the same surface and the same data-or-error return.

npm install @coffeemail/node

4. Send the email

The email is queued and the response returns the id within milliseconds.

import { CoffeeMail } from '@coffeemail/node'; const coffeemail = new CoffeeMail(process.env.COFFEEMAIL_API_KEY); const { data, error } = await coffeemail.emails.send({  from: 'Acme <pedidos@acme.com.br>',  to: 'ana@exemplo.com.br',  subject: 'Seu pedido #4821 foi enviado',  html: '<p>Chega amanhã.</p>',  idempotencyKey: 'pedido-4821-enviado',});
202 Accepted
{  "id": "8f3a2c1b-4d5e-4f60-9a7b-1c2d3e4f5a6b",  "status": "queued",  "queuedAt": "2026-11-10T17:02:11.204Z"}

5. Track delivery

Receive the events (delivered, opened, bounce) on a signed webhook or read the email events. Webhooks guide