# Zendesk API Authentication and Creating a Ticket

By Bram Vissenaekens · 2026-11-20 · Source: https://www.activepieces.com/blog/zendesk-api-authentication-and-creating-a-ticket

---
<aside class="tldr"><p class="tldr-label">Summary</p><p>A Zendesk API backlog script's missing retry backoff and caps cascaded 429 errors into duplicate tickets between 02:14 and 08:30.</p><ul><li>First 429 error at 02:14; script retried instantly, cascading load into the failing endpoint.</li><li>Duplicate tickets appeared by 02:40 when write confirmations timed out before reaching the script.</li><li>By 08:30, morning count showed missing tickets from requests that were never resent and duplicates agents had to merge.</li></ul></aside>

The Zendesk API is a REST interface for tickets, users and related support data. You reach it with either an API token or an OAuth access token on a Zendesk Suite account.

## Zendesk API Access, Tokens and Plan Requirements

viz type=groupedbars title="What Zendesk Suite costs per agent by billing term" unit="$ per agent per month" source="Tidio - https://www.tidio.com/blog/zendesk-review/" cols="Billed annually,Billed monthly"15 per agent a month billed annually against 
Pick the wrong credential and your first failure is `401 Couldn't authenticate you`, usually at 2 a.m.

You can create, read, update and delete tickets, users and organizations over HTTPS with JSON. That covers most backlog work:
- Bulk-closing stale tickets
- Reassigning a departed agent's queue
- Syncing users from a CRM

If you'd rather not hire someone to write that glue, [Activepieces](https://www.activepieces.com) lets you describe the process in its built-in chat and publishes a live flow in your account, an ordinary flow like any other on the platform.

MoneyGram, Moneypenny, Alan and FundingSocieties run Activepieces in production, and every run leaves a trace you can read step by step, so you can see what happened without any certification. The retry and cap rules are still yours to specify.

Read the "who it acts as" column first: a token that acts as a person inherits that person's permissions and breaks when they leave. The table below compares the two credentials.

| | API token | OAuth access token |
|---|---|---|
| Who it acts as | The admin user whose email you pair with it | The user who authorized the OAuth client |
| How it is created | Admin Center, then the API settings page | Register an OAuth client, then run the authorization flow |
| Best for | Internal scripts and one-off migrations | Integrations acting for several accounts, or needing limited scopes |
| Expiry and revocation | Valid until an admin deactivates it | Can be scoped and revoked per grant |

Use the API token for a script you own. Use OAuth when someone else's account is involved, because you can cut off one grant without rotating everything.

### Which plan includes API access and what it costs per call

Nobody gets a bigger invoice for a heavy night. **Zendesk doesn't bill per call**. It limits requests per minute instead, so the cost is throttling. Your plan sets that ceiling, which is why the plan matters more than the price.

![Activepieces workflow builder with HTTP request step selected and its settings panel open showing method, URL, headers, and…](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/9e36e973-de4a-435f-8912-12e666216b2d/self-host-mistral-ai-enterprise-deployment-guide-3f7fe28d.webp)

Per [Tidio's review](https://www.tidio.com/blog/zendesk-review/), Suite Team runs $55 to $69 per agent per month, depending on annual or monthly billing. That's the cheapest way in, so a small team can test against real limits without much outlay.

Budget for the higher tier if your backlog job must finish within one night, since it's the one with more headroom. Per [Tidio](https://www.tidio.com/blog/zendesk-review/), Suite Professional costs $115 to $149 per agent per month.

## The Minimal Request That Created the First Ticket

Send one authenticated POST to the tickets endpoint with a subject and a comment body, and Zendesk answers 201 Created. That's the whole day-one job, and it's also the part that tells you nothing about the backlog night.

![A POST request card going to a tickets endpoint and a created ticket coming back](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/816bfd9b-28fd-4b36-bf95-c34f916f5a21/zendesk-api-authentication-and-creating-a-ticket-fb792f6b.webp)

### Enable token access and generate the token

Generate the token in this order:

1. In Admin Center, open Apps and integrations, then APIs, then Zendesk API, and switch on token access.
2. Add an API token, and give it a name that says what uses it.
3. Copy it immediately, because Zendesk shows the value once.

Lose it and you'll generate a new one and update every caller.

Name the token after the job, not the person. When the backlog script misbehaves, the audit trail is how you work out which credential did it.

An automation tool's admin console shows the shape of that trail: a connection created, updated, then deleted, each row containing:
- Who did it
- Which project
- When

Give a token a vague name and you are matching timestamps by hand.

### The authentication header

Leave out `/token` and Zendesk treats the token as a password, which fails. The username is your agent email address followed by `/token`, with the API token as the password, so token auth is HTTP Basic with an unusual username.

![Basic auth dialog with email plus token suffix as username and API token as password](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/27d69043-58dc-4b90-a3b9-da499399f2fa/zendesk-api-authentication-and-creating-a-ticket-12900d60.webp)

In curl that's `-u "agent@example.com/token:YOUR_TOKEN"`.

When it fails, it reads `Couldn't authenticate you`, status 401. Check the username suffix first, then whether token access is still enabled.

### Zendesk Create Ticket POST Body and 201 Response

Send JSON to `https://YOUR_SUBDOMAIN.zendesk.com/api/v2/tickets.json` with a `Content-Type: application/json` header. The smallest useful body wraps everything in a `ticket` object:

```json
{
 "ticket": {
 "subject": "Test ticket from the API",
 "comment": { "body": "Created by the integration." }
 }
}
```

On success you get a 201 with the new ticket in the response, including its `id`. Store that id. It's how you avoid creating the same ticket twice when a retry fires later, which is where this stops being a demo.

![Audit Logs](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/386757c3-834a-4fa2-b29d-81caff3e41c7/automate-ticket-handoffs-a-2026-guide-for-saas-t-26e23664.webp)

For field details, see the [Tickets API reference](https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/).

## What Zendesk API Retry Failures Cost the Team

When Zendesk refused the call, the script sent the same request again with no delay. The first failure was `429 Too Many Requests`.

The reference above lists the fields a create call accepts. It says nothing about what the script does when Zendesk refuses the call.

### First Zendesk API 429 Too Many Requests Error

**At 02:14 Zendesk began returning 429s**. The backlog loop had been creating tickets since 02:00 at whatever speed the loop could run.

The script had **no backoff rule and no cap on attempts**, so each refusal produced an immediate retry. Retries are requests too, so the rejected traffic fed itself.

The plan's per-minute rate limit, taken from Zendesk's rate limit docs, is the flat line.

<blockquote class="pull"><p>The script had no backoff rule and no cap on attempts, so each refusal produced an immediate retry. Retries are requests too, so the rejected traffic fed itself.</p></blockquote>

Read it for the gap: once the first 429 lands, the script's line stays above the limit, because retrying without a wait adds load instead of relieving it.

Since the line never dropped back under the limit, the script kept being refused, and nothing in it ever stopped.

### Duplicate Zendesk Tickets After Request Timeouts

When a create call timed out after Zendesk had accepted it, the response never reached the script. The script saw a failure, retried, and created the ticket a second time.

Nothing in the payload tied the retry to the original, so Zendesk had no basis to treat them as one ticket.

Somebody has to open, recognise and merge or close each duplicate, because each is a real ticket.

[MetricNet, via Onur Ergur](https://onurergur.medium.com/scaling-saas-support-with-agentic-ai-ee11cd57e05d), puts the cost of a ticket at $15.72 for chat, $16.13 for email and $17.19 for voice. Those are the channels this backlog resembles, so every duplicate is roughly a $16 ticket handled twice.

![What a support ticket costs by channel](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/7b7a99bc-36e7-4235-9f0d-f6614df7b415/zendesk-api-authentication-and-creating-a-ticket-d7f0d91a.svg "Source: MetricNet via Onur Ergur")

At $37.52 per ticket, walk-up support shows how quickly the figure climbs when handling is manual and in person.

### Counting Lost and Duplicate Zendesk Tickets

**By 08:30 the morning count had two columns**. One was tickets that never arrived, because their requests exhausted every retry or the script died. The other was tickets that arrived twice or more.

Customers in the first column had written in and heard nothing. Agents spent the first hours of the shift on the second column, merging records instead of answering anyone.

Neither column showed up in a test run, and both were visible in the run trace.

## Why the Zendesk API Errors Compounded

Nothing made a repeated write safe, and the job retried every failure instantly, including ones that could never succeed. **One bad night turned into duplicate tickets**.

Anything marked "no" should stop the run and raise an alert. The table below separates the five status codes into those that deserve a retry and those that only repeat the damage.

| Code | What triggers it | Retry? | Fix per Zendesk docs |
|---|---|---|---|
| 401 | Credentials rejected, or the wrong token type for the auth scheme | No | Correct the credential or token type |
| 403 | Valid credentials, but the user lacks permission | No | Grant the role or access the call needs |
| 422 | Payload fails validation | No | Correct the request body |
| 429 | Request limit exceeded | Yes, after waiting | Wait the number of seconds in `Retry-After` |
| 5xx | Zendesk-side failure | Yes, with backoff and a cap | Retry later; escalate if it persists |

If you get a 401, Zendesk didn't accept who you are, and retrying sends the same bad credential again. A 403 means it knows you but refuses the action, so the fix is a permission change, not a loop.

When the body is wrong, which is what a 422 means, resending it fails identically, and in a backlog run that's thousands of identical failures. Log the offending record and move on.

### Zendesk API 429 Rate Limits and Retry-After

On a 429, read `Retry-After` and sleep that long. Plan limits are only part of it, because some endpoints cap well below the account limit.

Assume the account-wide ceiling on a bulk update and you will hit 429s early, because [Zendesk](https://developer.zendesk.com/api-reference/ticketing/ticket-management/incremental_exports/) allows 100 requests per minute on update ticket.

Deep ticket listing is held to 50 requests per minute, so paging through history runs at half that speed. Incremental export allows just 10 requests per minute, so a sync loop polling faster than one call every six seconds is throttled by design.

![Zendesk endpoints with tighter limits than the account](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/ab55aea4-d71a-4733-8964-0ee9bfd46f5f/zendesk-api-authentication-and-creating-a-ticket-6d968fee.svg "Source: Zendesk")

### When to Retry Zendesk API 5xx Errors

Retry 5xx errors, but with exponential backoff and a hard cap on attempts. The duplicates came from here. A create call can time out after Zendesk has already written the ticket, and an instant retry writes it again.

**Send an idempotency key with every create, or look the record up before retrying.** Without one, a retry rule is a duplicate generator.

## The Rules That Now Guard the Ticket Integration

Put six rules in before the first backlog night, not after the first failure; the duplicate check is only one of them.

**Testing never produces the failures these rules answer**, because a quiet sandbox never pushes the Zendesk API (the ticketing system this integration writes to) hard enough to show them. The Monday checklist:

- Honour Retry-After with backoff
- Self-imposed cap below the tightest endpoint limit
- Queue for the backlog
- Duplicate check before create
- Alert on every non-2xx run
- Token in a secret manager, rotated

Those six are the spec, whether you type the code or describe it to a tool. The rest of this section says what each one prevents.

### Zendesk API Backoff and Retry Limits

When the API says you're going too fast, it returns a rate-limit response with a Retry-After header. Read the header and wait that long. A fixed sleep you guessed at will either hammer the endpoint while it's still refusing you or idle for no reason.

Set your own cap below the tightest limit on any endpoint you call, not below the plan's headline limit. If you sit exactly at the limit, any other tool sharing the account tips you over.

Put the backlog in a queue and drain it at the capped rate, so a night's worth of tickets becomes a longer run instead of a burst of refusals.

### Preventing Duplicate Zendesk Tickets on Retry

Before creating a ticket, look for one that already carries the same external ID or requester and subject. Without that lookup, a retry after a timeout creates a second ticket for the same event, and the customer gets two replies from two agents.

![Import dialog for HubSpot Tickets Categorization workflow template in Activepieces](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/4473c9c3-43e1-4aa8-a332-f435ed3d0e45/summarizing-shared-inbox-threads-with-workflow-a-6a378550.webp)

Add backoff without a duplicate check and it gets worse, not better, because every retry of a timed-out create is another chance to write twice. The check is a read before the write, and it costs one extra call per create. Budget it inside your cap.

### Alerts and token hygiene

Alert on every non-2xx result. A run that swallows an error and reports success is the worst outcome here, because nobody learns about it until a customer asks where their ticket went.

Then open the run trace after the first real backlog and confirm the waits, the cap and the lookups actually happened.

Keep the API token in a secret manager and rotate it. A token pasted into a workflow field is a credential in every export, screenshot and chat log.

Rotation only works if the integration reads the secret at run time, so a new value never needs a code change.

## Calling Zendesk Without Code Using Activepieces

To call Zendesk without code, Activepieces, whose MIT-licensed core ships with 750 integrations, moves the credential and the retry rule out of your script and into a settings panel on each step.

![Activepieces workflow builder showing a Skyvern agent task step with API configuration fields and failure handling options.](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/e773f985-47ff-4e08-b329-e17a067db6e5/activepieces-vs-temporal-for-workflow-automation-4b459e5d.webp)

Activepieces addresses one part of this article.

The secret lives in a connection you set once, and on the Ultimate plan or an enterprise self-hosted install that connection's secret can sit in your own secret manager, while a failing call can be retried by a toggle instead of a loop you have to write.

### What the Zendesk integration covers

When the ticket starts somewhere else, the Zendesk integration (one of those 750, roughly 60% of which are community-contributed) handles the common case.

A form submission, a chat message or a row in a spreadsheet triggers the flow, and a step creates the ticket in Zendesk.

You enter authentication in the connection dialog rather than in code, so rotating a token means editing one connection and every flow that uses it picks up the new value. That's the run-time read the previous section asked for, supplied by the product.

You set retries per step. The screenshot below shows the configuration panel of a different integration, Skyvern's Get Workflow/Task Run. The controls are the same ones you get on a Zendesk step: a "Continue on Failure" toggle and a "Retry on Failure" toggle.

![Activepieces workflow builder showing a Send HTTP request step configured with Google Search RapidAPI credentials.](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/da977bec-9b3b-44ea-89dc-d64f009a35fe/opus-clip-integration-how-to-set-it-up-2026-guid-8ea5333c.webp)

Just above it sits step 6, a "Delay For" step, which is the pattern to copy for a backlog night: pause, then call, then retry only if the call fails.

Take two things from this. The toggles are blunt: they switch retrying on or off, and the panel gives you no place to say "back off on a 429, stop on a 401."

![A control panel with two plain toggle switches, on and off, and a wide blank area with empty screw holes where finer dials…](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/ceafe48b-05ae-46cd-b8df-cbe0463b7d98/zendesk-api-authentication-and-creating-a-ticket-a126be36.webp)

And "Continue on Failure" lets the flow carry on past a dead step, which on a backlog night means silent gaps instead of a visible stop.

### Where the raw API is still needed

If you need an endpoint the integration doesn't expose, such as a bulk operation or a specific search, you reach it through the HTTP step in the same flow, which sends a raw request to the Zendesk API.

An integration covers only the actions its authors built.

At that point you're back to specifying the endpoint, the token type and the error handling yourself, just inside a box instead of a file.

Either way, the rule from earlier still holds. Decide your retry and cap behaviour before building, then open the run history after a real batch and check that the steps retried and stopped as you specified.

A green test run with one ticket proves none of that.

## Frequently asked questions

### Is the Zendesk API free to use?

There is no per-call charge. API access comes with your plan, so the cost of a heavy run is the rate limit, not a bill.

When you exceed your plan's limit, Zendesk answers with a 429. Nothing is lost when the request was explicitly rejected (not half-processed), so you resend it after the wait in the `Retry-After` header; a timed-out create call is different.

For your plan's exact limit, see Zendesk's rate-limit page for developers, and the response headers on live calls report what you have left.

### Can I use the Zendesk API on a trial account?

Yes, a trial is a real Zendesk account, so you can create an API token and call the endpoints. Treat it as a prototype environment only.

Whatever passes on a trial tells you nothing about a backlog night, and plan-dependent features and limits may differ from the account you'll run in production. Re-check rate behavior on the paid plan before you trust it.

### How do I create a ticket on behalf of a customer?

Send a POST to the tickets endpoint with a `requester` object holding the customer's name and email. Zendesk matches an existing user by email or creates one, and the ticket belongs to that customer, not to whoever owns the credentials.

Authenticate as an agent or admin. If you already hold the customer's user ID, pass `requester_id` instead, which avoids accidental duplicate users from mistyped addresses.

### Do Zendesk API tokens expire?

No timer expires an API token. It works until someone deactivates or deletes it, so a forgotten token is a standing credential, and you should rotate it when staff leave.

With OAuth it is different: access tokens are issued through an app you register and can be set to expire.

Your integration then needs refresh logic or it'll start failing with authorization errors at an unpredictable hour. Check which type your integration holds before you debug anything else.

### Does Zendesk have a sandbox for testing the API?

Confirm your plan includes one: Zendesk offers sandboxes, but not on every plan.

A sandbox is a separate copy of your account with its own subdomain, which means you point the integration at that address and use credentials created inside it.

It is the safe place to test retry and cap rules against realistic volume without touching live customers.

Remember that sandbox data is a copy, so refresh it before a test that depends on current tickets.

## Related reading

- [Automating Zendesk Ticket Routing by Chat Workflow](https://www.activepieces.com/blog/automating-zendesk-ticket-routing-by-chat-workflow)
- [Ultimate Guide to Automating Zendesk Ticket Alerts on Slack](https://www.activepieces.com/blog/automating-zendesk-ticket-alerts-on-slack)
- [Get Ntfy Notifications About New Zendesk Ticket (Step by Step)](https://www.activepieces.com/blog/ntfy-notifications-about-new-zendesk-tickets)

## References

- [Zendesk](https://developer.zendesk.com/api-reference/ticketing/ticket-management/incremental_exports/)
- [MetricNet via Onur Ergur](https://onurergur.medium.com/scaling-saas-support-with-agentic-ai-ee11cd57e05d)
- [Tidio](https://www.tidio.com/blog/zendesk-review/)
