Email SDK
Adapters

Iterable

Configure the Iterable target email adapter.

Iterable logo
Iterable
@opencoredev/email-sdk/iterable
OfficialNot API testedRequest tested
Open website

Iterable target sends require a campaign ID. Email SDK sends one recipient to Iterable's /api/email/target endpoint and maps the normalized subject/body fields into dataFields for the campaign template.

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

const email = createEmailClient({
  adapters: [
    iterable({
      apiKey: process.env.ITERABLE_API_KEY!,
      campaignId: Number(process.env.ITERABLE_CAMPAIGN_ID!),
    }),
  ],
});

Options

OptionTypeRequiredNotes
apiKeystringYesIterable API key.
campaignIdnumberYesIterable campaign ID.
allowRepeatMarketingSendsbooleanNoSent to Iterable when provided.
dataFieldsRecord<string, unknown> | (message) => Record<string, unknown>NoExtra fields to merge into the campaign email.
sendAtstringNoUTC timestamp in Iterable's expected format.
baseUrlstringNoDefaults to https://api.iterable.com.
fetchtypeof fetchNoUseful for tests or custom runtimes.

Iterable target sends support one recipient and metadata for webhook callbacks. The adapter maps subject, html, text, and from into dataFields, and merges any configured dataFields before those normalized fields. Unsupported fields throw before the API call.

On this page