Coming from Resend
Herald serves Resend’s sending routes, takes the same request shapes, and answers with the same error names, so most apps move by changing one setting.
Keep Resend’s SDK
Point it at Herald and give it a Herald key:
RESEND_BASE_URL=https://api.heraldmail.dev
RESEND_API_KEY=hrld_live_…resend.emails.send(), resend.batch.send() and resend.emails.get() work unchanged. Errors come back with Resend’s name, statusCode and message.
Or switch to Herald’s SDK
npm install @heraldmail/sdk// before
import { Resend } from 'resend'
const resend = new Resend(process.env.RESEND_API_KEY)
await resend.emails.send({ from, to, subject, react: <Welcome /> })
// after
import { Herald } from '@heraldmail/sdk'
const herald = new Herald(process.env.HERALD_API_KEY)
await herald.emails.send({ from, to, subject, react: <Welcome /> })It answers { data, error } the same way, accepts Resend’s replyTo and scheduledAt as well as the API’s own reply_to and scheduled_at, and covers everything else Herald does: idempotency keys, templates, contacts, broadcasts, automations and inbound mail.
What’s different
Domains. Herald asks for its own records: a DKIM key at herald._domainkey, and a return path on send.<your domain> (an MX and an SPF record), which leaves your root SPF record alone. Add the domain in Console and follow the DNS guide.
Webhooks. Herald signs with Standard Webhooks, and sends the same values under Svix’s svix-* header names too, so a receiver that verifies Resend’s webhooks verifies Herald’s unchanged, with Herald’s whsec_ secret. The payloads have Resend’s shape: type, created_at and data.email_id. See Webhooks.
Two lanes. Marketing email goes as a Proclamation: add stream: "marketing" to a send, or send a broadcast. Proclamations carry one-click unsubscribe, and stop for anyone who’s unsubscribed.
Test keys. hrld_test_… keys never send to anyone: their mail lands in Console’s Test inbox.
Audiences. Herald’s contacts belong to a project, not to an audience: one contact can be in many lists, choose their topics, and match segments. Broadcasts go to a list or a segment, about a topic.