Macha

How to Use the Gorgias API (2026): Auth, Rate Limits, Webhooks and Retention

Abbas, Customer Support & AI, Macha

Written by

Ankeet Guha, Co-founder & CTO, Macha

Reviewed by

Published July 6, 2026

Updated September 24, 2026

The Gorgias REST API sits at your own subdomain, authenticates with HTTP Basic using your account email and an API key, and pages with cursors. Since 8 September 2026 it also returns null for email bodies older than 30 days, so archive jobs built before then need a change.

Key takeaways

  • The Gorgias REST API authenticates with HTTP Basic using the account email and an API key for private apps, while public apps listed for other accounts must use OAuth2.
  • Gorgias rate limits API key integrations to 40 requests in a 20-second window and OAuth2 apps to 80, and Enterprise accounts get the same counts in a 10-second window.
  • Gorgias HTTP integrations time out after 5 seconds, retry up to 3 times at 10, 20 and 40 seconds, and switch off after 500 consecutive failures.
  • Since 8 September 2026, Gorgias archives email message bodies 30 days after sending or receipt and returns null in body_html and body_text when a stripped version exists.
  • Gorgias keeps audit log events for 12 months, so GET /api/events returns only the last year and older event IDs return a 404.
How to Use the Gorgias API (2026): Auth, Rate Limits, Webhooks and Retention

To use the Gorgias API, call https://your-subdomain.gorgias.com/api/ with HTTP Basic auth (your account email as the username, an API key from Settings › Account › REST API as the password), page through results with next_cursor, and stay under 40 requests per 20 seconds on an API key or 80 on OAuth2. The part that breaks integrations in 2026 is retention: since 8 September 2026, email bodies older than 30 days come back as null.

QuestionAnswer (Gorgias docs, checked 24 September 2026)
Base URLhttps://acme.gorgias.com/api/, no version segment
AuthHTTP Basic (email + API key) for private apps; OAuth2 required for public apps
PaginationCursor-based, limit defaults to 30; offset pagination deprecated
Rate limits40 per 20 s (API key), 80 per 20 s (OAuth2), same counts per 10 s on Enterprise
WebhooksHTTP integrations, 5-second timeout, up to 3 retries, auto-disabled after 500 consecutive failures
RetentionEmail bodies archived after 30 days (from 8 September 2026); audit log events kept 12 months

Everything here is documented rather than measured. We have no Gorgias tenant, so we made no calls against a live account. Every figure is cited to Gorgias' own developer docs, help center or pricing page, first checked on 20 September 2026 and re-checked against the developer docs on 24 September 2026.

What is the Gorgias API base URL, and how do I authenticate?

Your base URL is your subdomain plus /api/, so an account at acme.gorgias.com reaches tickets at https://acme.gorgias.com/api/tickets. The documented resource paths carry no version segment.

Credentials live at Settings icon (bottom-left) › Account › REST API, under API Access & Credentials, which shows the Base API URL, your Username (your account email) and your Password (the API key). Only the account owner and admins can see or create one (Access your Gorgias REST API credentials). Gorgias is blunt about what the key is worth: it "grants full access to your account's data", and resetting it invalidates the old one immediately, which breaks anything still using it.

Gorgias docs showing the Settings, Account, REST API path and the API Access and Credentials panel
Gorgias docs showing the Settings, Account, REST API path and the API Access and Credentials panel

Authentication has two modes and the choice is made for you by what you are building. A private app uses the API key over HTTP Basic, with your email as the username. A public app, meaning one you list for other Gorgias accounts, must use OAuth2. Our step-by-step for finding the key is how to find your Gorgias API key.

curl -u '[email protected]:YOUR_API_KEY' \
  -H 'Accept: application/json' \
  'https://acme.gorgias.com/api/tickets?limit=5'

How do I create a ticket through the Gorgias API?

A ticket in Gorgias cannot exist without a message, so messages is required on POST /api/tickets. Which fields inside it are required depends on the channel, and the channels Gorgias documents for API ticket creation include api, email, chat, phone and sms.

curl -X POST -u '[email protected]:YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  'https://acme.gorgias.com/api/tickets' \
  -d '{
    "channel": "api",
    "from_agent": false,
    "messages": [{
      "channel": "api",
      "via": "api",
      "from_agent": false,
      "sender": {"email": "[email protected]"},
      "body_text": "Where is my order?"
    }]
  }'

One more constraint, added in a changelog rather than the reference: ticket subject is capped at 998 characters, and a longer one returns a 400 (Limit length of ticket subject).

How does Gorgias API pagination work?

List endpoints take cursor, limit and order_by, and return data, object, uri and a meta object holding prev_cursor and next_cursor (Pagination). limit defaults to 30, and the ticket endpoint's own schema caps it at 100.

{
  "data": [],
  "object": "list",
  "uri": "/api/macros",
  "meta": { "prev_cursor": null, "next_cursor": "WyJuZXh0IiwgMjksIDkyOV0=" }
}

Cursor pagination replaced offset pagination, so any script you inherited that walks page= numbers is running on a deprecated interface. Follow next_cursor until it comes back null, and don't store cursors between runs.

What are the Gorgias API rate limits?

Gorgias rate-limits with a leaky bucket, per account, and the numbers depend on how you authenticated (Rate Limits):

CallerLimit
OAuth2 apps80 requests in a 20-second window
API key integrations40 requests in a 20-second window
Enterprise accountsThe same counts in a 10-second window
Gorgias developer docs Rate Limits page showing the OAuth2, API key and Enterprise limits and the two rate-limiting headers
Gorgias developer docs Rate Limits page showing the OAuth2, API key and Enterprise limits and the two rate-limiting headers

Two headers come back on every response. Retry-after gives the seconds to wait, and X-Gorgias-Account-Api-Call-Limit reads like 10/80, meaning ten requests made against a limit of eighty. Over the limit you get a 429.

The Enterprise row is worth doing the arithmetic on, because Gorgias states it two different ways. Forty requests in a ten-second window is four requests a second, which matches the line we saw in the Enterprise panel of Gorgias' pricing page on 20 September 2026: "Unlimited Help Centers, API at 4 requests per second". The two sources agreed then, and the practical read for everyone else is two requests a second on an API key, four on OAuth2.

That gap between 40 and 80 is not arbitrary, and the incentive behind it is easy to read. OAuth2 is what Gorgias requires for public apps, so the faster lane is optimized for integrations that went through app review, and the slower one is what's left for scripts nobody at Gorgias has seen. If you are building something that needs throughput and you were planning to hold it together with an API key, the limit is telling you which path Gorgias wants you on.

Does Gorgias have webhooks, and what happens when your endpoint is down?

Gorgias' outbound webhooks are called HTTP integrations, and they live at Settings icon › Account › HTTP integration › Manage › Add HTTP integration. They are on all Helpdesk plans, and the account owner and admins manage them (HTTP Integrations).

The trigger events are ticket created, ticket updated, ticket self unsnoozed, ticket message created and ticket message failed, plus ticket assignment updated and ticket status updated, which can't be combined with the other triggers. You can POST, PUT or DELETE, as application/json or application/x-www-form-urlencoded, and Gorgias template variables written in double curly braces, such as ticket.customer.email, work in both the URL and the body.

The delivery behavior is the part worth writing on a wall before you build anything on it:

  • Every request has a 5-second timeout.
  • If the endpoint can't be reached at all, Gorgias retries whatever your auth method.
  • If the endpoint accepts the connection but doesn't answer within 5 seconds, Gorgias retries only for OAuth2 integrations. Header-based auth gets no retry.
  • If the endpoint returns an error status such as 429 or 500, Gorgias doesn't retry at all, for either auth method.
  • A retry runs up to 3 times with exponential backoff at 10, 20 and 40 seconds.
  • After 500 consecutive failures, Gorgias disables the integration automatically. One successful delivery resets the counter to zero.
Gorgias docs on HTTP integration reliability: the 5-second timeout and the 10, 20, 40 second retry backoff
Gorgias docs on HTTP integration reliability: the 5-second timeout and the 10, 20, 40 second retry backoff

Read that list as a design brief. An endpoint that responds 202 in under a second and does the work asynchronously is the only shape that survives it, because a slow-but-successful handler on header-based auth loses the event with no retry and no error. Our longer piece on the event payloads is Gorgias webhooks explained, and the app-by-app view is in best Gorgias integrations.

Why does the Gorgias API return null message bodies in 2026?

Three changelog entries change what the API returns, and none of them will break a request. They will just hand you nulls.

Email message bodies, from 8 September 2026. Thirty days after an email is sent or received, TicketMessage.headers is permanently removed and set to null. Where stripped_html or stripped_text exists, the original body_html or body_text is archived and set to null, and the archived original stays reachable through TicketMessage.body_url. Gorgias' own advice is to build on the stripped fields, which hold a curated version without the signature or the quoted thread, and to fall back to the body fields only when the stripped ones are absent. The policy applies retroactively, with historical data processed through September and October 2026 (New email message data retention policy).

Gorgias developer changelog describing the email message retention policy taking effect 8 September 2026
Gorgias developer changelog describing the email message retention policy taking effect 8 September 2026

Audit log events, from 25 February 2026. Events are kept for 12 months. GET /api/events returns only the last 12 months, GET /api/events/:id returns a 404 for anything older, and the deprecated Ticket.events attribute is trimmed the same way (Audit log events retention limited to 12 months).

Ticket custom fields. Updating them has replace-all semantics: the request body must contain every value the ticket should end up with, and any field with a current value that you leave out is deleted. Gorgias documents the safe pattern as GET /api/tickets/{ticket_id}/custom-fields, merge, then send the full list back. Some fields, including AI Agent Outcome and AI Intent, are system-managed and can only be deleted by Gorgias' internal apps.

Put together, these change what "archive our tickets with the API" means. A nightly job that has been storing body_html has been storing nulls since September on anything older than a month, and nobody gets an error about it. If your reason for touching the API at all is to keep a copy of your history, read how to export data from Gorgias alongside this, because the CSV export has its own gap: it carries ticket metadata without message bodies.

How can I read the Gorgias API docs faster?

Gorgias publishes a machine-readable index at developers.gorgias.com/llms.txt, and every documentation page has a markdown version if you append .md to its URL. That is the quickest way to diff the API surface between two dates, and it is how we checked the changelog entries above without clicking through a rendered site. Gorgias also warns that anything undocumented is off-limits: resources, attributes and operations not in the documentation "should not be used", because they are reserved for internal use and can change without notice.

When should you use an AI agent layer instead of the API?

The API is the right tool for moving records, syncing systems and building a widget your agents read. It is the wrong tool for the job people most often try to use it for, which is writing a script that decides what a ticket means and what to say back. That work ends up as a growing pile of keyword conditions that nobody wants to own.

Macha is an AI agent layer that runs on top of the help desk a team already uses, Gorgias included, and it never replaces the help desk. It suits teams who have already written the integration and found that the hard part was the reading, not the plumbing, and it is the wrong fit if what you actually need is a nightly data sync. One plan, priced on monthly ticket volume from $299 a month for 750 tickets, about $0.40 a ticket at every tier, setup and monitoring by the Macha team included, and a $50 free-usage trial with no credit card. See Macha on Gorgias or the tiers at /pricing.

Frequently asked questions

What is the Gorgias API base URL? Your own subdomain plus /api/, so an account at acme.gorgias.com reaches tickets at https://acme.gorgias.com/api/tickets. The documented paths carry no version segment, and your exact Base API URL is printed on the REST API credentials screen.

Where do I find my Gorgias API key? Settings icon at the bottom left, then Account › REST API, under API Access & Credentials. It shows the Base API URL, your Username (your account email) and your Password (the API key). Only the account owner and admins can access or create one, and resetting the key invalidates the old one immediately.

How does Gorgias API authentication work? Private apps use HTTP Basic: your account email is the username and the API key is the password. Public apps, the kind listed for other Gorgias accounts, must use OAuth2.

What are the Gorgias API rate limits? A leaky bucket per account: 80 requests in a 20-second window for OAuth2 apps, 40 in a 20-second window for API key integrations, and the same counts in a 10-second window on Enterprise, which works out to the 4 requests per second printed on Gorgias' pricing page. Over the limit you get a 429, with Retry-after and X-Gorgias-Account-Api-Call-Limit headers to work from.

How do I paginate Gorgias API results? With cursors. Pass limit (default 30, capped at 100 on tickets) and follow meta.next_cursor back as the cursor parameter until it returns null. Offset pagination is deprecated, so a script that walks page numbers is on an old interface.

Can I create a Gorgias ticket without a message? No. A ticket can't exist without a message, so the messages array is required on POST /api/tickets, and which fields inside it are required depends on the channel you pick.

Does Gorgias have webhooks? Yes, under the name HTTP integrations, at Settings › Account › HTTP integration. They fire on ticket created, ticket updated, ticket self unsnoozed, ticket message created and ticket message failed, plus ticket assignment updated and ticket status updated, which are mutually exclusive with the other triggers.

Why did my Gorgias HTTP integration turn itself off? Gorgias disables an HTTP integration automatically after 500 consecutive failed requests. Each request has a 5-second timeout, retries depend on your auth method, a single success resets the count, and an endpoint that answers with an error status is never retried, so a slow or erroring endpoint burns through that budget faster than it looks.

Why are message bodies empty in my Gorgias API responses? Because of the retention policy that took effect on 8 September 2026. Thirty days after an email is sent or received, headers are removed and, where a stripped version exists, body_html and body_text are archived and set to null, with the original reachable through body_url. Build on stripped_html and stripped_text instead.

Sources:

Macha

About Macha

Macha is an AI agent platform that works on top of the help desk you already use — Zendesk, Freshdesk, Gorgias, or Front — and connects to the rest of your stack, even your own internal systems. Its AI agents resolve tickets and automate entire workflows end to end, all set up in plain English, no code. Learn more about Macha →

Zendesk
5.0 on Zendesk Marketplace

Loved by support teams worldwide

See what support teams are saying about Macha AI.

The application seems excellent to me! We are still testing, and we need support for some details and they were extremely efficient too!

Daniela Costa

Daniela Costa

Head of Support, Seabra

Macha has been a great addition to our support toolkit. It generates clear, well-organized responses that fit naturally into our workflow. One feature we particularly appreciate is its ability to automatically reply in the same language as the ticket.

Marius F

Marius F

Support Head, Zentana

We've been using Macha for a little while now and it's been really great addition so far! It's powerful, convenient, and makes getting work done a lot easier for our agents.

Alexander Wedén

Alexander Wedén

Head of Support

Support team is very helpful and responsive. Really enjoy how lightweight this is within Zendesk itself vs other more intrusive tools.

Cathleen Wright

Cathleen Wright

Zendesk Admin, Cortex IO

So far it's pretty good! Our queries are a little nuanced, so we can't always use it, but it's got enough utility for us. It can even incorporate our bilingual country with greetings in a second language.

Jae Oliver

Jae Oliver

Head of Support, Wise

Really enjoying using Macha, it has made a noticeable difference to our support team in a short amount of time. I really like the ticket summary feature, saves us a lot of time.

Harry Jackson

Harry Jackson

Head of Support, Crumb

Macha AI is a great addition to my workspace! It's powerful, convenient, and it really makes productivity so much easier for our agents!

Dave G

Dave G

Head of Support, Cyber Power Systems

Very impressed! AI integration for Zendesk has certainly come a long way and Macha seems to set the standard for now. This will for sure save lot of time in our support team.

Pauli Juel

Pauli Juel

Head of CS, Dokument24

Macha has been working great for us so far! The auto-responses are accurate and our resolution time has dropped significantly.

Lana T

Lana T

Zendesk Admin, Swotzy

Macha AI is a great addition. The knowledge base feature means our agents always have the right answers at their fingertips.

Mischa Wolf

Mischa Wolf

Head of Support, Topi

We're enjoying this integration so far. It's made our support team more efficient and our customers get faster responses.

Paula G

Paula G

Head of Customer Support, Xly Studio

The team enjoys using it. It saves considerable time on common questions and the integration options are excellent.

Kilian Leister

Kilian Leister

Support Head, Didriksons

Ready to supercharge your team with AI?

Get started in minutes. Connect your tools, configure your agents, and let AI handle the rest.

$50 in free credits · no time limit, no credit card