wirl
v0.1.1
Published
Wirl SDK for email sequence automation
Maintainers
Readme
Wirl
Email sequence automation for developers.
Installation
npm install wirlQuick Start
import Wirl from 'wirl';
const wirl = new Wirl({
apiKey: 'sk_test_...',
baseUrl: 'https://your-wirl-instance.vercel.app'
});
// Track events
await wirl.track({
email: '[email protected]',
event: 'user.signup',
properties: { plan: 'pro' }
});
// Update contact properties
await wirl.identify({
email: '[email protected]',
properties: {
name: 'John Doe',
company: 'Acme Inc'
}
});
// Manually trigger a sequence
await wirl.trigger({
email: '[email protected]',
sequence: 'Welcome Sequence'
});
// Remove from a sequence
await wirl.exit({
email: '[email protected]',
sequence: 'Welcome Sequence'
});API
new Wirl(options)
| Option | Type | Required | Description |
|--------|------|----------|-------------|
| apiKey | string | Yes | Your Wirl API key |
| baseUrl | string | No | API base URL (default: https://api.wirl.dev) |
wirl.track(params)
Track an event for a contact. Creates the contact if they don't exist.
await wirl.track({
email: '[email protected]',
event: 'purchase.completed',
properties: { amount: 99.99 }
});wirl.identify(params)
Create or update a contact with properties.
await wirl.identify({
email: '[email protected]',
properties: { name: 'John', plan: 'enterprise' }
});wirl.trigger(params)
Manually enroll a contact in a sequence.
await wirl.trigger({
email: '[email protected]',
sequence: 'Onboarding'
});wirl.exit(params)
Remove a contact from an active sequence.
await wirl.exit({
email: '[email protected]',
sequence: 'Onboarding'
});License
MIT
