Docs navigationBrowse documentation216
OverviewStart here

OpenSend docs

Examples

Example application patterns for OpenSend. Start with the SDK or framework guide that matches your runtime, then adapt the sender domain, base URL, and secret storage to your deployment.

Raw markdown

Published npm package

  • Send one email with opensend: minimal Node/Bun example that installs the published npm package, reads local environment variables, and sends one test email.

SDK quickstarts

Framework quickstarts

Runtime and deployment quickstarts

When to use each sending surface

SurfaceUse it whenAvoid it when
SDK / REST /emailsTransactional mail such as signups, receipts, invites, passwordless auth, alertsYou need to send one campaign to a large audience
/emails/batchYou have a small set of transactional messages to queue togetherYou need segmentation, unsubscribe topics, or campaign reporting
BroadcastsYou are sending campaign or lifecycle mail to contacts/segmentsYou need a one-off transactional response inside a request
SMTP relayA legacy app only supports SMTPYou need templates, scheduling, or direct API response details

Environment checklist

Every example expects:

bash
OPENSEND_API_KEY=os_your_api_key
# Optional for self-hosted deployments:
OPENSEND_BASE_URL=https://opensend.namuh.co

Use a verified sending domain before production sends. Use idempotency keys for flows that can retry.