KosmoKrator

productivity

Gorgias CLI for AI Agents

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

Gorgias CLI Setup

Gorgias can be configured headlessly with `kosmokrator integrations:configure gorgias`.

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 gorgias --set access_token="$GORGIAS_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor gorgias --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
access_token GORGIAS_ACCESS_TOKEN Secret secret yes API Token
url GORGIAS_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 gorgias.gorgias_list_tickets '{"page":1,"limit":1,"status":"example_status","q":"example_q"}' --json
Provider shortcut
kosmo integrations:gorgias gorgias_list_tickets '{"page":1,"limit":1,"status":"example_status","q":"example_q"}' --json

Discovery

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

Discovery commands
kosmo integrations:docs gorgias --json
kosmo integrations:docs gorgias.gorgias_list_tickets --json
kosmo integrations:schema gorgias.gorgias_list_tickets --json
kosmo integrations:search "Gorgias" --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.

gorgias.gorgias_list_tickets

List and search support tickets in Gorgias. Filter by status or search by keyword. Returns paginated results with ticket IDs, subjects, and metadata.

Read read
Parameters
page, limit, status, q
Generic call
kosmo integrations:call gorgias.gorgias_list_tickets '{"page":1,"limit":1,"status":"example_status","q":"example_q"}' --json
Shortcut
kosmo integrations:gorgias gorgias_list_tickets '{"page":1,"limit":1,"status":"example_status","q":"example_q"}' --json

gorgias.gorgias_get_ticket

Get details of a specific Gorgias ticket by ID, including subject, body, status, assignee, and customer information.

Read read
Parameters
id
Generic call
kosmo integrations:call gorgias.gorgias_get_ticket '{"id":"example_id"}' --json
Shortcut
kosmo integrations:gorgias gorgias_get_ticket '{"id":"example_id"}' --json

gorgias.gorgias_create_ticket

Create a new support ticket in Gorgias with a subject and body. Optionally specify sender, recipient, channel, and priority.

Write write
Parameters
subject, body, from_email, to_email, channel, priority
Generic call
kosmo integrations:call gorgias.gorgias_create_ticket '{"subject":"example_subject","body":"example_body","from_email":"example_from_email","to_email":"example_to_email","channel":"example_channel","priority":"example_priority"}' --json
Shortcut
kosmo integrations:gorgias gorgias_create_ticket '{"subject":"example_subject","body":"example_body","from_email":"example_from_email","to_email":"example_to_email","channel":"example_channel","priority":"example_priority"}' --json

gorgias.gorgias_list_customers

List and search customers in Gorgias. Filter by search query covering name, email, and other fields. Returns paginated results.

Read read
Parameters
page, limit, q
Generic call
kosmo integrations:call gorgias.gorgias_list_customers '{"page":1,"limit":1,"q":"example_q"}' --json
Shortcut
kosmo integrations:gorgias gorgias_list_customers '{"page":1,"limit":1,"q":"example_q"}' --json

gorgias.gorgias_get_customer

Get details of a specific Gorgias customer by ID, including name, email, and custom fields.

Read read
Parameters
id
Generic call
kosmo integrations:call gorgias.gorgias_get_customer '{"id":"example_id"}' --json
Shortcut
kosmo integrations:gorgias gorgias_get_customer '{"id":"example_id"}' --json

gorgias.gorgias_list_satisfaction_surveys

List satisfaction survey responses in Gorgias. Optionally filter by ticket ID. Returns paginated results with ratings and feedback.

Read read
Parameters
page, limit, ticket_id
Generic call
kosmo integrations:call gorgias.gorgias_list_satisfaction_surveys '{"page":1,"limit":1,"ticket_id":"example_ticket_id"}' --json
Shortcut
kosmo integrations:gorgias gorgias_list_satisfaction_surveys '{"page":1,"limit":1,"ticket_id":"example_ticket_id"}' --json

gorgias.gorgias_get_current_user

Get the profile of the currently authenticated Gorgias user. Returns name, email, and account details.

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

Function Schemas

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

gorgias.gorgias_list_tickets 4 parameters
Schema command
kosmo integrations:schema gorgias.gorgias_list_tickets --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (1-based).
limit integer no Number of tickets per page (max 100).
status string no Filter by ticket status: open, closed, spam.
q string no Search query to filter tickets by subject, content, or customer.
gorgias.gorgias_get_ticket 1 parameters
Schema command
kosmo integrations:schema gorgias.gorgias_get_ticket --json
ParameterTypeRequiredDescription
id string yes The ticket ID.
gorgias.gorgias_create_ticket 6 parameters
Schema command
kosmo integrations:schema gorgias.gorgias_create_ticket --json
ParameterTypeRequiredDescription
subject string yes Ticket subject line.
body string yes Ticket body / message content (HTML supported).
from_email string no Sender email address.
to_email string no Recipient email address.
channel string no Ticket channel: email, chat, facebook, instagram, etc.
priority string no Ticket priority: normal, urgent, high, low.
gorgias.gorgias_list_customers 3 parameters
Schema command
kosmo integrations:schema gorgias.gorgias_list_customers --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (1-based).
limit integer no Number of customers per page (max 100).
q string no Search query (name, email, etc.).
gorgias.gorgias_get_customer 1 parameters
Schema command
kosmo integrations:schema gorgias.gorgias_get_customer --json
ParameterTypeRequiredDescription
id string yes The customer ID.
gorgias.gorgias_list_satisfaction_surveys 3 parameters
Schema command
kosmo integrations:schema gorgias.gorgias_list_satisfaction_surveys --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (1-based).
limit integer no Number of surveys per page (max 100).
ticket_id string no Filter surveys by ticket ID.
gorgias.gorgias_get_current_user 0 parameters
Schema command
kosmo integrations:schema gorgias.gorgias_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.