Quickstart

Send your first email in five minutes: create an account and API key, test with the shared sender, then verify your own domain.

This takes about five minutes. You'll send a test email right away, then set up your own domain so you can email anyone.

1. Create an account

Sign up at delivrie.io/signup. The Free plan includes 4,000 emails a month (up to 133 a day), so you don't need a card.

2. Create an API key

Open API keys in the dashboard and click Create API key.

Keys start with dlv_ and are shown once. Store the key in an environment variable, never in your code:

DELIVRIE_API_KEY=dlv_your_key

3. Send a test email

You can send before you verify a domain. Use the shared sender onboarding@delivrie.io as the from address, and send to either:

cURL

curl -X POST https://delivrie.io/api/emails \
  -H "Authorization: Bearer $DELIVRIE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: quickstart-1" \
  -d '{
    "from": "Acme <onboarding@delivrie.io>",
    "to": "delivered@test.delivrie.io",
    "subject": "My first Delivrie email",
    "html": "<h1>It works</h1><p>Sent with Delivrie.</p>"
  }'

Node.js

// npm install delivrie
import { Delivrie } from "delivrie";

const delivrie = new Delivrie(process.env.DELIVRIE_API_KEY);

const { data, error } = await delivrie.emails.send(
  {
    from: "Acme <onboarding@delivrie.io>",
    to: "delivered@test.delivrie.io",
    subject: "My first Delivrie email",
    html: "<h1>It works</h1><p>Sent with Delivrie.</p>",
  },
  { idempotencyKey: "quickstart-1" },
);

if (error) throw new Error(`${error.name}: ${error.message}`);
console.log("Sent", data.id);

Python

import os, requests

res = requests.post(
    "https://delivrie.io/api/emails",
    headers={
        "Authorization": f"Bearer {os.environ['DELIVRIE_API_KEY']}",
        "Idempotency-Key": "quickstart-1",
    },
    json={
        "from": "Acme <onboarding@delivrie.io>",
        "to": "delivered@test.delivrie.io",
        "subject": "My first Delivrie email",
        "html": "<h1>It works</h1><p>Sent with Delivrie.</p>",
    },
)
res.raise_for_status()
print("Sent", res.json()["id"])

A successful send returns 200 with { "id": "..." }. Open Emails in the dashboard to watch it move from queued to sent to delivered.

Note If you get 422 validation_error, read the message. It says exactly what's wrong, for example a missing field or a from domain that isn't verified yet.

4. Verify your domain

To send to anyone, add a domain you own.

  1. Open Domains and add a subdomain such as mail.acme.com. A subdomain keeps your main domain's reputation separate from your app's email.
  2. Add the DNS records Delivrie shows you at your DNS provider: a DKIM TXT record, and an MX and TXT record on the send subdomain for SPF and bounces.
  3. Click Verify DNS records. Most providers update within minutes.

Then send from any address on that domain, like orders@mail.acme.com, to anyone. Domains and DNS explains each record, and Why isn't my domain verifying? covers the usual fixes.

5. Next steps

More guides