productivity
Zendesk Marketing CLI for AI Agents
Use the Zendesk Marketing CLI from KosmoKrator to call Zendesk Marketing tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Zendesk Marketing CLI Setup
Zendesk Marketing can be configured headlessly with `kosmokrator integrations:configure zend`.
# 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 zend --set access_token="$ZEND_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor zend --json
kosmokrator integrations:status --json Credentials
Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
access_token | ZEND_ACCESS_TOKEN | Secret secret | yes | Access Token |
url | ZEND_URL | URL url | no | API Base URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call zend.zend_list_campaigns '{}' --json kosmo integrations:zend zend_list_campaigns '{}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs zend --json
kosmo integrations:docs zend.zend_list_campaigns --json
kosmo integrations:schema zend.zend_list_campaigns --json
kosmo integrations:search "Zendesk Marketing" --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.
zend.zend_list_campaigns
List all email marketing campaigns in your Zendesk account. Returns campaign IDs, subjects, and status.
read - Parameters
- none
kosmo integrations:call zend.zend_list_campaigns '{}' --json kosmo integrations:zend zend_list_campaigns '{}' --json zend.zend_get_campaign
Get detailed information about a specific email marketing campaign, including subject, content, and delivery stats.
read - Parameters
- campaign_id
kosmo integrations:call zend.zend_get_campaign '{"campaign_id":"example_campaign_id"}' --json kosmo integrations:zend zend_get_campaign '{"campaign_id":"example_campaign_id"}' --json zend.zend_create_campaign
Create a new email marketing campaign with subject, content, and target lists.
write - Parameters
- subject, content, list_ids, from_name, from_email
kosmo integrations:call zend.zend_create_campaign '{"subject":"example_subject","content":"example_content","list_ids":"example_list_ids","from_name":"example_from_name","from_email":"example_from_email"}' --json kosmo integrations:zend zend_create_campaign '{"subject":"example_subject","content":"example_content","list_ids":"example_list_ids","from_name":"example_from_name","from_email":"example_from_email"}' --json zend.zend_list_lists
List all subscriber lists in your Zendesk account. Returns list IDs and names.
read - Parameters
- none
kosmo integrations:call zend.zend_list_lists '{}' --json kosmo integrations:zend zend_list_lists '{}' --json zend.zend_get_list
Get detailed information about a specific subscriber list, including subscriber counts and custom fields.
read - Parameters
- list_id
kosmo integrations:call zend.zend_get_list '{"list_id":"example_list_id"}' --json kosmo integrations:zend zend_get_list '{"list_id":"example_list_id"}' --json zend.zend_list_subscribers
List subscribers on a Zendesk list. Returns email addresses, names, and subscription dates.
read - Parameters
- list_id, page, page_size
kosmo integrations:call zend.zend_list_subscribers '{"list_id":"example_list_id","page":1,"page_size":1}' --json kosmo integrations:zend zend_list_subscribers '{"list_id":"example_list_id","page":1,"page_size":1}' --json zend.zend_get_subscribers
Get detailed information about a specific subscriber, including email, name, and subscription status.
read - Parameters
- subscriber_id
kosmo integrations:call zend.zend_get_subscribers '{"subscriber_id":"example_subscriber_id"}' --json kosmo integrations:zend zend_get_subscribers '{"subscriber_id":"example_subscriber_id"}' --json zend.zend_get_current_user
Get the authenticated user's Zendesk account details, including name and email.
read - Parameters
- none
kosmo integrations:call zend.zend_get_current_user '{}' --json kosmo integrations:zend zend_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
zend.zend_list_campaigns 0 parameters
kosmo integrations:schema zend.zend_list_campaigns --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
zend.zend_get_campaign 1 parameters
kosmo integrations:schema zend.zend_get_campaign --json | Parameter | Type | Required | Description |
|---|---|---|---|
campaign_id | string | yes | The campaign ID. |
zend.zend_create_campaign 5 parameters
kosmo integrations:schema zend.zend_create_campaign --json | Parameter | Type | Required | Description |
|---|---|---|---|
subject | string | yes | The campaign email subject line. |
content | string | no | The HTML content of the campaign email. |
list_ids | array | no | Array of subscriber list IDs to target. |
from_name | string | no | The sender name for the campaign. |
from_email | string | no | The sender email address for the campaign. |
zend.zend_list_lists 0 parameters
kosmo integrations:schema zend.zend_list_lists --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
zend.zend_get_list 1 parameters
kosmo integrations:schema zend.zend_get_list --json | Parameter | Type | Required | Description |
|---|---|---|---|
list_id | string | yes | The subscriber list ID. |
zend.zend_list_subscribers 3 parameters
kosmo integrations:schema zend.zend_list_subscribers --json | Parameter | Type | Required | Description |
|---|---|---|---|
list_id | string | no | The subscriber list ID to filter by. |
page | integer | no | Page number for pagination (default: 1). |
page_size | integer | no | Number of subscribers per page (default: 100). |
zend.zend_get_subscribers 1 parameters
kosmo integrations:schema zend.zend_get_subscribers --json | Parameter | Type | Required | Description |
|---|---|---|---|
subscriber_id | string | yes | The subscriber ID. |
zend.zend_get_current_user 0 parameters
kosmo integrations:schema zend.zend_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.