productivity
Lemlist CLI for AI Agents
Use the Lemlist CLI from KosmoKrator to call Lemlist tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Lemlist CLI Setup
Lemlist can be configured headlessly with `kosmokrator integrations:configure lemlist`.
# 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 lemlist --set username="$LEMLIST_USERNAME" --set password="$LEMLIST_PASSWORD" --enable --read allow --write ask --json
kosmokrator integrations:doctor lemlist --json
kosmokrator integrations:status --json Credentials
Authentication type: Username and password basic. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
username | LEMLIST_USERNAME | Text string | yes | Username |
password | LEMLIST_PASSWORD | Secret secret | yes | API Key / Password |
url | LEMLIST_URL | URL url | no | API URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call lemlist.lemlist_list_campaigns '{"status":"example_status","limit":1,"offset":1}' --json kosmo integrations:lemlist lemlist_list_campaigns '{"status":"example_status","limit":1,"offset":1}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs lemlist --json
kosmo integrations:docs lemlist.lemlist_list_campaigns --json
kosmo integrations:schema lemlist.lemlist_list_campaigns --json
kosmo integrations:search "Lemlist" --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.
lemlist.lemlist_list_campaigns
List all outreach campaigns in Lemlist. Returns campaign IDs, names, statuses, and other metadata.
read - Parameters
- status, limit, offset
kosmo integrations:call lemlist.lemlist_list_campaigns '{"status":"example_status","limit":1,"offset":1}' --json kosmo integrations:lemlist lemlist_list_campaigns '{"status":"example_status","limit":1,"offset":1}' --json lemlist.lemlist_get_campaign
Get details of a specific Lemlist campaign by ID. Returns the full campaign configuration and statistics.
read - Parameters
- campaign_id
kosmo integrations:call lemlist.lemlist_get_campaign '{"campaign_id":"example_campaign_id"}' --json kosmo integrations:lemlist lemlist_get_campaign '{"campaign_id":"example_campaign_id"}' --json lemlist.lemlist_list_leads
List leads in a specific Lemlist campaign. Returns lead contact information, email status, and campaign progress.
read - Parameters
- campaign_id, status, limit, offset
kosmo integrations:call lemlist.lemlist_list_leads '{"campaign_id":"example_campaign_id","status":"example_status","limit":1,"offset":1}' --json kosmo integrations:lemlist lemlist_list_leads '{"campaign_id":"example_campaign_id","status":"example_status","limit":1,"offset":1}' --json lemlist.lemlist_add_lead
Add a lead to a Lemlist campaign. The lead will be queued for outreach according to the campaign schedule.
write - Parameters
- campaign_id, email, firstName, lastName, companyName, phone, linkedinUrl, variables
kosmo integrations:call lemlist.lemlist_add_lead '{"campaign_id":"example_campaign_id","email":"example_email","firstName":"example_firstName","lastName":"example_lastName","companyName":"example_companyName","phone":"example_phone","linkedinUrl":"example_linkedinUrl","variables":"example_variables"}' --json kosmo integrations:lemlist lemlist_add_lead '{"campaign_id":"example_campaign_id","email":"example_email","firstName":"example_firstName","lastName":"example_lastName","companyName":"example_companyName","phone":"example_phone","linkedinUrl":"example_linkedinUrl","variables":"example_variables"}' --json lemlist.lemlist_list_teams
List all teams in the Lemlist account. Returns team names, member lists, and configuration.
read - Parameters
- none
kosmo integrations:call lemlist.lemlist_list_teams '{}' --json kosmo integrations:lemlist lemlist_list_teams '{}' --json lemlist.lemlist_list_subaccounts
List all sub-accounts in Lemlist. Returns sub-account names, statuses, and usage details.
read - Parameters
- none
kosmo integrations:call lemlist.lemlist_list_subaccounts '{}' --json kosmo integrations:lemlist lemlist_list_subaccounts '{}' --json lemlist.lemlist_get_current_user
Get the profile of the currently authenticated Lemlist user. Returns name, email, plan, and account details.
read - Parameters
- none
kosmo integrations:call lemlist.lemlist_get_current_user '{}' --json kosmo integrations:lemlist lemlist_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
lemlist.lemlist_list_campaigns 3 parameters
kosmo integrations:schema lemlist.lemlist_list_campaigns --json | Parameter | Type | Required | Description |
|---|---|---|---|
status | string | no | Filter by campaign status (e.g. "active", "draft", "paused", "completed"). |
limit | integer | no | Maximum number of campaigns to return. |
offset | integer | no | Number of campaigns to skip for pagination. |
lemlist.lemlist_get_campaign 1 parameters
kosmo integrations:schema lemlist.lemlist_get_campaign --json | Parameter | Type | Required | Description |
|---|---|---|---|
campaign_id | string | yes | The ID of the campaign to retrieve. |
lemlist.lemlist_list_leads 4 parameters
kosmo integrations:schema lemlist.lemlist_list_leads --json | Parameter | Type | Required | Description |
|---|---|---|---|
campaign_id | string | yes | The ID of the campaign to list leads for. |
status | string | no | Filter by lead status (e.g. "interested", "notInterested", "bounced", "sent", "replied"). |
limit | integer | no | Maximum number of leads to return. |
offset | integer | no | Number of leads to skip for pagination. |
lemlist.lemlist_add_lead 8 parameters
kosmo integrations:schema lemlist.lemlist_add_lead --json | Parameter | Type | Required | Description |
|---|---|---|---|
campaign_id | string | yes | The ID of the campaign to add the lead to. |
email | string | yes | The lead's email address. |
firstName | string | no | The lead's first name. |
lastName | string | no | The lead's last name. |
companyName | string | no | The lead's company name. |
phone | string | no | The lead's phone number. |
linkedinUrl | string | no | The lead's LinkedIn profile URL. |
variables | object | no | Custom variables to use in campaign templates (key-value pairs). |
lemlist.lemlist_list_teams 0 parameters
kosmo integrations:schema lemlist.lemlist_list_teams --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
lemlist.lemlist_list_subaccounts 0 parameters
kosmo integrations:schema lemlist.lemlist_list_subaccounts --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
lemlist.lemlist_get_current_user 0 parameters
kosmo integrations:schema lemlist.lemlist_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| 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.