Use the Mailchimp CLI from KosmoKrator to call Mailchimp tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
Mailchimp can be configured headlessly with `kosmokrator integrations:configure mailchimp`.
# 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 mailchimp --enable --read allow --write ask --jsonkosmokrator integrations:doctor mailchimp --jsonkosmokrator integrations:status --json
Credentials
Authentication type: API keyapi_key. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
No credentials are required.
Call Mailchimp Headlessly
Use the generic call form when another coding CLI or script needs a stable universal interface.
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to Mailchimp.
mailchimp.mailchimp_list_audiences
Read read
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.
Get full details for a single Mailchimp audience (list) by its ID.
Returns the audience name, contact information, subscription stats, and default settings.
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.
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.
Retrieve a subscriber's details from a Mailchimp audience by their email address.
Returns the subscriber's status, merge fields, tags, and activity timestamps.
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.
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.
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.
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.
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.
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.
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.
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.
Use these parameter tables when building CLI payloads without calling integrations:schema first.
mailchimp.mailchimp_list_audiences
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.
Get full details for a single Mailchimp audience (list) by its ID.
Returns the audience name, contact information, subscription stats, and default settings.
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.
Contact information for the audience (company, address1, city, state, zip, country).
permission_reminder
string
yes
Permission reminder text explaining why the subscriber is on this list.
email_type_option
boolean
no
Whether to allow subscribers to choose HTML or plain-text email.
campaign_defaults
object
yes
Default values for campaigns created from this audience.
mailchimp.mailchimp_add_subscriber
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.
Subscription status: subscribed, unsubscribed, cleaned, or pending.
merge_fields
object
no
Merge field values (e.g. {"FNAME": "John", "LNAME": "Doe"}).
tags
array
no
Tag names to apply to the subscriber.
mailchimp.mailchimp_get_subscriber
Retrieve a subscriber's details from a Mailchimp audience by their email address.
Returns the subscriber's status, merge fields, tags, and activity timestamps.
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.
Merge field values to update (e.g. {"FNAME": "Jane"}).
status
string
no
New subscription status: subscribed, unsubscribed, cleaned, or pending.
mailchimp.mailchimp_search_subscribers
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.
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.
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.
Campaign settings to update (e.g. subject_line, title, from_name, reply_to).
mailchimp.mailchimp_send_campaign
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.
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.
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.
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.
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.