sales
Freshsales CLI for Headless Automation
Use the Freshsales CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write API key auth
Freshsales CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The Freshsales CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Freshsales CLI for Headless Automation
kosmokrator integrations:configure freshsales --set api_key="$FRESHSALES_API_KEY" --set domain="$FRESHSALES_DOMAIN" --enable --read allow --write ask --json
kosmo integrations:call freshsales.freshsales_create_contact '{"first_name":"example_first_name","last_name":"example_last_name","email":"example_email","mobile_number":"example_mobile_number"}' --json Discovery Before Execution
Agents and scripts can inspect Freshsales docs and schemas before choosing a function.
kosmo integrations:docs freshsales --json
kosmo integrations:docs freshsales.freshsales_create_contact --json
kosmo integrations:schema freshsales.freshsales_create_contact --json
kosmo integrations:search "Freshsales" --json
kosmo integrations:list --json Useful Freshsales CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
freshsales.freshsales_create_contact | Write | first_name, last_name, email, mobile_number | Create a new contact in Freshsales CRM with name, email, and phone details. |
freshsales.freshsales_get_contact | Read | id | Get full details for a specific Freshsales contact by ID. |
freshsales.freshsales_get_current_user | Read | none | Get the profile of the currently authenticated Freshsales user. Useful for verifying the API connection. |
freshsales.freshsales_get_deal | Read | id | Get full details for a specific Freshsales deal by ID. |
freshsales.freshsales_list_accounts | Read | page, per_page | List sales accounts (companies) from Freshsales CRM. Returns paginated results. |
freshsales.freshsales_list_contacts | Read | page, per_page, sort, sort_by | List contacts from Freshsales CRM. Returns paginated results with optional sorting by field and direction. |
freshsales.freshsales_list_deals | Read | page, per_page | List deals from Freshsales CRM. Returns paginated results showing deal pipeline information. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.