marketing
Mautic CLI for Headless Automation
Use the Mautic CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
9 functions 6 read 3 write Username and password auth
Mautic CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The Mautic CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Mautic CLI for Headless Automation
kosmokrator integrations:configure mautic --set hostname="$MAUTIC_HOSTNAME" --set username="$MAUTIC_USERNAME" --set password="$MAUTIC_PASSWORD" --enable --read allow --write ask --json
kosmo integrations:call mautic.mautic_list_contacts '{"search":"example_search","limit":1,"start":1,"orderBy":"example_orderBy","orderByDir":"example_orderByDir"}' --json Discovery Before Execution
Agents and scripts can inspect Mautic docs and schemas before choosing a function.
kosmo integrations:docs mautic --json
kosmo integrations:docs mautic.mautic_list_contacts --json
kosmo integrations:schema mautic.mautic_list_contacts --json
kosmo integrations:search "Mautic" --json
kosmo integrations:list --json Useful Mautic CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
mautic.mautic_list_contacts | Read | search, limit, start, orderBy, orderByDir | List contacts in Mautic. Supports search, filtering, pagination, and ordering. Returns contact details including email, name, and custom fields. |
mautic.mautic_get_contact | Read | id | Get detailed information about a single Mautic contact by ID, including all fields and tags. |
mautic.mautic_create_contact | Write | email, firstname, lastname, phone, company, position, tags, owner | Create a new contact in Mautic. Provide at least an email address; additional fields like first name, last name, phone, company, and tags are optional. |
mautic.mautic_update_contact | Write | id, email, firstname, lastname, phone, company, position, tags, owner | Update an existing Mautic contact. Provide the contact ID and the fields to update (e.g. email, firstname, lastname, phone, company, tags). |
mautic.mautic_delete_contact | Write | id | Delete a contact from Mautic by ID. This action is permanent and cannot be undone. |
mautic.mautic_list_emails | Read | search, limit, start, orderBy, orderByDir | List marketing emails from Mautic. Returns email details including name, subject, and publish status. |
mautic.mautic_list_segments | Read | search, limit, start, orderBy, orderByDir | List contact segments (also known as lists or filters) from Mautic. Returns segment names, aliases, and contact counts. |
mautic.mautic_list_forms | Read | search, limit, start, orderBy, orderByDir | List forms from Mautic. Returns form names, aliases, submission counts, and publish status. |
mautic.mautic_get_current_user | Read | none | Get details of the currently authenticated Mautic user — useful to verify credentials and identify which user the integration is acting as. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.