KosmoKrator

crm

ActiveCampaign CLI for AI Agents

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

15 functions 7 read 8 write API key auth

ActiveCampaign CLI Setup

ActiveCampaign can be configured headlessly with `kosmokrator integrations:configure activecampaign`.

# 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 activecampaign --set api_key="$ACTIVECAMPAIGN_API_KEY" --set account_name="$ACTIVECAMPAIGN_ACCOUNT_NAME" --enable --read allow --write ask --json
kosmokrator integrations:doctor activecampaign --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 ACTIVECAMPAIGN_API_KEY Secret secret yes API Key
account_name ACTIVECAMPAIGN_ACCOUNT_NAME Text string yes Account Name

Call ActiveCampaign Headlessly

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

kosmo integrations:call activecampaign.activecampaign_list_contacts '{
  "limit": 1,
  "offset": 1,
  "search": "example_search",
  "filters": "example_filters"
}' --json

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

kosmo integrations:activecampaign activecampaign_list_contacts '{
  "limit": 1,
  "offset": 1,
  "search": "example_search",
  "filters": "example_filters"
}' --json

Agent Discovery Commands

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

kosmo integrations:docs activecampaign --json
kosmo integrations:docs activecampaign.activecampaign_list_contacts --json
kosmo integrations:schema activecampaign.activecampaign_list_contacts --json
kosmo integrations:search "ActiveCampaign" --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 ActiveCampaign.

activecampaign.activecampaign_list_contacts

Read read

List contacts from ActiveCampaign. Supports pagination, search by email or name, and filtering by list, status, and other criteria.

Parameters
limit, offset, search, filters

Generic CLI call

kosmo integrations:call activecampaign.activecampaign_list_contacts '{"limit":1,"offset":1,"search":"example_search","filters":"example_filters"}' --json

Provider shortcut

kosmo integrations:activecampaign activecampaign_list_contacts '{"limit":1,"offset":1,"search":"example_search","filters":"example_filters"}' --json

activecampaign.activecampaign_get_contact

Read read

Get details of a specific ActiveCampaign contact by ID, including email, name, phone, and custom fields.

Parameters
contact_id

Generic CLI call

kosmo integrations:call activecampaign.activecampaign_get_contact '{"contact_id":1}' --json

Provider shortcut

kosmo integrations:activecampaign activecampaign_get_contact '{"contact_id":1}' --json

activecampaign.activecampaign_create_contact

Write write

Create a new contact in ActiveCampaign. Requires an email address; firstName, lastName, and phone are optional.

Parameters
email, firstName, lastName, phone

Generic CLI call

kosmo integrations:call activecampaign.activecampaign_create_contact '{"email":"example_email","firstName":"example_firstName","lastName":"example_lastName","phone":"example_phone"}' --json

Provider shortcut

kosmo integrations:activecampaign activecampaign_create_contact '{"email":"example_email","firstName":"example_firstName","lastName":"example_lastName","phone":"example_phone"}' --json

activecampaign.activecampaign_update_contact

Write write

Update an existing contact in ActiveCampaign. Provide the contact ID and any fields to update (email, firstName, lastName, phone, or custom fields).

Parameters
contact_id, email, firstName, lastName, phone, fields

Generic CLI call

kosmo integrations:call activecampaign.activecampaign_update_contact '{"contact_id":1,"email":"example_email","firstName":"example_firstName","lastName":"example_lastName","phone":"example_phone","fields":"example_fields"}' --json

Provider shortcut

kosmo integrations:activecampaign activecampaign_update_contact '{"contact_id":1,"email":"example_email","firstName":"example_firstName","lastName":"example_lastName","phone":"example_phone","fields":"example_fields"}' --json

activecampaign.activecampaign_delete_contact

Write write

Delete a contact from ActiveCampaign. This action is permanent and cannot be undone.

Parameters
contact_id

Generic CLI call

kosmo integrations:call activecampaign.activecampaign_delete_contact '{"contact_id":1}' --json

Provider shortcut

kosmo integrations:activecampaign activecampaign_delete_contact '{"contact_id":1}' --json

activecampaign.activecampaign_list_lists

Read read

List all contact lists in ActiveCampaign. Returns list IDs, names, and subscriber counts.

Parameters
limit, offset

Generic CLI call

kosmo integrations:call activecampaign.activecampaign_list_lists '{"limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:activecampaign activecampaign_list_lists '{"limit":1,"offset":1}' --json

activecampaign.activecampaign_get_list

Read read

Get details of a specific ActiveCampaign list by ID, including name, subscriber count, and settings.

Parameters
list_id

Generic CLI call

kosmo integrations:call activecampaign.activecampaign_get_list '{"list_id":1}' --json

Provider shortcut

kosmo integrations:activecampaign activecampaign_get_list '{"list_id":1}' --json

activecampaign.activecampaign_add_contact_to_list

Write write

Subscribe a contact to a list in ActiveCampaign. The contact will be added to the specified list.

Parameters
contact_id, list_id

Generic CLI call

kosmo integrations:call activecampaign.activecampaign_add_contact_to_list '{"contact_id":1,"list_id":1}' --json

Provider shortcut

kosmo integrations:activecampaign activecampaign_add_contact_to_list '{"contact_id":1,"list_id":1}' --json

activecampaign.activecampaign_remove_contact_from_list

Write write

Unsubscribe a contact from a list in ActiveCampaign. The contact will be removed from the specified list.

Parameters
contact_id, list_id

Generic CLI call

kosmo integrations:call activecampaign.activecampaign_remove_contact_from_list '{"contact_id":1,"list_id":1}' --json

Provider shortcut

kosmo integrations:activecampaign activecampaign_remove_contact_from_list '{"contact_id":1,"list_id":1}' --json

activecampaign.activecampaign_list_deals

Read read

List deals from ActiveCampaign. Supports pagination, search, and filtering by pipeline, stage, status, or owner.

Parameters
limit, offset, search, filters

Generic CLI call

kosmo integrations:call activecampaign.activecampaign_list_deals '{"limit":1,"offset":1,"search":"example_search","filters":"example_filters"}' --json

Provider shortcut

kosmo integrations:activecampaign activecampaign_list_deals '{"limit":1,"offset":1,"search":"example_search","filters":"example_filters"}' --json

activecampaign.activecampaign_get_deal

Read read

Get details of a specific ActiveCampaign deal by ID, including title, value, stage, pipeline, and associated contact.

Parameters
deal_id

Generic CLI call

kosmo integrations:call activecampaign.activecampaign_get_deal '{"deal_id":1}' --json

Provider shortcut

kosmo integrations:activecampaign activecampaign_get_deal '{"deal_id":1}' --json

activecampaign.activecampaign_create_deal

Write write

Create a new deal in ActiveCampaign. Requires a title, value, contact ID, and stage. Optionally specify a pipeline.

Parameters
title, value, contact_id, stage, pipeline

Generic CLI call

kosmo integrations:call activecampaign.activecampaign_create_deal '{"title":"example_title","value":1,"contact_id":1,"stage":1,"pipeline":1}' --json

Provider shortcut

kosmo integrations:activecampaign activecampaign_create_deal '{"title":"example_title","value":1,"contact_id":1,"stage":1,"pipeline":1}' --json

activecampaign.activecampaign_update_deal

Write write

Update an existing deal in ActiveCampaign. Provide the deal ID and any fields to update (title, value, stage, pipeline, status, etc.).

Parameters
deal_id, title, value, stage, pipeline, status, owner, percent, fields

Generic CLI call

kosmo integrations:call activecampaign.activecampaign_update_deal '{"deal_id":1,"title":"example_title","value":1,"stage":1,"pipeline":1,"status":1,"owner":"example_owner","percent":1}' --json

Provider shortcut

kosmo integrations:activecampaign activecampaign_update_deal '{"deal_id":1,"title":"example_title","value":1,"stage":1,"pipeline":1,"status":1,"owner":"example_owner","percent":1}' --json

activecampaign.activecampaign_list_automations

Read read

List all automations in ActiveCampaign. Returns automation IDs, names, status, and trigger counts.

Parameters
limit, offset

Generic CLI call

kosmo integrations:call activecampaign.activecampaign_list_automations '{"limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:activecampaign activecampaign_list_automations '{"limit":1,"offset":1}' --json

activecampaign.activecampaign_create_note

Write write

Create a note attached to a contact in ActiveCampaign. Provide the contact ID and note text.

Parameters
contact_id, note

Generic CLI call

kosmo integrations:call activecampaign.activecampaign_create_note '{"contact_id":1,"note":"example_note"}' --json

Provider shortcut

kosmo integrations:activecampaign activecampaign_create_note '{"contact_id":1,"note":"example_note"}' --json

Function Schemas

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

activecampaign.activecampaign_list_contacts

List contacts from ActiveCampaign. Supports pagination, search by email or name, and filtering by list, status, and other criteria.

Operation
Read read
Schema command
kosmo integrations:schema activecampaign.activecampaign_list_contacts --json
ParameterTypeRequiredDescription
limit integer no Number of contacts to return per page (default: 20, max: 100).
offset integer no Offset for pagination (e.g., 20 to skip the first page).
search string no Search term to filter contacts by email, name, or other fields.
filters object no Additional filters as key-value pairs (e.g., {"status": "-1"} for unsubscribed, {"listid": 5}).

activecampaign.activecampaign_get_contact

Get details of a specific ActiveCampaign contact by ID, including email, name, phone, and custom fields.

Operation
Read read
Schema command
kosmo integrations:schema activecampaign.activecampaign_get_contact --json
ParameterTypeRequiredDescription
contact_id integer yes The ActiveCampaign contact ID.

activecampaign.activecampaign_create_contact

Create a new contact in ActiveCampaign. Requires an email address; firstName, lastName, and phone are optional.

Operation
Write write
Schema command
kosmo integrations:schema activecampaign.activecampaign_create_contact --json
ParameterTypeRequiredDescription
email string yes The contact email address.
firstName string no The contact first name.
lastName string no The contact last name.
phone string no The contact phone number.

activecampaign.activecampaign_update_contact

Update an existing contact in ActiveCampaign. Provide the contact ID and any fields to update (email, firstName, lastName, phone, or custom fields).

Operation
Write write
Schema command
kosmo integrations:schema activecampaign.activecampaign_update_contact --json
ParameterTypeRequiredDescription
contact_id integer yes The ActiveCampaign 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.
fields object no Custom field values as key-value pairs (e.g., {"field[1]": "value"}).

activecampaign.activecampaign_delete_contact

Delete a contact from ActiveCampaign. This action is permanent and cannot be undone.

Operation
Write write
Schema command
kosmo integrations:schema activecampaign.activecampaign_delete_contact --json
ParameterTypeRequiredDescription
contact_id integer yes The ActiveCampaign contact ID to delete.

activecampaign.activecampaign_list_lists

List all contact lists in ActiveCampaign. Returns list IDs, names, and subscriber counts.

Operation
Read read
Schema command
kosmo integrations:schema activecampaign.activecampaign_list_lists --json
ParameterTypeRequiredDescription
limit integer no Number of lists to return per page (default: 20).
offset integer no Offset for pagination.

activecampaign.activecampaign_get_list

Get details of a specific ActiveCampaign list by ID, including name, subscriber count, and settings.

Operation
Read read
Schema command
kosmo integrations:schema activecampaign.activecampaign_get_list --json
ParameterTypeRequiredDescription
list_id integer yes The ActiveCampaign list ID.

activecampaign.activecampaign_add_contact_to_list

Subscribe a contact to a list in ActiveCampaign. The contact will be added to the specified list.

Operation
Write write
Schema command
kosmo integrations:schema activecampaign.activecampaign_add_contact_to_list --json
ParameterTypeRequiredDescription
contact_id integer yes The ActiveCampaign contact ID.
list_id integer yes The ActiveCampaign list ID to subscribe the contact to.

activecampaign.activecampaign_remove_contact_from_list

Unsubscribe a contact from a list in ActiveCampaign. The contact will be removed from the specified list.

Operation
Write write
Schema command
kosmo integrations:schema activecampaign.activecampaign_remove_contact_from_list --json
ParameterTypeRequiredDescription
contact_id integer yes The ActiveCampaign contact ID.
list_id integer yes The ActiveCampaign list ID to unsubscribe the contact from.

activecampaign.activecampaign_list_deals

List deals from ActiveCampaign. Supports pagination, search, and filtering by pipeline, stage, status, or owner.

Operation
Read read
Schema command
kosmo integrations:schema activecampaign.activecampaign_list_deals --json
ParameterTypeRequiredDescription
limit integer no Number of deals to return per page (default: 20).
offset integer no Offset for pagination.
search string no Search term to filter deals by title.
filters object no Additional filters (e.g., {"pipeline": 1, "stage": 2, "status": 0}, status: 0=open, 1=won, 2=lost, 3=abandoned).

activecampaign.activecampaign_get_deal

Get details of a specific ActiveCampaign deal by ID, including title, value, stage, pipeline, and associated contact.

Operation
Read read
Schema command
kosmo integrations:schema activecampaign.activecampaign_get_deal --json
ParameterTypeRequiredDescription
deal_id integer yes The ActiveCampaign deal ID.

activecampaign.activecampaign_create_deal

Create a new deal in ActiveCampaign. Requires a title, value, contact ID, and stage. Optionally specify a pipeline.

Operation
Write write
Schema command
kosmo integrations:schema activecampaign.activecampaign_create_deal --json
ParameterTypeRequiredDescription
title string yes The deal title.
value number yes The deal value (e.g., 5000 for $5,000).
contact_id integer yes The associated contact ID.
stage integer yes The pipeline stage ID to place the deal in.
pipeline integer no The pipeline ID. If omitted, the default pipeline is used.

activecampaign.activecampaign_update_deal

Update an existing deal in ActiveCampaign. Provide the deal ID and any fields to update (title, value, stage, pipeline, status, etc.).

Operation
Write write
Schema command
kosmo integrations:schema activecampaign.activecampaign_update_deal --json
ParameterTypeRequiredDescription
deal_id integer yes The ActiveCampaign deal ID to update.
title string no Updated deal title.
value number no Updated deal value.
stage integer no Updated pipeline stage ID.
pipeline integer no Updated pipeline ID.
status integer no Deal status: 0=open, 1=won, 2=lost, 3=abandoned.
owner string no Updated deal owner (user ID).
percent integer no Updated deal percentage (custom field).
fields object no Additional custom fields as key-value pairs.

activecampaign.activecampaign_list_automations

List all automations in ActiveCampaign. Returns automation IDs, names, status, and trigger counts.

Operation
Read read
Schema command
kosmo integrations:schema activecampaign.activecampaign_list_automations --json
ParameterTypeRequiredDescription
limit integer no Number of automations to return per page (default: 20).
offset integer no Offset for pagination.

activecampaign.activecampaign_create_note

Create a note attached to a contact in ActiveCampaign. Provide the contact ID and note text.

Operation
Write write
Schema command
kosmo integrations:schema activecampaign.activecampaign_create_note --json
ParameterTypeRequiredDescription
contact_id integer yes The ActiveCampaign contact ID to attach the note to.
note string yes The note text content.

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.