---
{
  "title": "A practical guide to the Freshdesk ticket API with examples (2026)",
  "slug": "freshdesk-ticket-api-examples",
  "intent": "icp-competitor",
  "date": "2025-10-22",
  "updated": "2026-11-28T16:40:00Z",
  "template": "default",
  "excerpt": "Working Python for the Freshdesk ticket API: list, search, create, update, note and reply, plus the 30-day list default, plan rate limits and webhook caps.",
  "coverImage": "https://cdn-public.eesel.ai/blog/banners/freshdesk-ticket-api-examples-mx0mnp6x-9fc191-20261128.webp",
  "coverImageAlt": "Illustration of two people discussing a support ticket, a code window and an automation flowchart for the Freshdesk ticket API",
  "coverImageWidth": 1536,
  "coverImageHeight": 1024,
  "categories": ["Guides","Freshdesk AI"],
  "tags": ["Freshdesk","API","Integration","helpdesk automation","developer guide"],
  "readTime": 13,
  "author": 19,
  "reviewer": 4,
  "seo": {
    "title": "A practical guide to the Freshdesk ticket API with examples (2026)",
    "description": "Freshdesk ticket API examples in Python: list, create, update, note and reply on /api/v2/tickets. Growth allows 100 calls a minute, Pro 400, Enterprise 700.",
    "image": "https://cdn-public.eesel.ai/blog/banners/freshdesk-ticket-api-examples-mx0mnp6x-9fc191-20261128.webp"
  },
  "cta": {
    "variant": "integration",
    "target": "freshdesk",
    "headline": "Skip the glue code in Freshdesk",
    "subhead": "eesel connects with your Freshdesk API key and works tickets like a teammate: replies, private notes, tags and routing, each set to act, ask first or stay off.",
    "primary": {
      "label": "Learn more",
      "action": "learn-more"
    },
    "secondary": {
      "label": "Try for free",
      "action": "signup"
    }
  },
  "faqs": {
    "heading": "Frequently asked questions",
    "type": "blog",
    "answerType": "html",
    "faqs": [
      {
        "question": "What are some practical Freshdesk ticket API examples?",
        "answer": "<p>The everyday ones are listing tickets changed since your last sync (<code>GET /api/v2/tickets?updated_since=</code>), creating a ticket from a form or alert (<code>POST /api/v2/tickets</code>), updating status or priority (<code>PUT /api/v2/tickets/[id]</code>), adding a private note and replying to the customer. This guide has Python for each, and the <a href=\"https://www.eesel.ai/blog/freshdesk-conversations-api\">Freshdesk conversations API</a> post goes deeper on notes and replies.</p>"
      },
      {
        "question": "How do I authenticate with the Freshdesk API?",
        "answer": "<p>Use HTTP Basic auth with your API key as the username and any character, such as X, as the password. The key is under Profile settings in Freshdesk, and calls run with that user's role, so a read-only agent's key can't reply. For integrations, Freshdesk now documents service accounts that hold their own keys without a paid seat; see <a href=\"https://www.eesel.ai/blog/freshdesk-oauth\">Freshdesk OAuth</a> for the other route.</p>"
      },
      {
        "question": "What is the Freshdesk API rate limit?",
        "answer": "<p>It is per minute and account-wide: 100 calls on Growth, 400 on Pro and 700 on Enterprise, with 50 a minute on trial accounts. Ticket create, update and list have lower sublimits of their own. The <a href=\"https://www.eesel.ai/blog/freshdesk-api-rate-limits\">Freshdesk API rate limits</a> post covers handling 429 errors.</p>"
      },
      {
        "question": "Why does the Freshdesk API only return recent tickets?",
        "answer": "<p>By default, <code>GET /api/v2/tickets</code> returns only tickets created in the past 30 days, and at most 300 pages of 100. Pass <code>updated_since</code> to reach older tickets, and move it forward as you go for a full backfill. Closed tickets inactive for 120 days are archived and read through separate archive endpoints. For a one-off export, see <a href=\"https://www.eesel.ai/blog/freshdesk-export-ticket-data-with-custom-fields\">exporting Freshdesk ticket data</a>.</p>"
      },
      {
        "question": "Does Freshdesk support webhooks for tickets?",
        "answer": "<p>Yes, as an action inside automation rules: Trigger Webhook on Growth, Pro and Enterprise, and Trigger API, which can use the response, from Pro. Freshdesk caps webhook callbacks at 1,000 an hour and retries a failed one every 30 minutes. The <a href=\"https://www.eesel.ai/blog/freshdesk-webhooks-to-trigger-external-automation\">Freshdesk webhooks guide</a> walks through a setup.</p>"
      },
      {
        "question": "Which Freshdesk plans include API access?",
        "answer": "<p>Every current plan does: Freshdesk's rate limit table lists Growth ($19 per agent a month, billed annually), Pro ($55) and Enterprise ($89). The plan sets how many calls you get, and an account can buy more. See <a href=\"https://www.eesel.ai/blog/freshdesk-pricing\">Freshdesk pricing</a> for what else each plan adds.</p>"
      },
      {
        "question": "Can I automate Freshdesk tickets without writing API code?",
        "answer": "<p>Yes. Freshdesk's own automation rules cover simple if-this-then-that changes, and <a href=\"https://www.eesel.ai/integrations/freshdesk\">eesel</a> connects with an API key and works tickets as an AI teammate, replying, leaving private notes, tagging and routing, with each action set to act alone, ask first or stay off. A coding agent can set it up through the eesel CLI.</p>"
      }
    ],
    "supportLink": null
  },
  "alternates": {
    "x-default": "freshdesk-ticket-api-examples",
    "en": "freshdesk-ticket-api-examples",
    "de": "freshdesk-ticket-api-examples",
    "es": "ejemplos-api-tickets-freshdesk",
    "fr": "freshdesk-ticket-api-examples",
    "ja": "freshdesk-ticket-api-rei",
    "pt": "exemplos-api-tickets-freshdesk"
  }
}
---

## TL;DR

The Freshdesk ticket API is a JSON REST API at `https://<your-domain>.freshdesk.com/api/v2/tickets`: you <mark>authenticate with your API key as the username and any character as the password</mark>, then `GET` to list or search, `POST` to create, `PUT` to update, and `POST` to `/notes` or `/reply` to write on a ticket. The two things that trip people up most are limits. A plain list call returns <mark>only tickets created in the last 30 days</mark> unless you pass `updated_since`, and every call counts against a per-minute budget set by your plan: <mark>100 on Growth, 400 on Pro and 700 on Enterprise</mark>, with lower caps on the ticket create, update and list endpoints themselves. Below is working Python for each common job, checked against Freshdesk's [API reference](https://developers.freshdesk.com/api/) in November 2026.

If what you want is an AI that reads tickets and acts on them, rather than a script you maintain, [eesel](https://www.eesel.ai/integrations/freshdesk) connects with the same Freshdesk API key and does that work as a teammate. A coding agent such as Claude Code can set it up with the [eesel CLI](https://docs.eesel.ai/apis-and-developer-resources/cli), and the API key itself goes in through a secure form that an admin fills in.

## What is the Freshdesk ticket API?

The Freshdesk ticket API is the part of Freshdesk's v2 REST API that reads and changes tickets: plain JSON over HTTPS, with `POST` to create, `GET` to fetch, `PUT` to update and `DELETE` to remove. I build integrations at eesel, and this is the API our own Freshdesk connection sits on, so the examples below are the calls I'd reach for first.

A few facts from the reference that shape everything else:

- **Only v2 is live.** Freshdesk's deprecation policy says the legacy v1 API "is fully deprecated and restricted for new users", and v2 accepts JSON only, over HTTPS only, on your `freshdesk.com` domain rather than a custom CNAME. More on the differences in the [Freshdesk API v2](https://www.eesel.ai/blog/freshdesk-api-v2) guide.
- **Numbers, not words, for status and priority.** Status is 2 (Open), 3 (Pending), 4 (Resolved) or 5 (Closed); priority runs 1 (Low) to 4 (Urgent). The [Freshdesk ticket status codes](https://www.eesel.ai/blog/freshdesk-ticket-status-codes) post covers custom statuses.
- **Custom fields go in `custom_fields`**, keyed by the field's API name (`cf_order_number`, for example). `GET /api/v2/ticket_fields` lists them, and [Freshdesk ticket fields](https://www.eesel.ai/blog/freshdesk-ticket-fields) explains how they're set up.
- **Timestamps are UTC**, in the form `2026-11-28T09:00:00Z`.

## How do you authenticate with the Freshdesk API?

You send your API key as the username in HTTP Basic auth, with any character as the password; Freshdesk's own examples use `X`. The key sits in Freshdesk under your profile picture, then Profile settings, below the change-password section.

```bash
curl -u YOUR_API_KEY:X -H "Content-Type: application/json" \
  "https://your-domain.freshdesk.com/api/v2/tickets"
```

Two details are worth knowing before you hand a key to a script. First, <mark>a key carries its owner's permissions</mark>: if that person's role can view tickets but not reply, the API can't reply either, and you'll get a `403`. Second, a key belongs to a person, so the integration breaks when they leave. Freshdesk's November 2026 changelog adds an answer to that: **service accounts**, which the reference describes as "a non-human agent that integrations use to call the Freshdesk API with its own API key". A service account doesn't use a paid agent seat, can't sign in, is never assigned tickets, and can hold a primary and a secondary key so you can rotate keys without downtime. Admins create them through the agents API (`agent_type` 8); if the feature isn't on for your account, the call returns `require_feature`.

Each endpoint in the reference also lists an OAuth 2.0 scope, such as `freshdesk.tickets.create`, for apps that authenticate that way instead; [Freshdesk OAuth](https://www.eesel.ai/blog/freshdesk-oauth) covers that route.

## Freshdesk ticket API examples in Python

All the examples share one small setup: a `requests` session with your key, and a helper that waits out a rate limit instead of failing. Keep the key in an environment variable rather than in the file.

```python
import os
import time
import requests

DOMAIN = os.environ["FRESHDESK_DOMAIN"]    # "acme" for acme.freshdesk.com
API_KEY = os.environ["FRESHDESK_API_KEY"]
BASE = f"https://{DOMAIN}.freshdesk.com/api/v2"

session = requests.Session()
session.auth = (API_KEY, "X")  # any password works with an API key


def call(method, path_or_url, **kwargs):
    url = path_or_url if path_or_url.startswith("http") else BASE + path_or_url
    while True:
        r = session.request(method, url, timeout=30, **kwargs)
        if r.status_code == 429:  # rate limited: Freshdesk says how long to wait
            time.sleep(int(r.headers.get("Retry-After", "60")))
            continue
        if r.status_code >= 400:
            print(r.status_code, r.text)  # Freshdesk explains what failed here
        r.raise_for_status()
        return r
```

### Example 1: How do you list every ticket changed since your last sync?

Call `GET /api/v2/tickets` with `updated_since`, 100 tickets a page, and follow the `link` header until it disappears. This is the call behind most [custom Freshdesk reports](https://www.eesel.ai/blog/freshdesk-custom-reports) and data warehouse syncs.

```python
def tickets_updated_since(since):
    params = {
        "updated_since": since,      # e.g. "2026-11-01T00:00:00Z"
        "per_page": 100,             # the maximum
        "order_by": "updated_at",
        "order_type": "asc",
        "include": "description",    # costs extra API credits, see below
    }
    url = "/tickets"
    while url:
        r = call("GET", url, params=params)
        yield from r.json()
        url = r.links.get("next", {}).get("url")  # absent on the last page
        params = None  # the next-page URL already carries the query


for ticket in tickets_updated_since("2026-11-01T00:00:00Z"):
    print(ticket["id"], ticket["status"], ticket["subject"])
```

Three limits in the reference explain most "missing tickets" bugs:

- Without a filter, <mark>the list returns only tickets created in the past 30 days</mark>. `updated_since` is how you reach older ones.
- It stops at <mark>300 pages, or 30,000 tickets</mark>. For a bigger backfill, sort by `updated_at` ascending, as above, and start the next run from the last ticket's `updated_at`.
- On accounts created after 30 November 2018, the list leaves out the ticket body unless you add `include=description`, and each include costs two more API credits per call. Freshdesk also warns against going past page 500 on any list, since deep pages respond slowly.

![A hand-drawn loop of four steps: GET /api/v2/tickets with updated_since and per_page=100, follow the link header, wait Retry-After seconds on a 429, save the newest updated_at, with a note that no updated_since means only the last 30 days](https://cdn-public.eesel.ai/blog/blog-gen/generated/sync-loop-mx0molm2-06baf7-20261128.webp "Save where you stopped, and the 30-day default never bites.")

Closed tickets that sit untouched for 120 days are archived. They drop out of search and are read one at a time from `GET /api/v2/tickets/archived/[id]`, so a long-term export has to account for them.

### Example 2: How do you search tickets by status, priority or a custom field?

Use `GET /api/v2/search/tickets` with a query in double quotes. It's the API version of a filtered ticket view, and it understands your custom fields too.

```python
query = '"status:2 AND priority:4 AND tag:\'refund\'"'
r = call("GET", "/search/tickets", params={"query": query, "page": 1})
data = r.json()
print(data["total"], "matching tickets")
for ticket in data["results"]:
    print(ticket["id"], ticket["subject"])
```

Search returns 30 results a page and <mark>stops at page 10</mark>, so it's for "show me the urgent open refunds", not for exports. The query can be up to 512 characters, field names are case-sensitive, archived tickets aren't included, and a change takes a few minutes to show up in results. `requests` URL-encodes the query for you, which the reference requires.

### Example 3: How do you create a ticket with the API?

`POST /api/v2/tickets` with at least one way to identify the requester (`email`, `requester_id`, `phone` and a few others) plus whatever fields you know. A form submission or a monitoring alert turning into a ticket is the classic case.

```python
ticket = {
    "email": "customer@example.com",   # creates the contact if it doesn't exist
    "subject": "Website form: demo request",
    "description": "<p>A new lead asked for a demo from the pricing page.</p>",
    "status": 2,      # Open (the default)
    "priority": 3,    # High (the default is 1, Low)
    "group_id": 12345,
    "tags": ["website-form"],
    "custom_fields": {"cf_lead_source": "pricing page"},
}
r = call("POST", "/tickets", json=ticket)
print("Created ticket", r.json()["id"])  # Freshdesk answers 201 Created
```

![Freshdesk's Analytics screen showing incoming tickets, chats and calls by month, the busiest days of the week and the busiest hours of the day](https://wmeojibgfvjvinftolho.supabase.co/storage/v1/object/public/wp-uploads/2025/09/05-Freshdesk-Analytics.webp "Tickets your scripts create land in Freshdesk's own analytics too.")

Attachments go in the same call, but as `multipart/form-data` rather than JSON, with a 20 MB total per ticket. Parent and child tickets and trackers have their own variations of this call; see [Freshdesk parent-child tickets](https://www.eesel.ai/blog/freshdesk-parent-child-tickets).

### Example 4: How do you update a ticket's status or priority?

`PUT /api/v2/tickets/[id]` with only the fields you're changing.

```python
ticket_id = 123
r = call("PUT", f"/tickets/{ticket_id}", json={
    "status": 3,      # Pending
    "priority": 1,    # Low
    "custom_fields": {"cf_order_status": "shipped"},
})
print("Ticket", ticket_id, "is now status", r.json()["status"])
```

For many tickets at once, `POST /api/v2/tickets/bulk_update` takes a list of `ids` and a `properties` object, runs as a background job, and gives you a `job_id` to check at `/api/v2/jobs/[id]`. Outbound tickets are the one exception to watch: their subject and description can't be updated. Merging duplicates has its own endpoint and can't be undone, which [Freshdesk merge tickets](https://www.eesel.ai/blog/freshdesk-merge-tickets) explains.

### Example 5: How do you add a private note to a ticket?

`POST /api/v2/tickets/[id]/notes`. Notes are private unless you set `"private": false`, which makes this the right call for "add the tracking number from Shopify to the ticket", a job a ticket update can't do.

```python
r = call("POST", f"/tickets/{ticket_id}/notes", json={
    "body": "<p>Order shipped. Tracking: <b>1Z999AA10123456784</b></p>",
    "private": True,                             # the default
    "notify_emails": ["agent@yourcompany.com"],  # optional: tell a teammate
})
```

[Freshdesk private notes](https://www.eesel.ai/blog/freshdesk-private-notes) covers how teams use them, and the [Freshdesk Shopify](https://www.eesel.ai/blog/freshdesk-shopify) post covers the store side.

### Example 6: How do you reply to the customer from the API?

`POST /api/v2/tickets/[id]/reply` sends a public reply from your support address. Use `from_email` to send from a different mailbox you've set up.

```python
r = call("POST", f"/tickets/{ticket_id}/reply", json={
    "body": "<p>Thanks for your patience. Your replacement shipped today.</p>",
})
```

On web chat and mobile SDK tickets, the reference asks for `structured_body` instead of `body`. Both notes and replies need two OAuth scopes if you use OAuth: `freshdesk.conversations.create` and `freshdesk.tickets.view`.

## What are the Freshdesk API rate limits on each plan?

Freshdesk counts API calls per minute across the whole account, whatever the number of agents or IP addresses, and the budget depends on your plan. <mark>Trial accounts get 50 calls a minute.</mark>

| Plan | Calls per minute | Ticket create | Ticket update | Tickets list |
| :--- | :--- | :--- | :--- | :--- |
| Growth | 100 | 50 | 50 | 40 |
| Pro | 400 | 160 | 160 | 100 |
| Enterprise | 700 | 280 | 280 | 200 |

![Freshdesk's API reference showing the Rate Limit section: limits are per minute and account wide, trial users get 50 calls a minute, and the table lists Growth at 100, Pro at 400 and Enterprise at 700 with per-endpoint sublimits](https://cdn-public.eesel.ai/blog/freshdesk/images/freshdesk-api-rate-limit-20261128.png "The per-endpoint sublimits are the ones a sync hits first, from Freshdesk's API reference.")

What the table doesn't show:

- <mark>Failed requests count too</mark>, and so do calls made by custom apps installed in your account.
- `include` costs extra: two more credits per include on a list call, one per embedded resource when viewing a single ticket. The `X-RateLimit-Used-CurrentRequest` header tells you what a call cost.
- Every response carries `X-RateLimit-Remaining`. Since November 2026, Freshdesk also documents `X-RateLimit-Account-*` headers for the account budget and `X-RateLimit-Sublimit-*` headers for endpoint caps, including when the current window resets.
- On a `429`, the `Retry-After` header says how many seconds to wait, which is what the `call()` helper above does.
- An account can buy more: Freshdesk lists sublimit tiers for 1,000 and 2,000 calls a minute.

Freshdesk's own advice is to queue calls, cache things that rarely change (like the agent name to ID mapping) and ask for a higher limit before you need it. The [Freshdesk API rate limits](https://www.eesel.ai/blog/freshdesk-api-rate-limits) post goes further on backoff.

## How do Freshdesk webhooks fit with the ticket API?

Webhooks are the other direction: instead of your code polling Freshdesk, a Freshdesk automation rule calls your URL when something happens to a ticket. They live in [Freshdesk automation rules](https://www.eesel.ai/blog/freshdesk-automation-rules) as an action, in two flavours:

- **Trigger Webhook**, on Growth, Pro and Enterprise, fires and forgets: "update the CRM when a ticket is created".
- **Trigger API**, <mark>from the Pro plan</mark>, keeps the response so later actions in the rule can use it: "look up the customer's subscription tier, then set priority".

The callback URL and body take placeholders, so a rule can call back into the ticket API itself, for example `https://acme.freshdesk.com/api/v2/tickets/{{ticket.id}}/notes` to add a note that a standard rule action can't. Freshdesk's [webhook article](https://support.freshdesk.com/support/solutions/articles/132589-using-webhooks-in-automation-rules) sets the limits: <mark>1,000 webhook calls an hour</mark>, with later ones held until the next hour, and a failed callback retried every 30 minutes, up to 48 times, with an email to account admins. A 2xx response counts as success. The [Freshdesk webhooks guide](https://www.eesel.ai/blog/freshdesk-webhooks-to-trigger-external-automation) builds one end to end.

The usual pattern is a webhook to tell your service that a ticket changed, then ticket API calls from your service to act on it.

## What usually goes wrong with Freshdesk ticket API calls?

Most errors come back with a useful body: a `description` and an `errors` array naming the `field`, a `message` and a machine-readable `code` such as `missing_field` or `invalid_value`. The ones I see most:

- **`401` with correct-looking credentials.** If you build the header yourself, the reference says `apikey:X` must be Base64-encoded. `requests` and `curl -u` do it for you.
- **`403` on a call that works in the UI for an admin.** The key's owner lacks that permission, or the feature isn't on your plan (`require_feature`).
- **`400` with `invalid_field`.** You sent a field the endpoint doesn't accept, often a custom field without its `cf_` name. List them with `GET /api/v2/ticket_fields`.
- **`409` on create.** A conflict, such as a contact email that already belongs to someone else.
- **"My old tickets are missing."** The 30-day default and 300-page cap from Example 1, or the ticket was archived.

Before pointing any of this at your live helpdesk, try it in a [Freshdesk sandbox](https://www.eesel.ai/blog/freshdesk-sandbox); a reply sent by a test script is still a real email to a real customer.

## When is an AI teammate a better fit than API code?

The scripts above are the right tool for moving data: syncs, reports, a form that opens tickets. They get harder when the job needs judgement on every ticket, such as reading what the customer asked, checking an order, and deciding whether to reply, tag or hand it to a person. That's where teams usually end up writing a rules engine they didn't plan to own.

eesel takes that job inside Freshdesk. It connects with [a Freshdesk API key](https://docs.eesel.ai/integrations/freshdesk), with no app to install, and an Account Administrator's key lets it create the automation rules that wake it when a customer opens or replies to a ticket. On each ticket it sees the fields, the requester and their company, and the newest 40 replies and notes, and it learns ahead of time from your help center, canned responses and resolved tickets. Then it does the work through the same API calls you saw above: sending replies, leaving private notes, tagging, assigning, updating fields and status.

The part that matters for a team is control. In eesel's [actions and approvals](https://docs.eesel.ai/instructions-and-memory/actions-and-approvals), each action is set to run on its own, ask a person first, or stay off, so you can start with private-note drafts only and turn on sending once you trust it. Before going live you can ask it to run a simulation that replays your past tickets and compares its answers with what your team sent. If you'd rather drive it from a terminal, `npx @eesel/cli integrations connect freshdesk` starts the same connection, and a coding agent can run it for you. There's more on that approach in [CLI tools for customer support](https://www.eesel.ai/blog/cli-for-customer-support), and on how it compares to Freshdesk's own AI in [the best AI for Freshdesk](https://www.eesel.ai/blog/best-ai-for-freshdesk).

## Try eesel in your Freshdesk

If you've got the API key from this guide, you already have what eesel needs. Connect it, keep every action on "ask first" for the first week, and read the private-note drafts it leaves on real tickets before you let it send anything. eesel prices by work rather than seats: a ticket that wakes it is 1 credit, and the [pricing page](https://www.eesel.ai/pricing) starts at $299 a month for 500 credits after a <mark>7-day trial with 100 credits</mark>.

![eesel working inside Freshdesk, reading a ticket and drafting a reply for the support team](https://wmeojibgfvjvinftolho.supabase.co/storage/v1/object/public/public_assets/blog-gen/freshdesk-animation.mp4 "eesel works the ticket in Freshdesk, through the same API.")

[Try eesel](https://dashboard.eesel.ai/signup) next to your Freshdesk and see what it would have done with last week's tickets.
