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.

7 functions 6 read 1 write Bearer token auth

Gorgias CLI Setup

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

# 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 use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token GORGIAS_ACCESS_TOKEN Secret secret yes API Token
url GORGIAS_URL URL url no API Base URL

Call Gorgias Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

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

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:gorgias gorgias_list_tickets '{
  "page": 1,
  "limit": 1,
  "status": "example_status",
  "q": "example_q"
}' --json

Agent Discovery Commands

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

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

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Gorgias.

gorgias.gorgias_list_tickets

Read read

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

Parameters
page, limit, status, q

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

gorgias.gorgias_get_ticket

Read read

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

Parameters
id

Generic CLI call

kosmo integrations:call gorgias.gorgias_get_ticket '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:gorgias gorgias_get_ticket '{"id":"example_id"}' --json

gorgias.gorgias_create_ticket

Write write

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

Parameters
subject, body, from_email, to_email, channel, priority

Generic CLI 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

Provider 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

Read read

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

Parameters
page, limit, q

Generic CLI call

kosmo integrations:call gorgias.gorgias_list_customers '{"page":1,"limit":1,"q":"example_q"}' --json

Provider shortcut

kosmo integrations:gorgias gorgias_list_customers '{"page":1,"limit":1,"q":"example_q"}' --json

gorgias.gorgias_get_customer

Read read

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

Parameters
id

Generic CLI call

kosmo integrations:call gorgias.gorgias_get_customer '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:gorgias gorgias_get_customer '{"id":"example_id"}' --json

gorgias.gorgias_list_satisfaction_surveys

Read read

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

Parameters
page, limit, ticket_id

Generic CLI call

kosmo integrations:call gorgias.gorgias_list_satisfaction_surveys '{"page":1,"limit":1,"ticket_id":"example_ticket_id"}' --json

Provider shortcut

kosmo integrations:gorgias gorgias_list_satisfaction_surveys '{"page":1,"limit":1,"ticket_id":"example_ticket_id"}' --json

gorgias.gorgias_get_current_user

Read read

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

Parameters
none

Generic CLI call

kosmo integrations:call gorgias.gorgias_get_current_user '{}' --json

Provider 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

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

Operation
Read read
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

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

Operation
Read read
Schema command
kosmo integrations:schema gorgias.gorgias_get_ticket --json
ParameterTypeRequiredDescription
id string yes The ticket ID.

gorgias.gorgias_create_ticket

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

Operation
Write write
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

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

Operation
Read read
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

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

Operation
Read read
Schema command
kosmo integrations:schema gorgias.gorgias_get_customer --json
ParameterTypeRequiredDescription
id string yes The customer ID.

gorgias.gorgias_list_satisfaction_surveys

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

Operation
Read read
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

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

Operation
Read read
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.