Skip to main content
Official ReallyQuickEmails SDK for Node.js / TypeScript. It covers all 5 modules: emails, leads, automations, events, and senders.
Works in any runtime with native fetch: Node.js 18+, Bun, Deno, Cloudflare Workers, Vercel Edge. It does NOT run in the browser: the constructor throws an error if it detects window, to avoid exposing the API key in the client bundle.

Installation

Quickstart

1

Get an API key

Generate a key in Settings → Integrations → API Keys. To get started, use a Test key (sk_test_*): it sends real emails without polluting your production metrics. See API Keys.
2

Initialize the client

If you omit apiKey, the SDK reads process.env.RQE_API_KEY. To point to another backend (staging, self-hosted), pass baseUrl or set RQE_BASE_URL:
3

Send your first email

The sender must be verified in your project. See domains.

Error handling

Each method returns { data, error, headers }. Always check error before using datadata is null when there’s an error.

Modules

emails — transactional + broadcast

leads — contact management

automations — trigger flows

events — custom tracking

senders — list / verify senders (v0.1.1+)

Discover which senders are verified, verify new ones via magic link, and check a sender’s status.
This module requires projectId in the constructor (or the RQE_PROJECT_ID env). Find it in the dashboard URL: app.reallyquickemails.com/projects/<projectId>/.... The other modules (emails, leads, automations, events) don’t need this parameter.
Typical use cases:
  • Multi-tenant — list the active project’s senders and choose based on the client
  • Failover — if a sender fails DKIM/DMARC, automatically fall back to another verified one
  • Onboarding wizard — UI shows available senders for the client to choose from
  • Health check — periodic polling of status to detect failed senders

Idempotency

For safe retries (network timeouts, Lambda retries), pass idempotencyKey on write operations. Currently supported on emails.send and emails.sendBatch.
The backend caches the response for 24h for the (project_id, idempotencyKey) pair. A second call with the same key returns the cached response without re-processing and adds the Idempotency-Replayed: true header.
More on the backend’s behavior in API Keys → Idempotency.

Runtime compatibility

Configuration

Support