Email SDK
Adapters

Sequenzy

Send through the Sequenzy transactional API with metadata variables, template slugs, and URL or base64 attachments.

The Sequenzy adapter calls Sequenzy's transactional send endpoint over fetch — no extra dependency. Its distinctive feature: reserved metadata keys switch a send from direct content to a Sequenzy template slug, so the same message shape covers both modes.

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

Configure

Create a Sequenzy API key and verify the sender domain or address you plan to use in from.

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

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

Prop

Type

Send

Sequenzy accepts up to 50 recipients and one replyTo per message. Flat metadata values become Sequenzy variables. Sequenzy has a single body field, so when a message carries both html and text, the adapter sends html — omit html to send plain text.

const result = await email.send({
  from: "Acme <hello@acme.com>",
  to: [{ email: "user@example.com", name: "Ada" }],
  replyTo: "support@acme.com",
  subject: "You've been invited to Acme",
  html: "<p>Ada invited you to the Acme workspace.</p>",
  metadata: { inviterName: "Ada", workspaceName: "Acme" },
});

console.log(result.id); // Sequenzy jobId; result.accepted lists the recipients Sequenzy took

Attachments work two ways: an http(s) path is forwarded as a Sequenzy URL attachment; anything else is encoded as base64 content.

Reserved metadata keys map to provider fields instead of variables:

Metadata keySequenzy field
sequenzySlugslug
sequenzyPreviewpreview
subscriberExternalId or sequenzySubscriberExternalIdsubscriberExternalId

When metadata.sequenzySlug is set, the adapter sends a template request: the slug and variables drive rendering, and subject/html/text are left out of the payload (they still satisfy local message validation).

await email.send({
  from: "Acme <hello@acme.com>",
  to: "user@example.com",
  subject: "You've been invited to Acme",
  html: "<p>Fallback body for local validation.</p>",
  metadata: { sequenzySlug: "workspace-invite", inviterName: "Ada" },
});

No cc, bcc, headers, or tags

Sequenzy rejects cc, bcc, headers, and tags with an EmailValidationError before any request — as it does for more than 50 recipients or more than one replyTo. Check field support before using Sequenzy in a fallback route.

Verify from the CLI

SEQUENZY_API_KEY="seq_live_..." npx email-sdk doctor --adapter sequenzy
SEQUENZY_API_KEY="seq_live_..." npx email-sdk send \
  --adapter sequenzy \
  --from "Acme <hello@acme.com>" \
  --to user@example.com \
  --subject "Sequenzy smoke test" \
  --text "It works" \
  --dry-run

Drop --dry-run for one real smoke send — the only check that proves the API key and sender verification are ready.

On this page