KosmoKrator

crm

Close CRM CLI for AI Agents

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

9 functions 5 read 4 write API key auth

Close CRM CLI Setup

Close CRM can be configured headlessly with `kosmokrator integrations:configure close`.

# 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 close --set api_key="$CLOSE_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor close --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 CLOSE_API_KEY Secret secret yes API Key
url CLOSE_URL URL url no API Base URL

Call Close CRM Headlessly

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

kosmo integrations:call close.close_list_leads '{
  "query": "example_query",
  "limit": 1,
  "skip": 1
}' --json

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

kosmo integrations:close close_list_leads '{
  "query": "example_query",
  "limit": 1,
  "skip": 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 close --json
kosmo integrations:docs close.close_list_leads --json
kosmo integrations:schema close.close_list_leads --json
kosmo integrations:search "Close CRM" --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 Close CRM.

close.close_list_leads

Read read

Search and list leads in Close CRM. Use the query parameter with Close search syntax to filter leads by name, status, custom fields, dates, and more. Returns a paginated list of leads with their contacts and addresses.

Parameters
query, limit, skip

Generic CLI call

kosmo integrations:call close.close_list_leads '{"query":"example_query","limit":1,"skip":1}' --json

Provider shortcut

kosmo integrations:close close_list_leads '{"query":"example_query","limit":1,"skip":1}' --json

close.close_get_lead

Read read

Get full details for a single lead in Close CRM, including contacts, addresses, custom fields, and associated information.

Parameters
id

Generic CLI call

kosmo integrations:call close.close_get_lead '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:close close_get_lead '{"id":"example_id"}' --json

close.close_create_lead

Write write

Create a new lead in Close CRM. Provide a company name and optionally add contacts with email addresses and phone numbers.

Parameters
name, contacts, url, status_id, custom

Generic CLI call

kosmo integrations:call close.close_create_lead '{"name":"example_name","contacts":"example_contacts","url":"example_url","status_id":"example_status_id","custom":"example_custom"}' --json

Provider shortcut

kosmo integrations:close close_create_lead '{"name":"example_name","contacts":"example_contacts","url":"example_url","status_id":"example_status_id","custom":"example_custom"}' --json

close.close_update_lead

Write write

Update an existing lead in Close CRM. Provide the lead ID and the fields to update (name, status, custom fields, URL, etc.).

Parameters
id, name, status_id, url, custom

Generic CLI call

kosmo integrations:call close.close_update_lead '{"id":"example_id","name":"example_name","status_id":"example_status_id","url":"example_url","custom":"example_custom"}' --json

Provider shortcut

kosmo integrations:close close_update_lead '{"id":"example_id","name":"example_name","status_id":"example_status_id","url":"example_url","custom":"example_custom"}' --json

close.close_delete_lead

Write write

Permanently delete a lead from Close CRM. This removes the lead and all associated contacts, activities, and tasks.

Parameters
id

Generic CLI call

kosmo integrations:call close.close_delete_lead '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:close close_delete_lead '{"id":"example_id"}' --json

close.close_list_contacts

Read read

List contacts in Close CRM. Optionally filter by lead ID to get contacts for a specific lead. Supports pagination.

Parameters
lead_id, limit, skip

Generic CLI call

kosmo integrations:call close.close_list_contacts '{"lead_id":"example_lead_id","limit":1,"skip":1}' --json

Provider shortcut

kosmo integrations:close close_list_contacts '{"lead_id":"example_lead_id","limit":1,"skip":1}' --json

close.close_list_activities

Read read

List activities in Close CRM — emails, calls, notes, and other activity types. Filter by lead ID or activity type. Supports pagination.

Parameters
lead_id, type, limit, skip

Generic CLI call

kosmo integrations:call close.close_list_activities '{"lead_id":"example_lead_id","type":"example_type","limit":1,"skip":1}' --json

Provider shortcut

kosmo integrations:close close_list_activities '{"lead_id":"example_lead_id","type":"example_type","limit":1,"skip":1}' --json

close.close_create_task

Write write

Create a new task in Close CRM. Optionally associate it with a lead, assign it to a user, and set a due date.

Parameters
text, lead_id, assignee_id, due_date, is_complete

Generic CLI call

kosmo integrations:call close.close_create_task '{"text":"example_text","lead_id":"example_lead_id","assignee_id":"example_assignee_id","due_date":"example_due_date","is_complete":true}' --json

Provider shortcut

kosmo integrations:close close_create_task '{"text":"example_text","lead_id":"example_lead_id","assignee_id":"example_assignee_id","due_date":"example_due_date","is_complete":true}' --json

close.close_get_current_user

Read read

Get the profile of the currently authenticated Close CRM user — name, email, organization, and other account details.

Parameters
none

Generic CLI call

kosmo integrations:call close.close_get_current_user '{}' --json

Provider shortcut

kosmo integrations:close close_get_current_user '{}' --json

Function Schemas

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

close.close_list_leads

Search and list leads in Close CRM. Use the query parameter with Close search syntax to filter leads by name, status, custom fields, dates, and more. Returns a paginated list of leads with their contacts and addresses.

Operation
Read read
Schema command
kosmo integrations:schema close.close_list_leads --json
ParameterTypeRequiredDescription
query string no Search query using Close syntax. Examples: "Acme", "status:Potential", "name:Acme AND status:Qualified". Omit to list all leads.
limit integer no Maximum number of leads to return (default: 25, max: 100).
skip integer no Number of records to skip for pagination.

close.close_get_lead

Get full details for a single lead in Close CRM, including contacts, addresses, custom fields, and associated information.

Operation
Read read
Schema command
kosmo integrations:schema close.close_get_lead --json
ParameterTypeRequiredDescription
id string yes The lead ID (e.g., "lead_abc123XYZ").

close.close_create_lead

Create a new lead in Close CRM. Provide a company name and optionally add contacts with email addresses and phone numbers.

Operation
Write write
Schema command
kosmo integrations:schema close.close_create_lead --json
ParameterTypeRequiredDescription
name string yes Company or lead name.
contacts array no Array of contact objects. Each contact can have "name" (string), "emails" (array of objects with "email" and optional "type"), and "phones" (array of objects with "phone" and optional "type").
url string no Company website URL.
status_id string no Status ID to assign (omit for default status).
custom object no Custom field values as an object (e.g., {"Industry": "SaaS"}).

close.close_update_lead

Update an existing lead in Close CRM. Provide the lead ID and the fields to update (name, status, custom fields, URL, etc.).

Operation
Write write
Schema command
kosmo integrations:schema close.close_update_lead --json
ParameterTypeRequiredDescription
id string yes The lead ID to update (e.g., "lead_abc123XYZ").
name string no New company or lead name.
status_id string no New status ID to assign.
url string no New company website URL.
custom object no Updated custom field values as an object (e.g., {"Industry": "SaaS"}).

close.close_delete_lead

Permanently delete a lead from Close CRM. This removes the lead and all associated contacts, activities, and tasks.

Operation
Write write
Schema command
kosmo integrations:schema close.close_delete_lead --json
ParameterTypeRequiredDescription
id string yes The lead ID to delete (e.g., "lead_abc123XYZ").

close.close_list_contacts

List contacts in Close CRM. Optionally filter by lead ID to get contacts for a specific lead. Supports pagination.

Operation
Read read
Schema command
kosmo integrations:schema close.close_list_contacts --json
ParameterTypeRequiredDescription
lead_id string no Filter contacts by lead ID (e.g., "lead_abc123XYZ").
limit integer no Maximum number of contacts to return (default: 25, max: 100).
skip integer no Number of records to skip for pagination.

close.close_list_activities

List activities in Close CRM — emails, calls, notes, and other activity types. Filter by lead ID or activity type. Supports pagination.

Operation
Read read
Schema command
kosmo integrations:schema close.close_list_activities --json
ParameterTypeRequiredDescription
lead_id string no Filter activities by lead ID (e.g., "lead_abc123XYZ").
type string no Activity type filter. Common values: "email", "call", "note", "sms", "meeting".
limit integer no Maximum number of activities to return (default: 25, max: 100).
skip integer no Number of records to skip for pagination.

close.close_create_task

Create a new task in Close CRM. Optionally associate it with a lead, assign it to a user, and set a due date.

Operation
Write write
Schema command
kosmo integrations:schema close.close_create_task --json
ParameterTypeRequiredDescription
text string yes The task description or body text.
lead_id string no Associate this task with a lead (e.g., "lead_abc123XYZ").
assignee_id string no User ID to assign the task to (e.g., "user_abc123XYZ").
due_date string no Due date in ISO 8601 format (e.g., "2026-04-15").
is_complete boolean no Whether the task is already completed (default: false).

close.close_get_current_user

Get the profile of the currently authenticated Close CRM user — name, email, organization, and other account details.

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