@rule/sdk
v0.4.0-beta.9
Published
TypeScript SDK for Rule.io email marketing API with RCML template builders — meta-package re-exporting @rule/rcml and @rule/client.
Downloads
454
Readme
@rule/sdk
The official TypeScript SDK for the Rule.io email marketing API. Build and send email campaigns, set up tag-triggered automations, manage subscribers, and compose RCML templates — all from code.
Full TypeScript types | Node.js >= 20
Installation
npm install @rule/sdkQuick Start
import { RuleClient } from '@rule/sdk';
const client = new RuleClient({ apiKey: process.env.RULE_API_KEY! });
await client.subscribers.create({
email: '[email protected]',
status: 'ACTIVE',
});
await client.subscribers.addSubscriberTag(
{ email: '[email protected]' },
'order-confirmed',
);Get your API key from Rule.io Settings → API.
Documentation
Full guides and API reference: see the published documentation site.
License
MIT
