Delivery Status Notifications (DSN) & footers

Ask for Delivery Status Notifications with the dsn object, and append a consistent footer to every message with the footer object. Both are part of the same POST /transactional-email payload.

📘

Prerequisite

This builds on Send your first email (HTTP API). You need a Bearer token and a verified authorized sender.

Footer

footer appends content to the bottom of your message. Provide html, text, or both — Routee adds the matching part to the HTML and plain-text bodies.

"footer": {
  "html": "<p style=\"color:#888;font-size:12px\">Acme Inc · 123 Main St · <a href=\"https://yourdomain.com/unsubscribe\">Unsubscribe</a></p>",
  "text": "Acme Inc · 123 Main St · Unsubscribe: https://yourdomain.com/unsubscribe"
}

DSN

A Delivery Status Notification is a standard delivery report (RFC 3461). Use the dsn object to control which outcomes you are notified about.

FieldDescription
notifyComma-separated list of FAILURE, DELAY, SUCCESS, or NEVER.
orcptOriginal recipient email address, echoed back in the notification.
envidOptional envelope identifier you can use to correlate the notification.

Use NEVER on its own to suppress notifications. Otherwise combine the events you care about, for example FAILURE,DELAY.

Full example

curl -X POST 'https://connect.routee.net/transactional-email' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "from": { "name": "Acme", "address": "[email protected]" },
    "to": [{ "address": "[email protected]" }],
    "subject": "Your receipt",
    "content": { "html": "<p>Thanks for your purchase.</p>" },
    "footer": {
      "html": "<p style=\"color:#888;font-size:12px\">Acme Inc · 123 Main St</p>",
      "text": "Acme Inc · 123 Main St"
    },
    "dsn": {
      "notify": "FAILURE,DELAY",
      "orcpt": "[email protected]",
      "envid": "order-8842"
    }
  }'
import requests

payload = {
    "from": {"name": "Acme", "address": "[email protected]"},
    "to": [{"address": "[email protected]"}],
    "subject": "Your receipt",
    "content": {"html": "<p>Thanks for your purchase.</p>"},
    "footer": {
        "html": '<p style="color:#888;font-size:12px">Acme Inc · 123 Main St</p>',
        "text": "Acme Inc · 123 Main St",
    },
    "dsn": {"notify": "FAILURE,DELAY", "orcpt": "[email protected]", "envid": "order-8842"},
}

resp = requests.post(
    "https://connect.routee.net/transactional-email",
    headers={"Authorization": "Bearer YOUR_ACCESS_TOKEN", "Content-Type": "application/json"},
    json=payload,
)
print(resp.status_code, resp.json())
👍

DSN vs. callbacks

DSNs are standard delivery reports at the mail-transport level. For real-time status transitions plus open and click events delivered to your own endpoints, use callbacks instead — or use both together.

Field reference

Next steps