KosmoKrator

marketing

Freshmarketer CLI for AI Agents

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

7 functions 6 read 1 write Bearer token auth

Freshmarketer CLI Setup

Freshmarketer can be configured headlessly with `kosmokrator integrations:configure freshmarketer`.

# 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 freshmarketer --set access_token="$FRESHMARKETER_ACCESS_TOKEN" --set domain="$FRESHMARKETER_DOMAIN" --enable --read allow --write ask --json
kosmokrator integrations:doctor freshmarketer --json
kosmokrator integrations:status --json

Credentials

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

KeyEnv varTypeRequiredLabel
access_token FRESHMARKETER_ACCESS_TOKEN Secret secret yes Access Token
domain FRESHMARKETER_DOMAIN Text string yes Domain
base_url FRESHMARKETER_BASE_URL URL url no Custom Base URL

Call Freshmarketer Headlessly

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

kosmo integrations:call freshmarketer.freshmarketer_list_campaigns '{
  "page": 1,
  "limit": 1,
  "status": "example_status"
}' --json

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

kosmo integrations:freshmarketer freshmarketer_list_campaigns '{
  "page": 1,
  "limit": 1,
  "status": "example_status"
}' --json

Agent Discovery Commands

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

kosmo integrations:docs freshmarketer --json
kosmo integrations:docs freshmarketer.freshmarketer_list_campaigns --json
kosmo integrations:schema freshmarketer.freshmarketer_list_campaigns --json
kosmo integrations:search "Freshmarketer" --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 Freshmarketer.

freshmarketer.freshmarketer_list_campaigns

Read read

List marketing campaigns from Freshmarketer. Supports pagination and filtering by status (e.g., "active", "completed", "draft").

Parameters
page, limit, status

Generic CLI call

kosmo integrations:call freshmarketer.freshmarketer_list_campaigns '{"page":1,"limit":1,"status":"example_status"}' --json

Provider shortcut

kosmo integrations:freshmarketer freshmarketer_list_campaigns '{"page":1,"limit":1,"status":"example_status"}' --json

freshmarketer.freshmarketer_get_campaign

Read read

Get detailed information about a specific marketing campaign by its ID.

Parameters
id

Generic CLI call

kosmo integrations:call freshmarketer.freshmarketer_get_campaign '{"id":1}' --json

Provider shortcut

kosmo integrations:freshmarketer freshmarketer_get_campaign '{"id":1}' --json

freshmarketer.freshmarketer_create_campaign

Write write

Create a new marketing campaign in Freshmarketer. Specify the campaign name, channels (e.g., "email"), and an optional schedule.

Parameters
name, channel_list, schedule

Generic CLI call

kosmo integrations:call freshmarketer.freshmarketer_create_campaign '{"name":"example_name","channel_list":"example_channel_list","schedule":"example_schedule"}' --json

Provider shortcut

kosmo integrations:freshmarketer freshmarketer_create_campaign '{"name":"example_name","channel_list":"example_channel_list","schedule":"example_schedule"}' --json

freshmarketer.freshmarketer_list_segments

Read read

List contact segments in Freshmarketer. Supports pagination to browse through all segments.

Parameters
page, limit

Generic CLI call

kosmo integrations:call freshmarketer.freshmarketer_list_segments '{"page":1,"limit":1}' --json

Provider shortcut

kosmo integrations:freshmarketer freshmarketer_list_segments '{"page":1,"limit":1}' --json

freshmarketer.freshmarketer_get_segment

Read read

Get detailed information about a specific contact segment by its ID.

Parameters
id

Generic CLI call

kosmo integrations:call freshmarketer.freshmarketer_get_segment '{"id":1}' --json

Provider shortcut

kosmo integrations:freshmarketer freshmarketer_get_segment '{"id":1}' --json

freshmarketer.freshmarketer_list_users

Read read

List all users in the Freshmarketer account.

Parameters
none

Generic CLI call

kosmo integrations:call freshmarketer.freshmarketer_list_users '{}' --json

Provider shortcut

kosmo integrations:freshmarketer freshmarketer_list_users '{}' --json

freshmarketer.freshmarketer_get_current_user

Read read

Get the profile of the currently authenticated Freshmarketer user.

Parameters
none

Generic CLI call

kosmo integrations:call freshmarketer.freshmarketer_get_current_user '{}' --json

Provider shortcut

kosmo integrations:freshmarketer freshmarketer_get_current_user '{}' --json

Function Schemas

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

freshmarketer.freshmarketer_list_campaigns

List marketing campaigns from Freshmarketer. Supports pagination and filtering by status (e.g., "active", "completed", "draft").

Operation
Read read
Schema command
kosmo integrations:schema freshmarketer.freshmarketer_list_campaigns --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
limit integer no Number of campaigns per page (default: 20).
status string no Filter campaigns by status (e.g., "active", "completed", "draft").

freshmarketer.freshmarketer_get_campaign

Get detailed information about a specific marketing campaign by its ID.

Operation
Read read
Schema command
kosmo integrations:schema freshmarketer.freshmarketer_get_campaign --json
ParameterTypeRequiredDescription
id integer yes The campaign ID to retrieve.

freshmarketer.freshmarketer_create_campaign

Create a new marketing campaign in Freshmarketer. Specify the campaign name, channels (e.g., "email"), and an optional schedule.

Operation
Write write
Schema command
kosmo integrations:schema freshmarketer.freshmarketer_create_campaign --json
ParameterTypeRequiredDescription
name string yes Name of the campaign.
channel_list array no List of channels for the campaign (e.g., ["email"]).
schedule object no Schedule configuration for the campaign (e.g., {"type": "immediate"} or {"type": "scheduled", "scheduled_at": "2025-06-01T09:00:00Z"}).

freshmarketer.freshmarketer_list_segments

List contact segments in Freshmarketer. Supports pagination to browse through all segments.

Operation
Read read
Schema command
kosmo integrations:schema freshmarketer.freshmarketer_list_segments --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
limit integer no Number of segments per page (default: 20).

freshmarketer.freshmarketer_get_segment

Get detailed information about a specific contact segment by its ID.

Operation
Read read
Schema command
kosmo integrations:schema freshmarketer.freshmarketer_get_segment --json
ParameterTypeRequiredDescription
id integer yes The segment ID to retrieve.

freshmarketer.freshmarketer_list_users

List all users in the Freshmarketer account.

Operation
Read read
Schema command
kosmo integrations:schema freshmarketer.freshmarketer_list_users --json
ParameterTypeRequiredDescription
No parameters.

freshmarketer.freshmarketer_get_current_user

Get the profile of the currently authenticated Freshmarketer user.

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