Skip to the documentation
SDK

SDK

A typed TypeScript client for the OpenEmail API. Zero dependencies, and one method for every endpoint.

What it is

One package over the whole API (sending, templates, tracking, threads, drafts, labels, contacts, audiences, domains, rules, webhooks, calendar, settings, roles, members and disposable inboxes) with types for every request and response, two error classes, retries that cannot duplicate a send, and a webhook signature verifier. No runtime dependencies, ESM and CommonJS, on Node 20+, Bun, Deno and Cloudflare Workers. It carries a workspace key, so it runs on a server, and disposable inboxes are the one part that also runs in a browser.

pnpm add @openemail/sdk
send-email.ts
import { init, openemail } from '@openemail/sdk' init({ apiKey: process.env.OPENEMAIL_API_KEY }) await openemail.emails.send({  from: 'Acme Billing <[email protected]>',  to: '[email protected]',  subject: 'Your September invoice',  html: '<p>Invoice attached.</p>',})

Where to go

It wraps the API on the tab before this one

Everything here is the same surface the API reference documents, so read that for what an endpoint does and this for how to call it. There is one method for every documented operation, and the package's parity check reads the OpenAPI document to prove it.