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.
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.
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
You can send before you verify a domain. Use the shared sender onboarding@delivrie.io as the from address, and send to either:
delivered@test.delivrie.io, bounced@test.delivrie.io and complained@test.delivrie.io. They behave like real inboxes and fire real events. See Test addresses.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 get422 validation_error, read themessage. It says exactly what's wrong, for example a missing field or afromdomain that isn't verified yet.
To send to anyone, add a domain you own.
mail.acme.com. A subdomain keeps your main domain's reputation separate from your app's email.TXT record, and an MX and TXT record on the send subdomain for SPF and bounces.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.