KosmoKrator

email

MailerLite CLI for AI Agents

Use the MailerLite CLI from KosmoKrator to call MailerLite tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

8 functions 4 read 4 write API key auth

MailerLite CLI Setup

MailerLite can be configured headlessly with `kosmokrator integrations:configure mailerlite`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure mailerlite --set api_key="$MAILERLITE_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor mailerlite --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key MAILERLITE_API_KEY Secret secret yes API Key

Call MailerLite Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call mailerlite.mailerlite_list_subscribers '{
  "page": 1,
  "limit": 1,
  "status": "example_status"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:mailerlite mailerlite_list_subscribers '{
  "page": 1,
  "limit": 1,
  "status": "example_status"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs mailerlite --json
kosmo integrations:docs mailerlite.mailerlite_list_subscribers --json
kosmo integrations:schema mailerlite.mailerlite_list_subscribers --json
kosmo integrations:search "MailerLite" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to MailerLite.

mailerlite.mailerlite_list_subscribers

Read read

List subscribers from MailerLite. Supports pagination and filtering by status (active, unsubscribed, etc.).

Parameters
page, limit, status

Generic CLI call

kosmo integrations:call mailerlite.mailerlite_list_subscribers '{"page":1,"limit":1,"status":"example_status"}' --json

Provider shortcut

kosmo integrations:mailerlite mailerlite_list_subscribers '{"page":1,"limit":1,"status":"example_status"}' --json

mailerlite.mailerlite_get_subscriber

Read read

Get details for a single MailerLite subscriber by their ID.

Parameters
id

Generic CLI call

kosmo integrations:call mailerlite.mailerlite_get_subscriber '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:mailerlite mailerlite_get_subscriber '{"id":"example_id"}' --json

mailerlite.mailerlite_create_subscriber

Write write

Add a new subscriber to MailerLite. Provide an email address and optionally a name and custom fields.

Parameters
email, name, fields

Generic CLI call

kosmo integrations:call mailerlite.mailerlite_create_subscriber '{"email":"example_email","name":"example_name","fields":"example_fields"}' --json

Provider shortcut

kosmo integrations:mailerlite mailerlite_create_subscriber '{"email":"example_email","name":"example_name","fields":"example_fields"}' --json

mailerlite.mailerlite_update_subscriber

Write write

Update an existing subscriber in MailerLite. Provide the subscriber ID and fields to update.

Parameters
id, name, fields

Generic CLI call

kosmo integrations:call mailerlite.mailerlite_update_subscriber '{"id":"example_id","name":"example_name","fields":"example_fields"}' --json

Provider shortcut

kosmo integrations:mailerlite mailerlite_update_subscriber '{"id":"example_id","name":"example_name","fields":"example_fields"}' --json

mailerlite.mailerlite_delete_subscriber

Write write

Delete a subscriber from MailerLite by their ID. This action is permanent.

Parameters
id

Generic CLI call

kosmo integrations:call mailerlite.mailerlite_delete_subscriber '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:mailerlite mailerlite_delete_subscriber '{"id":"example_id"}' --json

mailerlite.mailerlite_list_groups

Read read

List subscriber groups (segments) from MailerLite. Supports pagination.

Parameters
page, limit

Generic CLI call

kosmo integrations:call mailerlite.mailerlite_list_groups '{"page":1,"limit":1}' --json

Provider shortcut

kosmo integrations:mailerlite mailerlite_list_groups '{"page":1,"limit":1}' --json

mailerlite.mailerlite_add_subscriber_to_group

Write write

Add a subscriber to a MailerLite group by providing the group ID and subscriber email.

Parameters
group_id, email, name

Generic CLI call

kosmo integrations:call mailerlite.mailerlite_add_subscriber_to_group '{"group_id":"example_group_id","email":"example_email","name":"example_name"}' --json

Provider shortcut

kosmo integrations:mailerlite mailerlite_add_subscriber_to_group '{"group_id":"example_group_id","email":"example_email","name":"example_name"}' --json

mailerlite.mailerlite_get_current_user

Read read

Get the currently authenticated MailerLite account information. Useful for verifying API credentials.

Parameters
none

Generic CLI call

kosmo integrations:call mailerlite.mailerlite_get_current_user '{}' --json

Provider shortcut

kosmo integrations:mailerlite mailerlite_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

mailerlite.mailerlite_list_subscribers

List subscribers from MailerLite. Supports pagination and filtering by status (active, unsubscribed, etc.).

Operation
Read read
Schema command
kosmo integrations:schema mailerlite.mailerlite_list_subscribers --json
ParameterTypeRequiredDescription
page integer no Page number (default: 1).
limit integer no Number of subscribers per page (default: 25, max: 100).
status string no Filter by status: active, unsubscribed, unconfirmed, bounced, junk.

mailerlite.mailerlite_get_subscriber

Get details for a single MailerLite subscriber by their ID.

Operation
Read read
Schema command
kosmo integrations:schema mailerlite.mailerlite_get_subscriber --json
ParameterTypeRequiredDescription
id string yes The subscriber ID.

mailerlite.mailerlite_create_subscriber

Add a new subscriber to MailerLite. Provide an email address and optionally a name and custom fields.

Operation
Write write
Schema command
kosmo integrations:schema mailerlite.mailerlite_create_subscriber --json
ParameterTypeRequiredDescription
email string yes Subscriber email address.
name string no Subscriber name.
fields object no Custom fields as key-value pairs (e.g., {"company": "Acme"}).

mailerlite.mailerlite_update_subscriber

Update an existing subscriber in MailerLite. Provide the subscriber ID and fields to update.

Operation
Write write
Schema command
kosmo integrations:schema mailerlite.mailerlite_update_subscriber --json
ParameterTypeRequiredDescription
id string yes The subscriber ID.
name string no Updated subscriber name.
fields object no Updated custom fields as key-value pairs.

mailerlite.mailerlite_delete_subscriber

Delete a subscriber from MailerLite by their ID. This action is permanent.

Operation
Write write
Schema command
kosmo integrations:schema mailerlite.mailerlite_delete_subscriber --json
ParameterTypeRequiredDescription
id string yes The subscriber ID to delete.

mailerlite.mailerlite_list_groups

List subscriber groups (segments) from MailerLite. Supports pagination.

Operation
Read read
Schema command
kosmo integrations:schema mailerlite.mailerlite_list_groups --json
ParameterTypeRequiredDescription
page integer no Page number (default: 1).
limit integer no Number of groups per page (default: 25).

mailerlite.mailerlite_add_subscriber_to_group

Add a subscriber to a MailerLite group by providing the group ID and subscriber email.

Operation
Write write
Schema command
kosmo integrations:schema mailerlite.mailerlite_add_subscriber_to_group --json
ParameterTypeRequiredDescription
group_id string yes The group ID to add the subscriber to.
email string yes Subscriber email address.
name string no Subscriber name (used if creating a new subscriber).

mailerlite.mailerlite_get_current_user

Get the currently authenticated MailerLite account information. Useful for verifying API credentials.

Operation
Read read
Schema command
kosmo integrations:schema mailerlite.mailerlite_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.