InTouch Hub · Blue Isle Software

MailerLite

MailerLite API — manage subscribers, assign them to groups, create groups, and list email campaigns.

MailerLite

Manage your MailerLite subscribers, groups, and email campaigns directly from an InTouch job or the AI assistant.

This tool talks to the official MailerLite API (https://connect.mailerlite.com/api) using standard-library Python only — no external dependencies.

What it does

Operations

operation API call Required params
list-subscribers GET /subscribers
get-contact GET /subscribers/{id-or-email} subscriberId or email
create-contact POST /subscribers email
list-groups GET /groups
create-group POST /groups groupName
assign-to-group POST /subscribers/{id-or-email}/groups/{group_id} (subscriberId/email) + groupId
list-campaigns GET /campaigns

Parameters

param description
apiKey MailerLite API token (required). Sent as Authorization: Bearer <token>.
operation One of the operations above (required).
email Contact email — required for create-contact; lookup key elsewhere.
subscriberId Contact id — alternative lookup key for get-contact/assign-to-group.
groupId Group id — required for assign-to-group.
groupName Group name (max 255 chars) — required for create-group.
fields JSON object of contact field values for create-contact, e.g. {"name":"Jane"}.
status Contact status for create-contact: active, unsubscribed, unconfirmed, bounced, junk.
filterStatus Status filter for list-subscribers (same values as status).
limit Max records for list operations (1–100, default 25).

API key setup

  1. Sign in to your MailerLite dashboard.
  2. Go to Integrations > API (or API under your account settings).
  3. Generate a new token and copy it.
  4. Pass that token as the apiKey input.

The token is sent as Authorization: Bearer <token>. A single token is all that is required — there is no OAuth/JWT exchange.

Output

Every call returns:

The tool never throws on a non-2xx API response; it returns the status and the error body so the caller can decide how to handle it. Only transport-level failures (DNS, connection refused, timeout) cause the step to fail.

Examples

List the first 50 active subscribers:

operation:     list-subscribers
filterStatus:  active
limit:         50

Create (or upsert) a contact with custom fields:

operation:  create-contact
email:      [email protected]
fields:     {"name":"Jane","company":"Acme"}
status:     active

Create a group:

operation:  create-group
groupName:  VIP Customers

Assign a contact to a group:

operation:  assign-to-group
email:      [email protected]
groupId:    123456789

List recent campaigns:

operation:  list-campaigns
limit:      10