MailerLite Node.js SDK
npm install @mailerlite/mailerlite-nodejs``bash`
npm install @mailerlite/mailerlite-nodejs
`javascript
// For ECMAScript (ESM)
import MailerLite from '@mailerlite/mailerlite-nodejs';
const mailerlite = new MailerLite({
api_key: "API_KEY"
});
`
`javascript
// For CommonJS (CJS)
const MailerLite = require('@mailerlite/mailerlite-nodejs').default;
const mailerlite = new MailerLite({
api_key: "API_KEY"
});
``
- Subscribers
* List all subscribers
* Create/update subscriber
* Update a subscriber
* Fetch a subscriber
* Fetch total subscribers count
* Delete a subscriber
* Forget a subscriber
- Groups
* List all groups
* Create a group
* Update a group
* Delete group
* Get subscribers belonging to a group
* Assign subscriber to a group
* Unassign subscriber from a group
- Segments
* List all segments
* Get subscribers belonging to a segment
* Update segment
* Delete segment
- Fields
* List all fields
* Create a field
* Update a field
* Delete a field
- Automations
* List all automations
* Get an automation
* Get the subscriber activity for an automation
- Campaigns
* Campaign list
* Get a campaign
* Create a campaign
* Update campaign
* Schedule a campaign
* Cancel a ready campaign
* Delete a campaign
- Forms
* List all forms
* Update a form
* Delete a form
- Batching
* Send batch request
- Webhooks
* List all webhooks
* Get a webhook
* Create a webhook
* Update a webhook
* Delete a webhook
- Timezones
* List all timezones
- Campaign languages
* List all languages
- Stats
* Get a list of sent campaigns
* Get stats for a sent campaign
* Get a subscribers of sent campaign
* Get a list of forms by type
* Get forms count by type
* Get subscribers of a form
* List all automations
* Get stats for a specific automation
* Get the subscriber activity for an automation