KosmoKrator

productivity

Mailchimp CLI for Shell Scripts

Use the Mailchimp CLI for shell scripts with headless JSON commands, schema discovery, credentials, and permission controls.

18 functions 9 read 9 write API key auth

Mailchimp CLI for Shell Scripts

Call integration functions from shell scripts with stable JSON input and output.

Use shell scripts for small local automations that need one or more integration calls. The Mailchimp CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Mailchimp CLI for Shell Scripts
kosmokrator integrations:configure mailchimp --enable --read allow --write ask --json
kosmo integrations:call mailchimp.mailchimp_list_audiences '{"count":1,"offset":1}' --json

Discovery Before Execution

Agents and scripts can inspect Mailchimp docs and schemas before choosing a function.

kosmo integrations:docs mailchimp --json
kosmo integrations:docs mailchimp.mailchimp_list_audiences --json
kosmo integrations:schema mailchimp.mailchimp_list_audiences --json
kosmo integrations:search "Mailchimp" --json
kosmo integrations:list --json

Useful Mailchimp CLI Functions

FunctionTypeParametersDescription
mailchimp.mailchimp_list_audiences Read count, offset List all audiences (lists) in the connected Mailchimp account. Returns each audience's ID, name, subscriber count, and other metadata. Supports offset-based pagination via the count and offset parameters.
mailchimp.mailchimp_get_audience Read id Get full details for a single Mailchimp audience (list) by its ID. Returns the audience name, contact information, subscription stats, and default settings.
mailchimp.mailchimp_create_audience Write name, contact, permission_reminder, email_type_option, campaign_defaults Create a new audience (list) in Mailchimp. Requires a name, contact information, permission reminder, and campaign defaults. Returns the newly created audience with its ID.
mailchimp.mailchimp_add_subscriber Write list_id, email, status, merge_fields, tags Add a new subscriber or update an existing one in a Mailchimp audience. Uses a PUT upsert based on the subscriber's email address (MD5 hash). Optionally set merge fields and initial tags. Returns the subscriber record with their ID and status.
mailchimp.mailchimp_get_subscriber Read list_id, email Retrieve a subscriber's details from a Mailchimp audience by their email address. Returns the subscriber's status, merge fields, tags, and activity timestamps.
mailchimp.mailchimp_update_subscriber Write list_id, email, merge_fields, status Update an existing subscriber's merge fields and/or status in a Mailchimp audience. Provide the subscriber's email address to identify the record. Returns the updated subscriber details.
mailchimp.mailchimp_search_subscribers Read query, list_id, count Search for subscribers by email address or name across all audiences or within a specific list. Returns matching subscriber records with their list membership and status.
mailchimp.mailchimp_remove_subscriber Write list_id, email Remove (archive) a subscriber from a Mailchimp audience by their email address. This archives the member; it does not permanently delete it.
mailchimp.mailchimp_create_campaign Write type, list_id, settings_subject, settings_title, settings_from_name, settings_reply_to Create a new campaign in Mailchimp. Requires a campaign type and the target list_id. Optional settings include subject line, title, from name, and reply-to address. Returns the newly created campaign with its ID and web_id.
mailchimp.mailchimp_get_campaign Read id Get details for a single Mailchimp campaign by its ID. Returns the campaign type, status, settings, recipient list, and send times.
mailchimp.mailchimp_update_campaign Write id, settings Update a Mailchimp campaign's settings such as subject line, title, from name, or reply-to. Provide the campaign ID and a settings object with the fields to update. Returns the updated campaign details.
mailchimp.mailchimp_send_campaign Write id Send a Mailchimp campaign immediately. The campaign must already have content configured and be in a "save" or "paused" state. This action is irreversible — once sent, the campaign cannot be recalled.
mailchimp.mailchimp_list_campaigns Read count, offset, status, type List campaigns in the Mailchimp account with offset-based pagination and optional filters. Filter by status (save, paused, schedule, sending, sent) or type (regular, plaintext, absplit, rss, variate). Returns each campaign's ID, title, status, and send time.
mailchimp.mailchimp_tag_subscriber Write list_id, email, tags Add or remove tags on a Mailchimp subscriber. Provide an array of tags, each with a name and status ("active" to add, "inactive" to remove).
mailchimp.mailchimp_list_segments Read list_id, count List all segments (static and dynamic) for a Mailchimp audience. Returns each segment's ID, name, type, and member count.
mailchimp.mailchimp_add_to_segment Write list_id, segment_id, email Add a subscriber to a Mailchimp static segment by email address. The segment must be a static (not dynamic) segment. Returns the segment membership details.
mailchimp.mailchimp_get_campaign_report Read id Get a detailed report for a sent Mailchimp campaign. Returns send stats (emails sent, bounces), open rates, click rates, and industry benchmarks.
mailchimp.mailchimp_get_current_user Read none Get the authenticated Mailchimp user's account information. Returns account name, email, total subscribers, industry stats, and plan details. Useful for verifying the connection and understanding the account scope.

Automation Notes

Related Mailchimp CLI Pages