This is the reference documentation for the Zendesk Support API, which is also known as the Ticketing API. You can use the Support API with tickets, users, and organizations and manage ticket workflows.

Any general mechanisms and conventions, such as pagination and authentication, work as described in theZendesk API introductionand are considered implied in this text.

In addition to the reference docs, the following resources are available:

Run in Postman

If you use Postman, you can import the Support API endpoints as a collection into your Postman app, then try out different requests to learn how the API works. Click the following button to get started:

Run in Postman

If you don't use Postman, you can sign up for a free account on thePostman websiteand download the app. For more information about using Postman with Zendesk APIs, seeExploring Zendesk APIs with Postman.

Document conventions

For information on the syntax and style conventions used in the docs, seeDocumentation conventions在一般的API‘茵特罗德女士’uction.

Examples

For information on the examples in the docs, seeExamples在一般的API‘茵特罗德女士’uction.

Security and authentication

For information on the authentication required to use the API, seeSecurity and authentication在一般的API‘茵特罗德女士’uction.

Rate limits

For information on the number of requests allowed per minute, seeRate limits在一般的API‘茵特罗德女士’uction.

Request format

For information on requests, seeRequests在一般的API‘茵特罗德女士’uction.

Response format

For information on the HTTP status codes returned by the API, seeResponse format在一般的API‘茵特罗德女士’uction.

Idempotency

The Ticketing API lets you specify anidempotencykey that allows you to retry a ticket creation request without the risk of creating duplicate records.

To specify an idempotency key, provide aIdempotency-Key: {unique_key}header with your request.

Example:

             
curl https://{subdomain}.亚博.com/api/v2/tickets.json \-d”{“票”:{“主题”:“打印机脱机", \"comment": { "body": "My printer is offline. Restarting doesn’t help." }}}'\-H"Content-Type: application/json"-H“Idempotency-Key: 12345”\-v-u user:password-XPOST

This creates the following response, which also includes ax-idempotency-lookup: missheader:

             
Status201Created{"ticket":{"url":"https://{subdomain}.zendesk.com/api/v2/tickets/3.json","id":3,"subject":"Printer offline",...}}

If you repeat the same request using the same body and idempotency key, another ticket is not created. Instead, you'll get the same response as before that is cached under the idempotency key. This time the response includes ax-idempotency-lookup: hitheader:

             
Status201Created{"ticket":{"url":"https://{subdomain}.zendesk.com/api/v2/tickets/3.json","id":3,"subject":"Printer offline",...}}

If you create a request using the same idempotency key but with a different body, you'll receive the following error:

             
400BadRequest:{"error":"IdempotentRequestError","description":"Request parameters don't match the given idempotency key"}

Keys expire after two hours. If a request with a duplicate key is sent two hours after the original request, the request will create a new ticket.

The idempotency key is not stored as part of the ticket response. You will not be able to see the key when the ticket is opened.

Data types

For information on data types used in the API, seeData types在一般的API‘茵特罗德女士’uction.

Pagination

For information on paginating through list endpoints, seePagination在一般的API‘茵特罗德女士’uction.

Your use and access to the API is expressly conditioned on your compliance with the policies, restrictions, and other provisions related to the API set forth in ourAPI Restrictions and Responsibilities, in ourChange Policy, and in the other documentation we provide you. You must also comply with the restrictions set forth in theMain Services Agreementand theZendesk Privacy Policy, in all uses of the API. If Zendesk believes that you have or attempted to violate any term, condition, or the spirit of these policies or agreements, your right to access and use the API may be temporarily or permanently revoked.