Getting started

A quick, practical guide to sending transactional emails with NotifiedBy. You’ll create a sender, generate an API key, and send your first email.

1) Create a sender + API key

  1. Create an account, then go to Senders to create a sender (your “From” identity).
  2. Generate an API key from the sender page.
  3. On the free plan, emails are delivered only to your account email while you integrate.

2) Send your first email (cURL)

Good for quickly proving your sender + key works.

curl -X POST https://api.notifiedby.com/v1/email/send/ \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  --data-urlencode "recipient=you@example.com" \
  --data-urlencode "subject=Hello from NotifiedBy" \
  --data-urlencode "body=<h1>Hello</h1><p>This is an HTML email.</p>" \
  --data-urlencode "plain_body=Hello! This is the plain-text fallback."

Successful responses return JSON like {"id": "ABC123"}.


Code examples

Python and Django are first-class here. Two additional examples are included below.

Python (requests)

import os
import requests

API_KEY = os.environ["NOTIFIEDBY_API_KEY"]

resp = requests.post(
    "https://api.notifiedby.com/v1/email/send/",
    headers={"Authorization": f"Api-Key {API_KEY}"},
    data={
        "recipient": "you@example.com",
        "subject": "Hello from Python",
        "body": "<h1>Hello</h1><p>Sent via requests.</p>",
        "plain_body": "Hello! Sent via requests.",
    },
    timeout=20,
)

print(resp.status_code)
print(resp.text)
Tip: keep your API key in an environment variable like NOTIFIEDBY_API_KEY.

Django

Option A: use the Django email backend integration.

# settings.py
import os

INSTALLED_APPS = [
    # ...
    "notifiedby",
]

EMAIL_BACKEND = "notifiedby.NotifiedByEmailBackend"
NOTIFIEDBY_API_KEY = os.environ["NOTIFIEDBY_API_KEY"]
# anywhere in your Django code
from django.core.mail import send_mail

send_mail(
    subject="Password reset",
    message="Plain text fallback",
    from_email="from@ignored.com",
    recipient_list=["user@example.com"],
    html_message="<h1>Reset your password</h1><p>...</p>",
)
Option B: call the HTTP API directly (same payload as the Python example) if you prefer explicit control.

Node.js (fetch)

const API_KEY = process.env.NOTIFIEDBY_API_KEY;

const body = new URLSearchParams({
  recipient: "you@example.com",
  subject: "Hello from Node.js",
  body: "<h1>Hello</h1><p>Sent via fetch.</p>",
  plain_body: "Hello! Sent via fetch.",
});

const resp = await fetch("https://api.notifiedby.com/v1/email/send/", {
  method: "POST",
  headers: {
    Authorization: `Api-Key ${API_KEY}`,
    "Content-Type": "application/x-www-form-urlencoded",
  },
  body,
});

console.log(resp.status);
console.log(await resp.text());

Ruby (Net::HTTP)

require "uri"
require "net/http"

api_key = ENV.fetch("NOTIFIEDBY_API_KEY")
uri = URI("https://api.notifiedby.com/v1/email/send/")

req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Api-Key #{api_key}"
req.set_form_data({
  "recipient" => "you@example.com",
  "subject" => "Hello from Ruby",
  "body" => "<h1>Hello</h1><p>Sent via Net::HTTP.</p>",
  "plain_body" => "Hello! Sent via Net::HTTP.",
})

resp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(req)
end

puts resp.code
puts resp.body

Next steps