KosmoKrator

productivity

ChurnZero CLI for AI Agents

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

ChurnZero CLI Setup

ChurnZero can be configured headlessly with `kosmokrator integrations:configure churnzero`.

Install, configure, and verify
# 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 churnzero --set app_key="$CHURNZERO_APP_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor churnzero --json
kosmokrator integrations:status --json

Credentials

Authentication type: api key query api_key_query. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
app_key CHURNZERO_APP_KEY Secret secret yes App Key
url CHURNZERO_URL URL url no HTTP API Endpoint

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call churnzero.churnzero_set_attributes '{"entity":"example_entity","account_external_id":"example_account_external_id","contact_external_id":"example_contact_external_id","attributes":"example_attributes"}' --json
Provider shortcut
kosmo integrations:churnzero churnzero_set_attributes '{"entity":"example_entity","account_external_id":"example_account_external_id","contact_external_id":"example_contact_external_id","attributes":"example_attributes"}' --json

Discovery

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

Discovery commands
kosmo integrations:docs churnzero --json
kosmo integrations:docs churnzero.churnzero_set_attributes --json
kosmo integrations:schema churnzero.churnzero_set_attributes --json
kosmo integrations:search "ChurnZero" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

churnzero.churnzero_set_attributes

Set one or more ChurnZero account or contact attributes. For contacts, provide both account_external_id and contact_external_id. Attribute names must already exist in ChurnZero where required.

Write write
Parameters
entity, account_external_id, contact_external_id, attributes
Generic call
kosmo integrations:call churnzero.churnzero_set_attributes '{"entity":"example_entity","account_external_id":"example_account_external_id","contact_external_id":"example_contact_external_id","attributes":"example_attributes"}' --json
Shortcut
kosmo integrations:churnzero churnzero_set_attributes '{"entity":"example_entity","account_external_id":"example_account_external_id","contact_external_id":"example_contact_external_id","attributes":"example_attributes"}' --json

churnzero.churnzero_track_event

Track a ChurnZero event for an account and optionally a contact. Event names are created by ChurnZero if they do not already exist.

Write write
Parameters
account_external_id, event_name, contact_external_id, description, quantity, custom_fields
Generic call
kosmo integrations:call churnzero.churnzero_track_event '{"account_external_id":"example_account_external_id","event_name":"example_event_name","contact_external_id":"example_contact_external_id","description":"example_description","quantity":1,"custom_fields":"example_custom_fields"}' --json
Shortcut
kosmo integrations:churnzero churnzero_track_event '{"account_external_id":"example_account_external_id","event_name":"example_event_name","contact_external_id":"example_contact_external_id","description":"example_description","quantity":1,"custom_fields":"example_custom_fields"}' --json

churnzero.churnzero_increment_attribute

Increment a numeric ChurnZero account or contact attribute. Use a negative amount to decrement.

Write write
Parameters
entity, account_external_id, contact_external_id, name, value
Generic call
kosmo integrations:call churnzero.churnzero_increment_attribute '{"entity":"example_entity","account_external_id":"example_account_external_id","contact_external_id":"example_contact_external_id","name":"example_name","value":1}' --json
Shortcut
kosmo integrations:churnzero churnzero_increment_attribute '{"entity":"example_entity","account_external_id":"example_account_external_id","contact_external_id":"example_contact_external_id","name":"example_name","value":1}' --json

churnzero.churnzero_delete_contact

Delete a ChurnZero contact by account_external_id and contact_external_id. This action is destructive.

Write write
Parameters
account_external_id, contact_external_id
Generic call
kosmo integrations:call churnzero.churnzero_delete_contact '{"account_external_id":"example_account_external_id","contact_external_id":"example_contact_external_id"}' --json
Shortcut
kosmo integrations:churnzero churnzero_delete_contact '{"account_external_id":"example_account_external_id","contact_external_id":"example_contact_external_id"}' --json

churnzero.churnzero_delete_account

Delete a ChurnZero account by account_external_id. This action is destructive and may affect related contacts.

Write write
Parameters
account_external_id
Generic call
kosmo integrations:call churnzero.churnzero_delete_account '{"account_external_id":"example_account_external_id"}' --json
Shortcut
kosmo integrations:churnzero churnzero_delete_account '{"account_external_id":"example_account_external_id"}' --json

churnzero.churnzero_send_action

Send an advanced raw ChurnZero HTTP API action. Do not include appKey; the integration adds credentials automatically.

Write write
Parameters
params
Generic call
kosmo integrations:call churnzero.churnzero_send_action '{"params":"example_params"}' --json
Shortcut
kosmo integrations:churnzero churnzero_send_action '{"params":"example_params"}' --json

Function Schemas

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

churnzero.churnzero_set_attributes 4 parameters
Schema command
kosmo integrations:schema churnzero.churnzero_set_attributes --json
ParameterTypeRequiredDescription
entity string yes Whether to update an account or contact attribute.
account_external_id string yes Account identifier from your source system.
contact_external_id string no Contact identifier from your source system. Required when entity is contact.
attributes object yes Attribute name/value pairs to set in ChurnZero.
churnzero.churnzero_track_event 6 parameters
Schema command
kosmo integrations:schema churnzero.churnzero_track_event --json
ParameterTypeRequiredDescription
account_external_id string yes Account identifier from your source system.
event_name string yes ChurnZero event name.
contact_external_id string no Contact identifier from your source system.
description string no Optional event description.
quantity number no Optional numeric quantity associated with the event.
custom_fields object no Optional custom field map for the event.
churnzero.churnzero_increment_attribute 5 parameters
Schema command
kosmo integrations:schema churnzero.churnzero_increment_attribute --json
ParameterTypeRequiredDescription
entity string yes Whether to increment an account or contact attribute.
account_external_id string yes Account identifier from your source system.
contact_external_id string no Contact identifier from your source system. Required when entity is contact.
name string yes Numeric attribute name configured in ChurnZero.
value number yes Amount to add to the current value.
churnzero.churnzero_delete_contact 2 parameters
Schema command
kosmo integrations:schema churnzero.churnzero_delete_contact --json
ParameterTypeRequiredDescription
account_external_id string yes Account identifier from your source system.
contact_external_id string yes Contact identifier from your source system.
churnzero.churnzero_delete_account 1 parameters
Schema command
kosmo integrations:schema churnzero.churnzero_delete_account --json
ParameterTypeRequiredDescription
account_external_id string yes Account identifier from your source system.
churnzero.churnzero_send_action 1 parameters
Schema command
kosmo integrations:schema churnzero.churnzero_send_action --json
ParameterTypeRequiredDescription
params object yes ChurnZero action query parameters excluding appKey, for example action, accountExternalId, and eventName.

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.