KosmoKrator

marketing

Mautic CLI for AI Agents

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

9 functions 6 read 3 write Username and password auth

Mautic CLI Setup

Mautic can be configured headlessly with `kosmokrator integrations:configure mautic`.

# 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 mautic --set hostname="$MAUTIC_HOSTNAME" --set username="$MAUTIC_USERNAME" --set password="$MAUTIC_PASSWORD" --enable --read allow --write ask --json
kosmokrator integrations:doctor mautic --json
kosmokrator integrations:status --json

Credentials

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

KeyEnv varTypeRequiredLabel
hostname MAUTIC_HOSTNAME URL url yes Mautic URL
username MAUTIC_USERNAME Text text yes Username
password MAUTIC_PASSWORD Secret secret yes Password

Call Mautic Headlessly

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

kosmo integrations:call mautic.mautic_list_contacts '{
  "search": "example_search",
  "limit": 1,
  "start": 1,
  "orderBy": "example_orderBy",
  "orderByDir": "example_orderByDir"
}' --json

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

kosmo integrations:mautic mautic_list_contacts '{
  "search": "example_search",
  "limit": 1,
  "start": 1,
  "orderBy": "example_orderBy",
  "orderByDir": "example_orderByDir"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities 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

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 Mautic.

mautic.mautic_list_contacts

Read read

List contacts in Mautic. Supports search, filtering, pagination, and ordering. Returns contact details including email, name, and custom fields.

Parameters
search, limit, start, orderBy, orderByDir

Generic CLI call

kosmo integrations:call mautic.mautic_list_contacts '{"search":"example_search","limit":1,"start":1,"orderBy":"example_orderBy","orderByDir":"example_orderByDir"}' --json

Provider shortcut

kosmo integrations:mautic mautic_list_contacts '{"search":"example_search","limit":1,"start":1,"orderBy":"example_orderBy","orderByDir":"example_orderByDir"}' --json

mautic.mautic_get_contact

Read read

Get detailed information about a single Mautic contact by ID, including all fields and tags.

Parameters
id

Generic CLI call

kosmo integrations:call mautic.mautic_get_contact '{"id":1}' --json

Provider shortcut

kosmo integrations:mautic mautic_get_contact '{"id":1}' --json

mautic.mautic_create_contact

Write write

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.

Parameters
email, firstname, lastname, phone, company, position, tags, owner

Generic CLI call

kosmo integrations:call mautic.mautic_create_contact '{"email":"example_email","firstname":"example_firstname","lastname":"example_lastname","phone":"example_phone","company":"example_company","position":"example_position","tags":"example_tags","owner":1}' --json

Provider shortcut

kosmo integrations:mautic mautic_create_contact '{"email":"example_email","firstname":"example_firstname","lastname":"example_lastname","phone":"example_phone","company":"example_company","position":"example_position","tags":"example_tags","owner":1}' --json

mautic.mautic_update_contact

Write write

Update an existing Mautic contact. Provide the contact ID and the fields to update (e.g. email, firstname, lastname, phone, company, tags).

Parameters
id, email, firstname, lastname, phone, company, position, tags, owner

Generic CLI call

kosmo integrations:call mautic.mautic_update_contact '{"id":1,"email":"example_email","firstname":"example_firstname","lastname":"example_lastname","phone":"example_phone","company":"example_company","position":"example_position","tags":"example_tags"}' --json

Provider shortcut

kosmo integrations:mautic mautic_update_contact '{"id":1,"email":"example_email","firstname":"example_firstname","lastname":"example_lastname","phone":"example_phone","company":"example_company","position":"example_position","tags":"example_tags"}' --json

mautic.mautic_delete_contact

Write write

Delete a contact from Mautic by ID. This action is permanent and cannot be undone.

Parameters
id

Generic CLI call

kosmo integrations:call mautic.mautic_delete_contact '{"id":1}' --json

Provider shortcut

kosmo integrations:mautic mautic_delete_contact '{"id":1}' --json

mautic.mautic_list_emails

Read read

List marketing emails from Mautic. Returns email details including name, subject, and publish status.

Parameters
search, limit, start, orderBy, orderByDir

Generic CLI call

kosmo integrations:call mautic.mautic_list_emails '{"search":"example_search","limit":1,"start":1,"orderBy":"example_orderBy","orderByDir":"example_orderByDir"}' --json

Provider shortcut

kosmo integrations:mautic mautic_list_emails '{"search":"example_search","limit":1,"start":1,"orderBy":"example_orderBy","orderByDir":"example_orderByDir"}' --json

mautic.mautic_list_segments

Read read

List contact segments (also known as lists or filters) from Mautic. Returns segment names, aliases, and contact counts.

Parameters
search, limit, start, orderBy, orderByDir

Generic CLI call

kosmo integrations:call mautic.mautic_list_segments '{"search":"example_search","limit":1,"start":1,"orderBy":"example_orderBy","orderByDir":"example_orderByDir"}' --json

Provider shortcut

kosmo integrations:mautic mautic_list_segments '{"search":"example_search","limit":1,"start":1,"orderBy":"example_orderBy","orderByDir":"example_orderByDir"}' --json

mautic.mautic_list_forms

Read read

List forms from Mautic. Returns form names, aliases, submission counts, and publish status.

Parameters
search, limit, start, orderBy, orderByDir

Generic CLI call

kosmo integrations:call mautic.mautic_list_forms '{"search":"example_search","limit":1,"start":1,"orderBy":"example_orderBy","orderByDir":"example_orderByDir"}' --json

Provider shortcut

kosmo integrations:mautic mautic_list_forms '{"search":"example_search","limit":1,"start":1,"orderBy":"example_orderBy","orderByDir":"example_orderByDir"}' --json

mautic.mautic_get_current_user

Read read

Get details of the currently authenticated Mautic user — useful to verify credentials and identify which user the integration is acting as.

Parameters
none

Generic CLI call

kosmo integrations:call mautic.mautic_get_current_user '{}' --json

Provider shortcut

kosmo integrations:mautic mautic_get_current_user '{}' --json

Function Schemas

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

mautic.mautic_list_contacts

List contacts in Mautic. Supports search, filtering, pagination, and ordering. Returns contact details including email, name, and custom fields.

Operation
Read read
Schema command
kosmo integrations:schema mautic.mautic_list_contacts --json
ParameterTypeRequiredDescription
search string no Search query to filter contacts (e.g. "email:[email protected]" or a name).
limit integer no Maximum number of contacts to return (default: 30, max: 100).
start integer no Offset for pagination (default: 0).
orderBy string no Field to order by (e.g. "email", "firstName", "lastName", "id").
orderByDir string no Order direction: "asc" or "desc" (default: "asc").

mautic.mautic_get_contact

Get detailed information about a single Mautic contact by ID, including all fields and tags.

Operation
Read read
Schema command
kosmo integrations:schema mautic.mautic_get_contact --json
ParameterTypeRequiredDescription
id integer yes The Mautic contact ID.

mautic.mautic_create_contact

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.

Operation
Write write
Schema command
kosmo integrations:schema mautic.mautic_create_contact --json
ParameterTypeRequiredDescription
email string yes Email address for the contact.
firstname string no First name.
lastname string no Last name.
phone string no Phone number.
company string no Company name.
position string no Job title / position.
tags array no Tags to assign (array of tag names, e.g. ["lead", "newsletter"]).
owner integer no User ID of the contact owner.

mautic.mautic_update_contact

Update an existing Mautic contact. Provide the contact ID and the fields to update (e.g. email, firstname, lastname, phone, company, tags).

Operation
Write write
Schema command
kosmo integrations:schema mautic.mautic_update_contact --json
ParameterTypeRequiredDescription
id integer yes The Mautic contact ID to update.
email string no Updated email address.
firstname string no Updated first name.
lastname string no Updated last name.
phone string no Updated phone number.
company string no Updated company name.
position string no Updated job title / position.
tags array no Tags to set (array of tag names, e.g. ["lead", "newsletter"]).
owner integer no User ID of the contact owner.

mautic.mautic_delete_contact

Delete a contact from Mautic by ID. This action is permanent and cannot be undone.

Operation
Write write
Schema command
kosmo integrations:schema mautic.mautic_delete_contact --json
ParameterTypeRequiredDescription
id integer yes The Mautic contact ID to delete.

mautic.mautic_list_emails

List marketing emails from Mautic. Returns email details including name, subject, and publish status.

Operation
Read read
Schema command
kosmo integrations:schema mautic.mautic_list_emails --json
ParameterTypeRequiredDescription
search string no Search query to filter emails.
limit integer no Maximum number of emails to return (default: 30).
start integer no Offset for pagination (default: 0).
orderBy string no Field to order by (e.g. "subject", "id").
orderByDir string no Order direction: "asc" or "desc".

mautic.mautic_list_segments

List contact segments (also known as lists or filters) from Mautic. Returns segment names, aliases, and contact counts.

Operation
Read read
Schema command
kosmo integrations:schema mautic.mautic_list_segments --json
ParameterTypeRequiredDescription
search string no Search query to filter segments.
limit integer no Maximum number of segments to return (default: 30).
start integer no Offset for pagination (default: 0).
orderBy string no Field to order by (e.g. "name", "id").
orderByDir string no Order direction: "asc" or "desc".

mautic.mautic_list_forms

List forms from Mautic. Returns form names, aliases, submission counts, and publish status.

Operation
Read read
Schema command
kosmo integrations:schema mautic.mautic_list_forms --json
ParameterTypeRequiredDescription
search string no Search query to filter forms.
limit integer no Maximum number of forms to return (default: 30).
start integer no Offset for pagination (default: 0).
orderBy string no Field to order by (e.g. "name", "id").
orderByDir string no Order direction: "asc" or "desc".

mautic.mautic_get_current_user

Get details of the currently authenticated Mautic user — useful to verify credentials and identify which user the integration is acting as.

Operation
Read read
Schema command
kosmo integrations:schema mautic.mautic_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.