Email SDK
Adapters

Sequenzy

Configure the Sequenzy transactional email adapter.

Sequenzy logo
Sequenzy
@opencoredev/email-sdk/sequenzy
OfficialSponsorAPI testedRequest tested
Open website

Sequenzy is a sponsor-backed product-led email adapter for transactional sends. It supports direct content, template slugs, metadata variables, one reply-to address, URL attachments, and Base64 attachments, but not CC, BCC, headers, or tags.

Before live sends

Create a Sequenzy API key and verify the sender domain or sender address you plan to use in from. Run the local API auth check before sending from a new environment:

SEQUENZY_API_KEY="seq_live_..." bun run live:sequenzy

That command checks the authenticated account context. It does not send email unless you explicitly set SEQUENZY_LIVE_SEND=true with a test sender and recipient.

Configure

import { createEmailClient } from "@opencoredev/email-sdk";
import { sequenzy } from "@opencoredev/email-sdk/sequenzy";

const email = createEmailClient({
  adapters: [sequenzy({ apiKey: process.env.SEQUENZY_API_KEY! })],
});

Send

const result = await email.send({
  from: "Acme <hello@acme.com>",
  to: [{ email: "user@example.com", name: "Ada" }],
  subject: "Welcome",
  html: "<p>Your workspace is ready.</p>",
  replyTo: "support@acme.com",
  metadata: {
    firstName: "Ada",
    workspaceName: "Acme",
  },
});

console.log(result.provider, result.messageId);

Sequenzy accepts one provider body value. When both html and text are present, the adapter sends html; omit html when the Sequenzy route should send a plain-text body.

Sequenzy maps flat metadata values to variables. Reserved metadata keys are mapped to provider fields instead:

Metadata keySequenzy field
sequenzySlugslug
sequenzyPreviewpreview
subscriberExternalId or sequenzySubscriberExternalIdsubscriberExternalId

Send with a template slug

await email.send({
  from: "Acme <hello@acme.com>",
  to: "user@example.com",
  subject: "Welcome",
  html: "<p>Fallback body for local validation.</p>",
  metadata: {
    sequenzySlug: "welcome-workspace",
    firstName: "Ada",
    workspaceName: "Acme",
  },
});

When metadata.sequenzySlug is present, the adapter sends a Sequenzy template request. The subject, html, and text fields stay useful for local Email SDK validation, but the provider payload uses the template slug and variables. Generic metadata keys like slug and preview remain variables so fallback routes do not accidentally change behavior.

Send with attachments

await email.send({
  from: "Acme <hello@acme.com>",
  to: "user@example.com",
  subject: "Export ready",
  html: "<p>Your export is attached.</p>",
  attachments: [
    {
      filename: "export.txt",
      content: "name,total\nAda,42",
      contentType: "text/plain",
    },
    {
      filename: "invoice.pdf",
      path: "https://cdn.example.com/invoices/inv_123.pdf",
    },
  ],
});

URL attachments are sent as Sequenzy path values. Local file and in-memory attachments are encoded as Base64 content.

Options

OptionTypeRequiredNotes
apiKeystringYesSequenzy API key.
baseUrlstringNoDefaults to https://api.sequenzy.com/api/v1.
fetchtypeof fetchNoUseful for tests or custom runtimes.

Response

The adapter maps Sequenzy jobId to the normalized id and messageId fields, maps returned recipients to accepted, and keeps the provider response in raw.

Field support

Sequenzy maps one or more to recipients, from, subject, HTML/text body, one replyTo, flat metadata variables, template slugs, preview text, subscriber external IDs, and attachments. It rejects CC, BCC, headers, tags, and multiple reply-to addresses before the API call.

Because Sequenzy has one body field, HTML takes priority over text when both content fields are present.

See field support before using Sequenzy in a fallback route.

CLI smoke test

SEQUENZY_API_KEY="seq_live_..." npx --yes --package @opencoredev/email-sdk email-sdk send \
  --adapter sequenzy \
  --from "Acme <hello@acme.com>" \
  --to user@example.com \
  --subject "Sequenzy test" \
  --text "It works"

On this page