KosmoKrator

sales

Keap CLI for AI Agents

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

7 functions 6 read 1 write Bearer token auth

Keap CLI Setup

Keap can be configured headlessly with `kosmokrator integrations:configure keap`.

# 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 keap --set access_token="$KEAP_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor keap --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 KEAP_ACCESS_TOKEN Secret secret yes Access Token
url KEAP_URL URL url no API Base URL

Call Keap Headlessly

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

kosmo integrations:call keap.keap_list_contacts '{
  "page": 1,
  "limit": 1
}' --json

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

kosmo integrations:keap keap_list_contacts '{
  "page": 1,
  "limit": 1
}' --json

Agent Discovery Commands

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

kosmo integrations:docs keap --json
kosmo integrations:docs keap.keap_list_contacts --json
kosmo integrations:schema keap.keap_list_contacts --json
kosmo integrations:search "Keap" --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 Keap.

keap.keap_list_contacts

Read read

List contacts from Keap CRM. Returns paginated results with contact details including name, email, and company.

Parameters
page, limit

Generic CLI call

kosmo integrations:call keap.keap_list_contacts '{"page":1,"limit":1}' --json

Provider shortcut

kosmo integrations:keap keap_list_contacts '{"page":1,"limit":1}' --json

keap.keap_get_contact

Read read

Retrieve a single Keap contact by ID. Returns full contact details including email addresses, phone numbers, and tags.

Parameters
id

Generic CLI call

kosmo integrations:call keap.keap_get_contact '{"id":1}' --json

Provider shortcut

kosmo integrations:keap keap_get_contact '{"id":1}' --json

keap.keap_create_contact

Write write

Create a new contact in Keap CRM. Provide at least a first name or last name. Email and company name are optional.

Parameters
first_name, last_name, email, company_name

Generic CLI call

kosmo integrations:call keap.keap_create_contact '{"first_name":"example_first_name","last_name":"example_last_name","email":"example_email","company_name":"example_company_name"}' --json

Provider shortcut

kosmo integrations:keap keap_create_contact '{"first_name":"example_first_name","last_name":"example_last_name","email":"example_email","company_name":"example_company_name"}' --json

keap.keap_list_opportunities

Read read

List sales opportunities from Keap CRM. Optionally filter by pipeline stage. Returns paginated results with opportunity details.

Parameters
page, limit, stage

Generic CLI call

kosmo integrations:call keap.keap_list_opportunities '{"page":1,"limit":1,"stage":"example_stage"}' --json

Provider shortcut

kosmo integrations:keap keap_list_opportunities '{"page":1,"limit":1,"stage":"example_stage"}' --json

keap.keap_get_opportunity

Read read

Retrieve a single Keap sales opportunity by ID. Returns full details including contact, stage, value, and notes.

Parameters
id

Generic CLI call

kosmo integrations:call keap.keap_get_opportunity '{"id":1}' --json

Provider shortcut

kosmo integrations:keap keap_get_opportunity '{"id":1}' --json

keap.keap_list_tags

Read read

List all tags in Keap. Tags are used to categorize contacts and trigger automations.

Parameters
none

Generic CLI call

kosmo integrations:call keap.keap_list_tags '{}' --json

Provider shortcut

kosmo integrations:keap keap_list_tags '{}' --json

keap.keap_get_current_user

Read read

Get the currently authenticated Keap user. Returns profile information for the user associated with the access token.

Parameters
none

Generic CLI call

kosmo integrations:call keap.keap_get_current_user '{}' --json

Provider shortcut

kosmo integrations:keap keap_get_current_user '{}' --json

Function Schemas

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

keap.keap_list_contacts

List contacts from Keap CRM. Returns paginated results with contact details including name, email, and company.

Operation
Read read
Schema command
kosmo integrations:schema keap.keap_list_contacts --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
limit integer no Number of contacts per page (default: 20, max: 200).

keap.keap_get_contact

Retrieve a single Keap contact by ID. Returns full contact details including email addresses, phone numbers, and tags.

Operation
Read read
Schema command
kosmo integrations:schema keap.keap_get_contact --json
ParameterTypeRequiredDescription
id integer yes The Keap contact ID.

keap.keap_create_contact

Create a new contact in Keap CRM. Provide at least a first name or last name. Email and company name are optional.

Operation
Write write
Schema command
kosmo integrations:schema keap.keap_create_contact --json
ParameterTypeRequiredDescription
first_name string no First name of the contact.
last_name string no Last name of the contact.
email string no Primary email address for the contact.
company_name string no Company name to associate with the contact.

keap.keap_list_opportunities

List sales opportunities from Keap CRM. Optionally filter by pipeline stage. Returns paginated results with opportunity details.

Operation
Read read
Schema command
kosmo integrations:schema keap.keap_list_opportunities --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
limit integer no Number of opportunities per page (default: 20, max: 200).
stage string no Filter by opportunity stage (e.g., "New", "Appointment Scheduled", "Closed Won", "Closed Lost").

keap.keap_get_opportunity

Retrieve a single Keap sales opportunity by ID. Returns full details including contact, stage, value, and notes.

Operation
Read read
Schema command
kosmo integrations:schema keap.keap_get_opportunity --json
ParameterTypeRequiredDescription
id integer yes The Keap opportunity ID.

keap.keap_list_tags

List all tags in Keap. Tags are used to categorize contacts and trigger automations.

Operation
Read read
Schema command
kosmo integrations:schema keap.keap_list_tags --json
ParameterTypeRequiredDescription
No parameters.

keap.keap_get_current_user

Get the currently authenticated Keap user. Returns profile information for the user associated with the access token.

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