KosmoKrator

productivity

Zendesk CLI for AI Agents

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

Zendesk CLI Setup

Zendesk can be configured headlessly with `kosmokrator integrations:configure zendesk`.

Install, configure, and verify
# 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 zendesk --set access_token="$ZENDESK_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor zendesk --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.

KeyEnv varTypeRequiredLabel
access_token ZENDESK_ACCESS_TOKEN Secret secret yes Access Token
base_url ZENDESK_BASE_URL URL url no API Base URL

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call zendesk.zendesk_create_ticket '{"subject":"example_subject","description":"example_description","priority":"example_priority","type":"example_type","status":"example_status","assignee_id":"example_assignee_id","tags":"example_tags"}' --json
Provider shortcut
kosmo integrations:zendesk zendesk_create_ticket '{"subject":"example_subject","description":"example_description","priority":"example_priority","type":"example_type","status":"example_status","assignee_id":"example_assignee_id","tags":"example_tags"}' --json

Discovery

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

Discovery commands
kosmo integrations:docs zendesk --json
kosmo integrations:docs zendesk.zendesk_create_ticket --json
kosmo integrations:schema zendesk.zendesk_create_ticket --json
kosmo integrations:search "Zendesk" --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.

zendesk.zendesk_create_ticket

Create a new ticket in Zendesk. Requires a subject and description. Optionally set priority, type, status, and assignee. Returns the created ticket with its ID.

Write write
Parameters
subject, description, priority, type, status, assignee_id, tags
Generic call
kosmo integrations:call zendesk.zendesk_create_ticket '{"subject":"example_subject","description":"example_description","priority":"example_priority","type":"example_type","status":"example_status","assignee_id":"example_assignee_id","tags":"example_tags"}' --json
Shortcut
kosmo integrations:zendesk zendesk_create_ticket '{"subject":"example_subject","description":"example_description","priority":"example_priority","type":"example_type","status":"example_status","assignee_id":"example_assignee_id","tags":"example_tags"}' --json

zendesk.zendesk_get_current_user

Retrieve the currently authenticated Zendesk user. Returns the user's ID, name, email, role, and avatar. Useful for identifying which account or token is in use.

Read read
Parameters
none
Generic call
kosmo integrations:call zendesk.zendesk_get_current_user '{}' --json
Shortcut
kosmo integrations:zendesk zendesk_get_current_user '{}' --json

zendesk.zendesk_get_ticket

Retrieve a Zendesk ticket by its ID. Returns the full ticket including subject, description, status, priority, and metadata.

Read read
Parameters
ticket_id
Generic call
kosmo integrations:call zendesk.zendesk_get_ticket '{"ticket_id":"example_ticket_id"}' --json
Shortcut
kosmo integrations:zendesk zendesk_get_ticket '{"ticket_id":"example_ticket_id"}' --json

zendesk.zendesk_get_user

Retrieve a Zendesk user by its ID. Returns the user's ID, name, email, role, and profile details.

Read read
Parameters
user_id
Generic call
kosmo integrations:call zendesk.zendesk_get_user '{"user_id":"example_user_id"}' --json
Shortcut
kosmo integrations:zendesk zendesk_get_user '{"user_id":"example_user_id"}' --json

zendesk.zendesk_list_organizations

List Zendesk organizations with pagination. Returns organization IDs, names, and created dates. Use per_page and page for pagination.

Read read
Parameters
per_page, page
Generic call
kosmo integrations:call zendesk.zendesk_list_organizations '{"per_page":1,"page":1}' --json
Shortcut
kosmo integrations:zendesk zendesk_list_organizations '{"per_page":1,"page":1}' --json

zendesk.zendesk_list_tickets

List Zendesk tickets with pagination and filtering. Returns ticket IDs, subjects, status, priority, and created dates. Use per_page, page, and status for pagination and filtering.

Read read
Parameters
per_page, page, sort_by, sort_order, status
Generic call
kosmo integrations:call zendesk.zendesk_list_tickets '{"per_page":1,"page":1,"sort_by":"example_sort_by","sort_order":"example_sort_order","status":"example_status"}' --json
Shortcut
kosmo integrations:zendesk zendesk_list_tickets '{"per_page":1,"page":1,"sort_by":"example_sort_by","sort_order":"example_sort_order","status":"example_status"}' --json

zendesk.zendesk_list_users

List Zendesk users with pagination and filtering. Returns user IDs, names, emails, and roles. Use per_page, page, and role for pagination and filtering.

Read read
Parameters
per_page, page, role, sort_by, sort_order
Generic call
kosmo integrations:call zendesk.zendesk_list_users '{"per_page":1,"page":1,"role":"example_role","sort_by":"example_sort_by","sort_order":"example_sort_order"}' --json
Shortcut
kosmo integrations:zendesk zendesk_list_users '{"per_page":1,"page":1,"role":"example_role","sort_by":"example_sort_by","sort_order":"example_sort_order"}' --json

Function Schemas

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

zendesk.zendesk_create_ticket 7 parameters
Schema command
kosmo integrations:schema zendesk.zendesk_create_ticket --json
ParameterTypeRequiredDescription
subject string yes Subject of the ticket.
description string yes Initial description/body of the ticket.
priority string no Ticket priority: "urgent", "high", "normal", "low".
type string no Ticket type: "problem", "incident", "question", "task".
status string no Initial status: "new", "open", "pending", "hold" (default: "new").
assignee_id string no ID of the agent to assign the ticket to.
tags array no Array of tags to apply to the ticket.
zendesk.zendesk_get_current_user 0 parameters
Schema command
kosmo integrations:schema zendesk.zendesk_get_current_user --json
ParameterTypeRequiredDescription
No parameters.
zendesk.zendesk_get_ticket 1 parameters
Schema command
kosmo integrations:schema zendesk.zendesk_get_ticket --json
ParameterTypeRequiredDescription
ticket_id string yes Zendesk ticket ID.
zendesk.zendesk_get_user 1 parameters
Schema command
kosmo integrations:schema zendesk.zendesk_get_user --json
ParameterTypeRequiredDescription
user_id string yes Zendesk user ID.
zendesk.zendesk_list_organizations 2 parameters
Schema command
kosmo integrations:schema zendesk.zendesk_list_organizations --json
ParameterTypeRequiredDescription
per_page integer no Number of organizations per page (default 100, max 100).
page integer no Page number for pagination (1-indexed).
zendesk.zendesk_list_tickets 5 parameters
Schema command
kosmo integrations:schema zendesk.zendesk_list_tickets --json
ParameterTypeRequiredDescription
per_page integer no Number of tickets per page (default 25, max 100).
page integer no Page number for pagination (1-indexed).
sort_by string no Field to sort by (e.g. "created_at", "updated_at", "priority").
sort_order string no Sort order: "asc" or "desc".
status string no Filter by ticket status: "new", "open", "pending", "hold", "solved", "closed".
zendesk.zendesk_list_users 5 parameters
Schema command
kosmo integrations:schema zendesk.zendesk_list_users --json
ParameterTypeRequiredDescription
per_page integer no Number of users per page (default 100, max 100).
page integer no Page number for pagination (1-indexed).
role string no Filter by role: "end-user", "agent", "admin".
sort_by string no Field to sort by (e.g. "name", "created_at").
sort_order string no Sort order: "asc" or "desc".

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.