pennypost
v0.2.1
Published
Official Node.js SDK for PennyPost, the affordable email API. Zero dependencies, fully typed.
Maintainers
Readme
pennypost
Official Node.js SDK for PennyPost, the affordable email API. Zero dependencies. Fully typed. Node 18+.
npm install pennypostimport { PennyPost } from "pennypost";
const pp = new PennyPost("pp_live_<secret>");
const { accepted } = await pp.emails.send({
from: "Receipts <[email protected]>",
to: ["[email protected]"],
subject: "Your order shipped",
text: "Tracking inside.",
});
const email = await pp.emails.get(accepted[0].id); // full event timelineTest keys (pp_test_<secret>) hit the same API, but no email is delivered. Sign up at
app.pennypost.io and you have one in under a minute.
Also included: pp.emails.sendBatch([...]) (up to 100 messages, one
request), cc/bcc on sends, pp.emails.list({ to, domain, key }),
pp.suppressions.list/add/remove, the full Marketing Emails surface
(pp.audiences, pp.contacts with custom properties, pp.broadcasts with
markdown drafts, send-time filters, and sendTest), per-send
idempotencyKey, and typed errors (PennyPostError with code, status,
param, retryable).
Docs: pennypost.io/docs
