Skip to content
Simple Bash SDK for the MailerLite API https://developers.mailerlite.com/v2/reference
Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
.gitignore
LICENSE
README.md
mlite-account
mlite-campaign
mlite-group
mlite-subscriber

README.md

MailerLite Bash Integration

Just because!

Getting Started

Create a new config.sh file containing the API version URL and API key.

#!/usr/bin/env bash

# Store config secrets like API key and URI.
export mlite_api_uri="http://api.mailerlite.com/api/v2/";
export mlite_api_key="bla_key_stuff";

Authentication

Run ./mlite-account to verify your API key.

Groups

Query Group(s)

./mlite-group --get
./mlite-group --get --id 12345

Create Group

./mlite-group --new --name "A bunch of folks who signed up from the website."

Update Group Name

./mlite-group --update --name "Website newsletter signups"

Delete Group

./mlite-group --group --id 12345

Subscribers

Create Subscriber

./mlite-subscriber --new --name Mike --email xxx@gmail.com

Update Subscriber

./mlite-subscriber --update --name "Michael Born" --email xyz@gmail.com --id 2328

Campaigns

Get Campaigns By Status

./mlite-campaign --get --status sent
./mlite-campaign --get --status draft

Create Campaign

./mlite-campaign --new --subject "March Newsletter"

Create Campaign Email

./mlite-campaign --email < "My HTML text here"

Send Campaign Email

./mlite-campaign --action send
You can’t perform that action at this time.