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 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.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
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.
kosmo integrations:call gorgias.gorgias_list_tickets '{"page":1,"limit":1,"status":"example_status","q":"example_q"}' --json 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.
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 - Parameters
- page, limit, status, q
kosmo integrations:call gorgias.gorgias_list_tickets '{"page":1,"limit":1,"status":"example_status","q":"example_q"}' --json 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 - Parameters
- id
kosmo integrations:call gorgias.gorgias_get_ticket '{"id":"example_id"}' --json 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 - Parameters
- subject, body, from_email, to_email, channel, priority
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 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 - Parameters
- page, limit, q
kosmo integrations:call gorgias.gorgias_list_customers '{"page":1,"limit":1,"q":"example_q"}' --json 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 - Parameters
- id
kosmo integrations:call gorgias.gorgias_get_customer '{"id":"example_id"}' --json 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 - Parameters
- page, limit, ticket_id
kosmo integrations:call gorgias.gorgias_list_satisfaction_surveys '{"page":1,"limit":1,"ticket_id":"example_ticket_id"}' --json 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 - Parameters
- none
kosmo integrations:call gorgias.gorgias_get_current_user '{}' --json 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
kosmo integrations:schema gorgias.gorgias_list_tickets --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema gorgias.gorgias_get_ticket --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The ticket ID. |
gorgias.gorgias_create_ticket 6 parameters
kosmo integrations:schema gorgias.gorgias_create_ticket --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema gorgias.gorgias_list_customers --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema gorgias.gorgias_get_customer --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The customer ID. |
gorgias.gorgias_list_satisfaction_surveys 3 parameters
kosmo integrations:schema gorgias.gorgias_list_satisfaction_surveys --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema gorgias.gorgias_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.