Admin's guide to the Zendesk API

<h2 id="h_01J68AG8V35J795YZV1JJ10ACJ">What is the Zendesk API?</h2><p>An API, or Application Programming Interface, is a tool for software applications. If you think of a restaurant, the waiter carries dishes from the kitchen to your table. The API works in a similar way: It takes data from one point to another. In the API, the dish is called a <em>resource</em>, and the waiter that carries it to you is called an <em>endpoint</em>. Think of a specific dish you might request at the restaurant. Some endpoints bring you back a collection of items like a sampler platter. An example of this in the API would be the <a href="https://developer.zendesk.com/rest_api/docs/core/users#list-users">List Users endpoint</a>. It returns a list of all users in your Zendesk Support account. Some endpoints like the <a href="https://developer.zendesk.com/rest_api/docs/core/users#show-user">Show User endpoint</a> are more focused and just return a single thing.</p><p>You can also use the API to make changes to things in Zendesk. Imagine telling a waiter how you'd like your steak cooked. The chef will actually change the steak to suit you. The API is a powerful resource that many of our customers use to bulk-import resources, create apps, pull data to external sources, and more.</p><p>Most of the reference documentation for the Zendesk API is available in the <a href="https://developer.zendesk.com/api-reference/" target="_self">API reference section</a> of the Zendesk Developer Portal. The reference documentation describes all the available endpoints. You can also use the <a href="https://developer.zendesk.com/documentation/">Zendesk developer guide</a> to get started. While the documentation is comprehensive, we'll be going over how to decode and use them in this article.</p><h2 id="h_01J68AG8V4CKK9CMRFHXD9JWFZ">Why use the API?</h2><p>Now that you know what the API is, you may be wondering, "Why should I care?" In a nutshell, you can use the API to add functionality that's not available in the UI (either natively or at your plan level) at a much faster pace than attempting to do it all by hand.</p><p>For accounts currently on the Essential or Team plans, using the API allows you to have a direct method for exporting your data without needing to upgrade to Professional, (which allows for automated data exports). Similarly, you may use the API to get ticket data for reporting purposes. The API can return all information related to a ticket, so you may use the API output to pass data into a third party reporting application.</p><p>The ability to quickly update many records is another benefit of using the API. For example, while you're only able to create a single organization at a time in the agent interface, you could create up to 100 organizations at a time with the API. In the same vein, the restrictions on how many items you can update at a time is higher with the API. The interface allows for 60 tickets to be edited at once, while the API allows up to 100 tickets.</p><p>Other common tasks include:</p><ul>
<li data-list-item-id="e990b86a7e7c5ffc3525775838ae491cb">Creating tickets</li>
<li data-list-item-id="e46a4e05da6194f60968bfebafcc8f717">Migrating ticket data into Zendesk from another system</li>
<li data-list-item-id="ecdcf5f67c4cf06d31c3e6d130c84e338">Editing users in bulk</li>
<li data-list-item-id="ec946e3cb326671017c04ce35a31bf994">Searching records</li>
<li data-list-item-id="e79ace2cc2df1ea6c6e27d9e0e4d00cc5"><a href="https://developer.zendesk.com/documentation/ticketing/using-the-zendesk-api/common-tasks-for-the-zendesk-support-api">And many more</a></li>
</ul><p>Now that we've outlined why you'd want to use the API, let's look at how to make an API request.</p><h2 id="h_01J68AG8V4TBR6AT76FZ4DFAVV">Format</h2><p>The Zendesk API returns data in a lightweight format called JSON. See <a href="https://developer.zendesk.com/documentation/developer-tools/getting-started/working-with-json">Working with JSON</a> in the Zendesk Help Center. You can view the formatted data in a web browser by installing a JSON viewer extension for <a href="https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?hl=en">Chrome</a> or <a href="https://addons.mozilla.org/en-us/firefox/addon/jsonview/">Firefox</a>.</p><p>JSON looks like this:</p><pre class="wysiwyg-code-block"><code class="language-auto">{
"posts": [
{
"id": 35467,
"title": "How do I open the safe"
},
{
"id": 35468,
"title": "How do I reset the combination?"
},
]
}</code></pre><p>A typical endpoint looks like this:</p><p><code>subdomain.zendesk.com/api/v2/users/me.json</code></p><p>Endpoints can perform the following actions:</p><ul>
<li data-list-item-id="e8de2c5ea534bb6ad42e32c5034569aad">
<strong>GET</strong> - Retrieve items </li>
<li data-list-item-id="eb89a8eb3ca21a8facf3f60e4c0e31e9a">
<strong>POST</strong> - Create items that didn't exist before</li>
<li data-list-item-id="ea8084e7a00832d5d6ba17806017b6f77">
<strong>PUT</strong> - Update existing items</li>
<li data-list-item-id="e827806dd1d1b5238faaeed306b420596">
<strong>DELETE</strong> - Remove items</li>
</ul><p>In a browser, you can only make GET requests. You can perform the other actions using tools like cURL or <a href="https://developer.zendesk.com/documentation/developer-tools/working-with-the-zendesk-apis/exploring-zendesk-apis-with-postman" target="_self">Postman</a>.</p><h3 id="h_01J68AG8V4PNZSVS34NCJC0ZK2">cURL</h3><p>The reference documentation uses cURL in all the endpoint examples. cURL is a command-line tool that lets you try API commands without a browser. For more information, see <a href="https://developer.zendesk.com/documentation/developer-tools/getting-started/installing-and-using-curl">Installing and Using cURL</a> in the Zendesk Help Center. You can use cURL for any of the 4 types of calls. It comes pre-installed on a Mac, but you'll need to install it in Windows. For instructions, see <a href="https://developer.zendesk.com/documentation/developer-tools/getting-started/installing-and-using-curl">Installing cURL</a> in the Zendesk Help Center.</p><h3 id="h_01J68AG8V4J4R30XZGK21JYZD4">Status of your requests</h3><p>For every API request you make, you receive a response that lets you know if it worked or not. If not, the response will provide clues as to why the request didn't work. These responses are called <em>status codes</em>. Some of the basic ones are as follows:</p><ul>
<li data-list-item-id="e89625df05ce682b377c6fec18f7f4598">200 - The request was successful</li>
<li data-list-item-id="e684efd14eb79a57af9e5a8ed3731f79b">400 - Request was unsuccessful</li>
<li data-list-item-id="e2bcc2880dec49f6bc2762d4020ec0c31">409 - Merge or constraint error, try the call again</li>
<li data-list-item-id="ece111f4ff876d1a765927385e66a40f9">422 - Un-processible Entity</li>
<li data-list-item-id="e7015cc9fe9a2a0bb87f3808468d3ceef">429 - Rate limit has been exceeded</li>
<li data-list-item-id="e0003ce7dcd78f9de9f3267fb7a8a984a">500 - Warning or temporary state, contact support if it persists</li>
</ul><p>See <a href="https://developer.zendesk.com/api-reference/introduction/requests/#response-format">Response Format</a> in the API docs for more details about the status codes.</p><h2 id="h_01J68AG8V4MPFEA9T1XPWZ3RFY">Practice</h2><p>Now that we've walked through the basics of an API, let's  use it to search through our tickets.</p><p>Let's say I'm a user on the Team level plan and I've been using tags to track when tickets are escalated to different levels of support. The tags I add are <em>escalation_one</em> and <em>escalation_two</em>.</p><p>Now, I want to generate a report of every ticket in my system that has ever hit both escalations. I tried to make a view to return these tickets, but this did not meet my needs because archived tickets were not shown. What do I do now?</p><p>Answer: Use the API to get the tickets</p><p>To do so, you'll want to check out the <a href="https://developer.zendesk.com/rest_api/docs/core/search">Search API endpoint</a>. This endpoint <strong>does not</strong> filter out archived tickets, so you can use it to return a list of all tickets that include these two tags. Similarly, the Search API is a simple GET call, so you can use it directly in your browser if you're signed in to Zendesk Support on another tab in the browser. The format of the Search endpoint is as follows:</p><p><code>subdomain.zendesk.com/api/v2/search.json?query={search_string}</code></p><p>Important: Make sure to replace "subdomain" with your account subdomain.</p><p>The search API is very flexible and the query can use anything outlined in the <a href="https://support.zendesk.com/hc/en-us/articles/4408886879258">Zendesk Search reference</a>. In our example, since we're simply looking for tags, the only parameter we'll use in our search string is "tags". To search for multiple tags, simply add a comma between the tags after the "tags" parameter. Your call should now look like:</p><p><code>https://subdomain.zendesk.com/api/v2/search.json?query=tags:escalation_one,escalation_two</code></p><p>To authenticate the request, make sure you're an agent or an administrator, and that you're signed in to Zendesk Support on another tab in your browser.</p><p>Running this call in your browser will return a list of tickets with <strong>both </strong>of these tags. You can then save the JSON output for future use.</p><p>The API is a powerful tool. From here you can start delving further with the following resources:</p><ul>
<li data-list-item-id="e647f3c673d8ea16ffd4717c994d6d1b7"><a href="https://developer.zendesk.com/api-reference/ticketing/introduction/">API reference documentation</a></li>
<li data-list-item-id="ebef5f060dcec169e6278c83355f4c30e"><a href="https://developer.zendesk.com/documentation/">Zendesk developer documentation</a></li>
</ul><script id="docs-schema-markup" type="application/ld+json">{
"@context": "https://schema.org",
"@type": "TechArticle",
"@id": "https://support.zendesk.com/hc/en-us/articles/4408827565338",
"url": "https://support.zendesk.com/hc/en-us/articles/4408827565338-Admin-s-guide-to-the-Zendesk-API",
"headline": "Admin's guide to the Zendesk API",
"description": "You can use the API to retrieve, create, update, and delete data programmatically, enabling tasks like bulk data management and exporting information beyond the user interface capabilities.",
"articleSection": "Extending Zendesk",
"datePublished": "2021-10-16T03:30:59+00:00",
"dateModified": "2026-02-23T23:26:14+00:00",
"inLanguage": "en-US",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/4408827565338"
},
"author": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"publisher": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"isPartOf": {
"@type": "WebSite",
"name": "Zendesk Help",
"@id": "https://support.zendesk.com/hc/"
},
"about": {
"@type": "SoftwareApplication",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
}
}</script>