KosmoKrator

email

EmailOctopus CLI for AI Agents

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

6 functions 5 read 1 write API key auth

EmailOctopus CLI Setup

EmailOctopus can be configured headlessly with `kosmokrator integrations:configure email-octopus`.

# 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 email-octopus --set api_key="$EMAIL_OCTOPUS_API_KEY" --set list_id="$EMAIL_OCTOPUS_LIST_ID" --enable --read allow --write ask --json
kosmokrator integrations:doctor email-octopus --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 EMAIL_OCTOPUS_API_KEY Secret secret yes API Key
url EMAIL_OCTOPUS_URL URL url no API Base URL
list_id EMAIL_OCTOPUS_LIST_ID Text string yes Default List ID

Call EmailOctopus Headlessly

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

kosmo integrations:call email-octopus.emailoctopus_list_contacts '{
  "list_id": "example_list_id",
  "limit": 1,
  "before": "example_before",
  "after": "example_after"
}' --json

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

kosmo integrations:email-octopus emailoctopus_list_contacts '{
  "list_id": "example_list_id",
  "limit": 1,
  "before": "example_before",
  "after": "example_after"
}' --json

Agent Discovery Commands

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

kosmo integrations:docs email-octopus --json
kosmo integrations:docs email-octopus.emailoctopus_list_contacts --json
kosmo integrations:schema email-octopus.emailoctopus_list_contacts --json
kosmo integrations:search "EmailOctopus" --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 EmailOctopus.

email-octopus.emailoctopus_list_contacts

Read read

List contacts in an EmailOctopus mailing list. Returns contact email addresses, statuses, and pagination cursors.

Parameters
list_id, limit, before, after

Generic CLI call

kosmo integrations:call email-octopus.emailoctopus_list_contacts '{"list_id":"example_list_id","limit":1,"before":"example_before","after":"example_after"}' --json

Provider shortcut

kosmo integrations:email-octopus emailoctopus_list_contacts '{"list_id":"example_list_id","limit":1,"before":"example_before","after":"example_after"}' --json

email-octopus.emailoctopus_get_contact

Read read

Get details of a specific contact in an EmailOctopus mailing list, including email address, status, and custom fields.

Parameters
contact_id, list_id

Generic CLI call

kosmo integrations:call email-octopus.emailoctopus_get_contact '{"contact_id":"example_contact_id","list_id":"example_list_id"}' --json

Provider shortcut

kosmo integrations:email-octopus emailoctopus_get_contact '{"contact_id":"example_contact_id","list_id":"example_list_id"}' --json

email-octopus.emailoctopus_create_contact

Write write

Add a new contact to an EmailOctopus mailing list. Requires an email address.

Parameters
email_address, list_id, first_name, last_name

Generic CLI call

kosmo integrations:call email-octopus.emailoctopus_create_contact '{"email_address":"example_email_address","list_id":"example_list_id","first_name":"example_first_name","last_name":"example_last_name"}' --json

Provider shortcut

kosmo integrations:email-octopus emailoctopus_create_contact '{"email_address":"example_email_address","list_id":"example_list_id","first_name":"example_first_name","last_name":"example_last_name"}' --json

email-octopus.emailoctopus_list_campaigns

Read read

List all email campaigns in your EmailOctopus account, including their status, subject, and send dates.

Parameters
limit, before, after

Generic CLI call

kosmo integrations:call email-octopus.emailoctopus_list_campaigns '{"limit":1,"before":"example_before","after":"example_after"}' --json

Provider shortcut

kosmo integrations:email-octopus emailoctopus_list_campaigns '{"limit":1,"before":"example_before","after":"example_after"}' --json

email-octopus.emailoctopus_get_campaign

Read read

Get details of a specific EmailOctopus campaign, including status, subject, content, and delivery statistics.

Parameters
campaign_id

Generic CLI call

kosmo integrations:call email-octopus.emailoctopus_get_campaign '{"campaign_id":"example_campaign_id"}' --json

Provider shortcut

kosmo integrations:email-octopus emailoctopus_get_campaign '{"campaign_id":"example_campaign_id"}' --json

email-octopus.emailoctopus_get_current_user

Read read

Get the authenticated EmailOctopus account details, including name and email address.

Parameters
none

Generic CLI call

kosmo integrations:call email-octopus.emailoctopus_get_current_user '{}' --json

Provider shortcut

kosmo integrations:email-octopus emailoctopus_get_current_user '{}' --json

Function Schemas

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

email-octopus.emailoctopus_list_contacts

List contacts in an EmailOctopus mailing list. Returns contact email addresses, statuses, and pagination cursors.

Operation
Read read
Schema command
kosmo integrations:schema email-octopus.emailoctopus_list_contacts --json
ParameterTypeRequiredDescription
list_id string no The list ID to query. Uses the default configured list if omitted.
limit integer no Maximum number of contacts to return (default: 100, max: 100).
before string no Cursor for pagination — contact ID to paginate before.
after string no Cursor for pagination — contact ID to paginate after.

email-octopus.emailoctopus_get_contact

Get details of a specific contact in an EmailOctopus mailing list, including email address, status, and custom fields.

Operation
Read read
Schema command
kosmo integrations:schema email-octopus.emailoctopus_get_contact --json
ParameterTypeRequiredDescription
contact_id string yes The contact ID to retrieve.
list_id string no The list ID the contact belongs to. Uses the default configured list if omitted.

email-octopus.emailoctopus_create_contact

Add a new contact to an EmailOctopus mailing list. Requires an email address.

Operation
Write write
Schema command
kosmo integrations:schema email-octopus.emailoctopus_create_contact --json
ParameterTypeRequiredDescription
email_address string yes The contact's email address.
list_id string no The list ID to add the contact to. Uses the default configured list if omitted.
first_name string no The contact's first name.
last_name string no The contact's last name.

email-octopus.emailoctopus_list_campaigns

List all email campaigns in your EmailOctopus account, including their status, subject, and send dates.

Operation
Read read
Schema command
kosmo integrations:schema email-octopus.emailoctopus_list_campaigns --json
ParameterTypeRequiredDescription
limit integer no Maximum number of campaigns to return (default: 100, max: 100).
before string no Cursor for pagination — campaign ID to paginate before.
after string no Cursor for pagination — campaign ID to paginate after.

email-octopus.emailoctopus_get_campaign

Get details of a specific EmailOctopus campaign, including status, subject, content, and delivery statistics.

Operation
Read read
Schema command
kosmo integrations:schema email-octopus.emailoctopus_get_campaign --json
ParameterTypeRequiredDescription
campaign_id string yes The campaign ID to retrieve.

email-octopus.emailoctopus_get_current_user

Get the authenticated EmailOctopus account details, including name and email address.

Operation
Read read
Schema command
kosmo integrations:schema email-octopus.emailoctopus_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.