canonical: https://jentic.com/apis/gorgias.com/gorgias-gorgias-api

# Gorgias REST API

Jentic publishes the only available OpenAPI specification for Gorgias REST API, keeping it validated and agent-ready. This is the comprehensive Gorgias REST surface, exposing 111 endpoints across tickets, customers, custom fields, integrations, events, jobs, statistics, satisfaction surveys, voice, rules, and account settings. It uses HTTP Basic auth scoped to the merchant Gorgias subdomain. Where the lighter Gorgias spec covers core helpdesk objects, this spec also reaches reporting, automation rules, custom data, and survey workflows.

## For AI agents

Drive deep Gorgias helpdesk automation across tickets, custom fields, rules, satisfaction surveys, voice, statistics, and integrations.

## Scope

Does not handle order management, fulfillment, or marketing email - use for Gorgias helpdesk operations, custom data, and reporting only.

## Capabilities

- Create, update, and search support tickets across email, chat, voice, and social channels
- Define and populate custom fields on tickets and customers for bespoke data models
- Manage automation rules that trigger replies, tags, and assignments by condition
- Pull satisfaction survey responses and aggregate scores per agent or team
- Inspect background jobs to monitor bulk operations and integration health
- Stream account events for downstream analytics or audit pipelines
- Retrieve helpdesk statistics including volume, response time, and resolution time

## Use cases

### Custom Data Modeling on Tickets

Extend the helpdesk with merchant-specific attributes such as order channel, fulfillment center, or membership tier by defining custom fields and populating them via /api/customers/{customer_id}/custom-fields and /api/tickets/{ticket_id}/custom-fields. Reporting and rules can then segment on these values, keeping support workflows aligned with the merchant's data model.

Example prompt: Set the custom field 'order_channel' to 'wholesale' on ticket 1234567 and verify the value persists by GETting /api/tickets/1234567/custom-fields.

### Automation Rule Operations

Programmatically manage Gorgias automation rules by listing, enabling, or disabling specific rules during deploys or seasonal campaigns. Combined with a CI pipeline, the merchant can guarantee the right macros and tags trigger during Black Friday without manual toggling in the dashboard.

Example prompt: Disable rule id 4321 ('weekend-auto-reply') on Friday at 17:00 and re-enable it on Monday at 09:00 via the Gorgias rules endpoints.

### Satisfaction Reporting Pipeline

Pull satisfaction survey responses on a daily schedule, join with agent identifiers, and load the result into the merchant's BI warehouse for trend reporting. The 111-endpoint surface covers surveys, scores, and statistics so reporting does not need a separate analytics provider for first-party support data.

Example prompt: Fetch satisfaction survey responses for the prior 7 days, group by user_id, and load the average score per agent into the warehouse table support_csat_daily.

### AI Agent Full-Stack Helpdesk Control

An AI agent monitors a high-volume helpdesk by combining tickets, custom fields, rules, and statistics endpoints. Through Jentic, the agent searches by intent, picks the right operation from the 111 available, and acts with credentials it never sees. This spec is suited to comprehensive automation rather than single-task bots.

Example prompt: When response time on team id 7 exceeds 4 hours, post a Slack alert and tag the oldest 5 unanswered tickets with 'sla-risk' via the Gorgias tags endpoint.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /api/account | Retrieve account info |
| GET | /api/customers | List or search customers |
| GET | /api/customers/{id} | Retrieve a customer by id |
| GET | /api/customers/{customer_id}/custom-fields | List custom field values for a customer |
| GET | /api/custom-fields | List custom field definitions |
| GET | /api/integrations | List installed integrations |
| GET | /api/events | List account events |
| GET | /api/account/settings | Retrieve account settings |

## Key resources

- **Tickets** — Full lifecycle CRUD on support tickets across all channels
- **Customers** — Customers, merging, custom fields, and customer data
- **Custom Fields** — Define and populate bespoke fields on tickets and customers
- **Rules** — List, get, and toggle automation rules
- **Satisfaction Surveys** — Retrieve responses and aggregate CSAT scores
- **Statistics** — Helpdesk volume, response time, and resolution metrics
- **Integrations and Events** — Inspect installed integrations and stream events

## Why Jentic

- **Setup:** Wiring the Gorgias REST API by hand means setting up basic auth with the merchant email and API key, resolving the {domain}.gorgias.com host per account, and matching calls across its wide resource surface. Through Jentic you install once, import the Gorgias REST API from the API Directory, store the email and key once, and your agent calls it.
- **Permission scoping:** The Gorgias REST API puts the customer id in the URL path (/api/customers/{id}/custom-fields), so a rule can pin your agent to one customer: it can read that customer and their custom fields and nothing else. You choose the operations it may call, so account settings or integration changes are not included unless you add them.
- **Credential handling:** Your Gorgias merchant email and API key are stored once, encrypted, by your own Jentic One instance and injected at execution time as the basic auth header. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'look up a customer's custom fields' or 'list account events', and Jentic returns the matching Gorgias operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Zendesk Support** — Enterprise helpdesk with deeper reporting and broad channel coverage
- **Freshdesk** — Mid-market helpdesk with omnichannel and automation tooling
- **Intercom** — Conversational messaging that pairs with helpdesk ticketing

## FAQ

### Why is there no official OpenAPI spec for Gorgias REST API?

Gorgias does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Gorgias REST API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Gorgias REST API use?

HTTP Basic with the merchant email as username and an API key from Gorgias settings as password. The base URL is scoped to the merchant subdomain (https://{domain}.gorgias.com). Jentic stores both values in the vault and injects the header at execution time.

### How do I set a custom field on a Gorgias ticket?

First define the field via /api/custom-fields if it does not yet exist. Then PUT or POST against /api/customers/{customer_id}/custom-fields/{id} or the equivalent ticket endpoint with the new value. Subsequent GETs return the populated field on the resource.

### Can I pull satisfaction survey data from the Gorgias REST API?

Yes. The surveys and statistics endpoints expose individual responses and aggregate scores by agent, team, and time window, suitable for daily exports into a BI warehouse or weekly review reports.

### How do I integrate the Gorgias REST API with an AI agent through Jentic?

Run pip install jentic, search 'create a gorgias ticket' or 'list satisfaction surveys', load the schema for the chosen endpoint, and execute. Jentic handles the Basic auth header from the vault. Get started with Jentic One, the self-hosted execution layer.

### Can I limit what my agent is allowed to do with the Gorgias REST API?

Yes. Because you run Jentic One yourself, your own rules decide which Gorgias operations and credentials the agent may use, and it can only call the endpoints you approve. Since the Gorgias REST API carries the customer id in the URL path, such as /api/customers/{id}/custom-fields, you can pin the agent to a single customer so it reads only that record and their custom fields. Operations like account settings or integration changes stay off limits unless you explicitly grant them.
