Ticketfields 6 endpoints

GET /api/v2/ticket_fields/{ticket_field_id}

Allowed for

  • Agents

Sideloads

The following sideloads are supported:

Name Will sideload
users The user or users that created the ticket field
operationId: TicketFields_showField

Parameters

Name In Required Type Description
ticket_field_id path optional integer

The ID of the ticket field

creator query optional boolean

If true, displays the creator_user_id and creator_app_name properties. If the ticket field is created
by an app, creator_app_name is the name of the app and creator_user_id is -1. If the ticket field
is not created by an app, then creator_app_name is null

Responses

200

Success response

GET /api/v2/ticket_fields/{ticket_field_id}
PUT /api/v2/ticket_fields/{ticket_field_id}

Updating drop-down field options

You can also use the update endpoint to add, update, or remove options in a drop-down custom field. Updating field options for multi-select fields works exactly the same as drop-down field options.

Important: Unless you want to remove some options, you must specify all existing options in any update request. Omitting an option removes it from the drop-down field, which removes its values from any tickets or macros.

Use the custom_field_options attribute to update the options. The attribute consists of an array of option objects, with each object consisting of a name and value property. The properties correspond to the “Title” and “Tag” text boxes in the admin interface. Example request body:

{"ticket_field": {
    "custom_field_options": [
      {"name": "Apple Pie", "value": "apple"},
      {"name": "Pecan Pie", "value": "pecan"}
    ]
  }
}

Example Request

curl https://{subdomain}.zendesk.com/api/v2/ticket_fields/{id}.json \
  -d '{"ticket_field": {"custom_field_options": [{"name": "Apple Pie", "value": "apple"}, {"name": "Pecan Pie", "value": "pecan"}]}}' \
  -H "Content-Type: application/json" -X PUT \
  -v -u {email_address}:{password}

Example Response

Status: 200 OK

{
  "ticket_field": {
    "id":21938362,
    "type":"tagger",
    "title":"Pies",
    ...
    "custom_field_options": [
      {
        "id":21029772,
        "name":"Apple Pie",
        "raw_name":"Apple Pie",
        "value":"apple",
        "default":false
      },
      ...
    ]
  }
}

Allowed for

  • Admins
operationId: TicketFields_updateFieldOptions

Parameters

Name In Required Type Description
ticket_field_id path optional integer

The ID of the ticket field

creator query optional boolean

If true, displays the creator_user_id and creator_app_name properties. If the ticket field is created
by an app, creator_app_name is the name of the app and creator_user_id is -1. If the ticket field
is not created by an app, then creator_app_name is null

Responses

200

Success response

PUT /api/v2/ticket_fields/{ticket_field_id}
GET /api/v2/ticket_fields/{ticket_field_id}/options

Returns a list of custom ticket field options for the given drop-down ticket field.

Allowed For

  • Agents

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

operationId: TicketFields_listOptions

Parameters

Name In Required Type Description
ticket_field_id path optional integer

The ID of the ticket field

Responses

200

Success response

GET /api/v2/ticket_fields/{ticket_field_id}/options
POST /api/v2/ticket_fields/{ticket_field_id}/options

Creates or updates an option for the given drop-down ticket field.

To update an option, include the id of the option in the custom_field_option object. Example:

{"custom_field_option": {"id": 10002, "name": "Pineapples", ... }

If an option exists for the given ID, the option will be updated. Otherwise, a new option will be created.

Response

Returns one of the following status codes:

  • 200 with Location: /api/v2/ticket_fields/{ticket_field_id}/options.json if the ticket field option already exists in the database
  • 201 with Location: /api/v2/ticket_fields/{ticket_field_id}/options.json if the ticket field option is new

Allowed For

  • Admins

Rate Limit

You can make 100 requests every 1 minute using this endpoint.
The rate limiting mechanism behaves as described in
Monitoring your request activity in the API introduction.

Field Option Limits

  • 2000 options per ticket field
operationId: TicketFields_createOrUpdateOption

Parameters

Name In Required Type Description
ticket_field_id path optional integer

The ID of the ticket field

Responses

200

Success response

201

Created response

POST /api/v2/ticket_fields/{ticket_field_id}/options
DELETE /api/v2/ticket_fields/{ticket_field_id}/options/{ticket_field_option_id}

Allowed for

  • Admins
operationId: TicketFields_deleteOption

Parameters

Name In Required Type Description
ticket_field_id path optional integer

The ID of the ticket field

ticket_field_option_id path optional integer

The ID of the ticket field option

Responses

204

No Content response

DELETE /api/v2/ticket_fields/{ticket_field_id}/options/{ticket_field_option_id}
GET /api/v2/ticket_fields/{ticket_field_id}/options/{ticket_field_option_id}

Allowed for

  • Agents
operationId: TicketFields_showOptionById

Parameters

Name In Required Type Description
ticket_field_id path optional integer

The ID of the ticket field

ticket_field_option_id path optional integer

The ID of the ticket field option

Responses

200

Success response

GET /api/v2/ticket_fields/{ticket_field_id}/options/{ticket_field_option_id}

Ticketforms 8 endpoints

GET /api/v2/ticket_forms

Returns a list of all ticket forms for your account if accessed as an admin or agent. End users only see ticket forms that have end_user_visible set to true.

Allowed For

  • Anyone
operationId: TicketForms_listAllForms

Parameters

Name In Required Type Description
active query optional boolean

true returns active ticket forms; false returns inactive ticket forms. If not present, returns both

end_user_visible query optional boolean

true returns ticket forms where end_user_visible; false returns ticket forms that are not end-user visible. If not present, returns both

fallback_to_default query optional boolean

true returns the default ticket form when the criteria defined by the parameters results in a set without active and end-user visible ticket forms

associated_to_brand query optional boolean

true returns the ticket forms of the brand specified by the url’s subdomain

Responses

200

Success response

GET /api/v2/ticket_forms
POST /api/v2/ticket_forms

Allowed For

  • Admins
operationId: TicketForms_createNewForm

Responses

201

Created response

POST /api/v2/ticket_forms
PUT /api/v2/ticket_forms/reorder

Allowed For

  • Admins

Request Parameters

You can pass in the following parameter in the payload:

Name Type Comment
ticket_form_ids array An array of ticket form ids. Example: “[2, 23, 46, 50]”
operationId: TicketForms_reorderForms

Responses

200

Success response

PUT /api/v2/ticket_forms/reorder
GET /api/v2/ticket_forms/show_many

Takes an ids query parameter that accepts a comma-separated list of up to 100 ticket form ids. This endpoint is used primarily by the mobile SDK and the Web Widget.

Allowed For

  • Anyone
operationId: TicketForms_getMany

Parameters

Name In Required Type Description
ids query required string

IDs of the ticket forms to be shown

active query optional boolean

true returns active ticket forms; false returns inactive ticket forms. If not present, returns both

end_user_visible query optional boolean

true returns ticket forms where end_user_visible; false returns ticket forms that are not end-user visible. If not present, returns both

fallback_to_default query optional boolean

true returns the default ticket form when the criteria defined by the parameters results in a set without active and end-user visible ticket forms

associated_to_brand query optional boolean

true returns the ticket forms of the brand specified by the url’s subdomain

Responses

200

Success response

GET /api/v2/ticket_forms/show_many
DELETE /api/v2/ticket_forms/{ticket_form_id}

Allowed For

  • Admins
operationId: TicketForms_deleteForm

Parameters

Name In Required Type Description
ticket_form_id path optional integer

The ID of the ticket form

Responses

204

No Content response

DELETE /api/v2/ticket_forms/{ticket_form_id}
GET /api/v2/ticket_forms/{ticket_form_id}

Allowed For

  • Admins, Agents, and End Users
operationId: TicketForms_showForm

Parameters

Name In Required Type Description
ticket_form_id path optional integer

The ID of the ticket form

Responses

200

Success response

GET /api/v2/ticket_forms/{ticket_form_id}
PUT /api/v2/ticket_forms/{ticket_form_id}

Allowed For

  • Admins
operationId: TicketForms_updateForm

Parameters

Name In Required Type Description
ticket_form_id path optional integer

The ID of the ticket form

Responses

200

Success response

PUT /api/v2/ticket_forms/{ticket_form_id}
POST /api/v2/ticket_forms/{ticket_form_id}/clone

Allowed For

  • Admins
operationId: TicketForms_cloneExistingForm

Parameters

Name In Required Type Description
ticket_form_id path optional integer

The ID of the ticket form

Responses

200

Success response

POST /api/v2/ticket_forms/{ticket_form_id}/clone

Ticketimport 2 endpoints

POST /api/v2/imports/tickets

Allowed For

  • Admins
operationId: TicketImport_executeTicketImport

Parameters

Name In Required Type Description
archive_immediately query optional boolean

If true, any ticket created with a closed status bypasses the normal ticket lifecycle and will be created directly in your ticket archive

Request Body

application/json
schema TicketImportRequest
Property Type Required
ticket object optional
tags array optional
subject string optional
comments array optional
value string optional
id integer optional
via object optional
source object optional
channel string optional
body string optional
type string optional
public boolean optional
uploads array optional
audit_id integer optional
metadata object optional
author_id integer optional
html_body string optional
created_at string optional
plain_body string optional
attachments array optional
id integer optional
url string optional
size integer optional
width string optional
height string optional
inline boolean optional
deleted boolean optional
file_name string optional
content_url string optional
content_type string optional
mapped_content_url string optional
malware_scan_result string optional
malware_access_override boolean optional
thumbnails array optional
assignee_id integer optional
description string optional
requester_id integer optional

Responses

201

Successfully created

POST /api/v2/imports/tickets
POST /api/v2/imports/tickets/create_many

Accepts an array of up to 100 ticket objects.

Allowed For

  • Admins
operationId: TicketImport_bulkCreateMany

Parameters

Name In Required Type Description
archive_immediately query optional boolean

If true, any ticket created with a closed status bypasses the normal ticket lifecycle and will be created directly in your ticket archive

Request Body

application/json
schema TicketBulkImportRequest
Property Type Required
tickets array optional
tags array optional
subject string optional
comments array optional
value string optional
id integer optional
via object optional
source object optional
channel string optional
body string optional
type string optional
public boolean optional
uploads array optional
audit_id integer optional
metadata object optional
author_id integer optional
html_body string optional
created_at string optional
plain_body string optional
attachments array optional
id integer optional
url string optional
size integer optional
width string optional
height string optional
inline boolean optional
deleted boolean optional
file_name string optional
content_url string optional
content_type string optional
mapped_content_url string optional
malware_scan_result string optional
malware_access_override boolean optional
thumbnails array optional
assignee_id integer optional
description string optional
requester_id integer optional

Responses

200

Successful response

POST /api/v2/imports/tickets/create_many

Ticketmetricevents 1 endpoints

GET /api/v2/incremental/ticket_metric_events

Returns ticket metric events that occurred on or after the start time.

Cursor pagination returns a maximum of 100 records per page. Events are listed in chronological order.

If the results are not paginated, events will be returned as a time-based incremental export.

See Time-based incremental exports.

Pagination

  • Cursor pagination

See Pagination.

Allowed For

  • Admins
operationId: TicketMetricEvents_list

Parameters

Name In Required Type Description
start_time query required integer

The Unix UTC epoch time of the oldest event you’re interested in. Example: 1332034771.

Responses

200

Successful response

GET /api/v2/incremental/ticket_metric_events

Ticketmetrics 2 endpoints

GET /api/v2/ticket_metrics

Returns a list of tickets with their metrics.

Tickets are ordered chronologically by created date, from newest to oldest.
The last ticket listed may not be the absolute oldest ticket in your account
due to ticket archiving.

Archived tickets are not included in the response. See
About archived tickets in
Zendesk help.

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

Returns a maximum of 100 records per page.

Allowed For

  • Agents
operationId: TicketMetrics_listMetrics

Responses

200

Success response

GET /api/v2/ticket_metrics
GET /api/v2/ticket_metrics/{ticket_metric_id}

Returns a specific metric, or the metrics of a specific ticket.

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

Returns a maximum of 100 records per page.

Allowed For

  • Agents
operationId: TicketMetrics_showSpecificMetric

Parameters

Name In Required Type Description
ticket_metric_id path required string

The id of the ticket metric to retrieve

Responses

200

Success response

GET /api/v2/ticket_metrics/{ticket_metric_id}

Ticketskips 2 endpoints

POST /api/v2/skips

Record a new ticket skip for the current user.

Allowed For

  • Agents
operationId: TicketSkips_recordNewSkip

Responses

201

Success response

POST /api/v2/skips
GET /api/v2/users/{user_id}/skips

Archived tickets are not included in the response. See
About archived tickets in
the Support Help Center.

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

Returns a maximum of 100 records per page.

Allowed For

  • Agents with “View only” or higher reports permissions in Support.
    These permissions are distinct from Explore permissions.
  • Agents retrieving their own skips
operationId: TicketSkips_list

Parameters

Name In Required Type Description
user_id path optional integer

User ID of an agent

sort_order query optional string

Sort order. Defaults to “asc”

ticket_id path optional integer

The ID of the ticket

Responses

200

Success response

GET /api/v2/users/{user_id}/skips

Tickets 25 endpoints

GET /api/v2/deleted_tickets

Returns a maximum of 100 deleted tickets per page. See Pagination.

The results includes all deleted (and not yet archived) tickets that
have not yet been scrubbed in the past 30 days. Archived tickets are
not included in the results. See About archived tickets
in the Support Help Center.

The tickets are ordered chronologically by created date, from oldest to newest.
The first ticket listed may not be the oldest ticket in your
account due to ticket archiving.

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

Returns a maximum of 100 records per page.

Allowed For

  • Agents

Rate Limit

You can make 10 requests every 1 minute using this endpoint.
When making requests beyond page 100, you can make 5 requests every 1 minute.
The rate limiting mechanism behaves as described in
Monitoring your request activity in the API introduction.

operationId: Tickets_listDeleted

Parameters

Name In Required Type Description
sort_by query optional string

Sort by

sort_order query optional string

Sort order. Defaults to “asc”

Responses

200

Successful response

GET /api/v2/deleted_tickets
DELETE /api/v2/deleted_tickets/destroy_many

Permanently deletes up to 100 soft-deleted tickets. See Soft delete
in the Zendesk GDPR docs. To soft delete tickets, use the Bulk Delete Tickets endpoint.

This endpoint accepts a comma-separated list of up to 100 ticket ids. It enqueues
a ticket deletion job and returns a payload with the jobs status.

If one ticket fails to be deleted, the endpoint still attempts to delete the others. If the job succeeds,
the tickets that were successfully deleted are permanently deleted. This operation can’t be undone.

This endpoint returns a job_status JSON object and queues a background job to do the work. Use the Show Job Status endpoint to check for the job’s completion. Only a certain number of jobs can be queued or running at the same time. See Job limit for more information.

Allowed For

  • Agents
operationId: Tickets_deleteMany

Parameters

Name In Required Type Description
ids query optional string

Comma-separated list of ticket ids

Responses

200

Successful response

DELETE /api/v2/deleted_tickets/destroy_many
PUT /api/v2/deleted_tickets/restore_many

Allowed For

  • Agents
operationId: Tickets_restoreBulkTickets

Parameters

Name In Required Type Description
ids query optional string

Comma-separated list of ticket ids

Responses

200

Empty response

PUT /api/v2/deleted_tickets/restore_many
DELETE /api/v2/deleted_tickets/{ticket_id}

Permanently deletes a soft-deleted ticket. See Soft delete
in the Zendesk GDPR docs. To soft delete a ticket, use the Delete Ticket endpoint.

This endpoint enqueues a ticket deletion job and returns a payload with the jobs status.

If the job succeeds, the ticket is permanently deleted. This operation can’t be undone.

This endpoint returns a job_status JSON object and queues a background job to do the work.
Use the Show Job Status endpoint to check for the job’s completion.

Allowed For

  • Agents
operationId: Tickets_deletePermanently

Parameters

Name In Required Type Description
ticket_id path optional integer

The ID of the ticket

Responses

200

Successful response

DELETE /api/v2/deleted_tickets/{ticket_id}
PUT /api/v2/deleted_tickets/{ticket_id}/restore

Allowed For

  • Agents
operationId: Tickets_restoreTicket

Parameters

Name In Required Type Description
ticket_id path optional integer

The ID of the ticket

Responses

200

Empty response

PUT /api/v2/deleted_tickets/{ticket_id}/restore
GET /api/v2/problems

The response is always ordered by updated_at in descending order

Allowed For

  • Agents

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

operationId: Tickets_listProblems

Responses

200

Successful response

GET /api/v2/problems
POST /api/v2/problems/autocomplete

Returns tickets whose type is “problem” and whose subject contains the string specified in the text parameter.

You can specify the text parameter in the request body rather than the query string. Example:

{"text": "fire"}

Allowed For

  • Agents
operationId: Tickets_autocompleteProblems

Parameters

Name In Required Type Description
text query optional string

The text to search for

Request Body

application/json
schema TicketsAutocompleteProblemsRequest
Property Type Required
text string optional

Responses

200

Successful response

POST /api/v2/problems/autocomplete
GET /api/v2/tickets
operationId: Tickets_list

Parameters

Name In Required Type Description
external_id query optional string

Lists tickets by external id. External ids don’t have to be unique for each ticket. As a result, the request may return multiple tickets with the same external id.

Responses

200

List tickets

GET /api/v2/tickets
POST /api/v2/tickets
operationId: Tickets_createNewTicket

Request Body

application/json
schema TicketCreateRequest
Property Type Required
ticket object optional
tags array optional
type string optional
due_at string optional
status string optional
comment object required
id integer optional
via object optional
source object optional
channel string optional
body string optional
type string optional
public boolean optional
uploads array optional
audit_id integer optional
metadata object optional
author_id integer optional
html_body string optional
created_at string optional
plain_body string optional
attachments array optional
id integer optional
url string optional
size integer optional
width string optional
height string optional
inline boolean optional
deleted boolean optional
file_name string optional
content_url string optional
content_type string optional
mapped_content_url string optional
malware_scan_result string optional
malware_access_override boolean optional
thumbnails array optional
subject string optional
group_id integer optional
priority string optional
email_ccs array optional
action string optional
user_id string optional
user_email string optional
user_name string optional
followers array optional
action string optional
user_id string optional
user_email string optional
problem_id integer optional
assignee_id integer optional
external_id string optional
safe_update boolean optional
requester_id integer optional
custom_fields array optional
id integer optional
key string required
tag string optional
url string optional
type string required
title string required
active boolean optional
system boolean optional
position integer optional
raw_title string optional
created_at string optional
updated_at string optional
description string optional
raw_description string optional
relationship_filter object optional
custom_field_options array optional
id integer optional
url string optional
name string required
value string required
position integer optional
raw_name string optional
regexp_for_validation string optional
relationship_target_type string optional
updated_stamp string optional
assignee_email string optional
organization_id integer optional
collaborator_ids array optional
…15 more object optional

Responses

201

Create ticket

POST /api/v2/tickets
GET /api/v2/tickets/count

Returns an approximate count of tickets in the account. If the count exceeds 100,000, it is updated every 24 hours.

ccd lists tickets that the specified user is cc’d on.

The count[refreshed_at] property is a timestamp that indicates when the count was last updated.

Note: When the count exceeds 100,000, count[refreshed_at] may occasionally be null.
This indicates that the count is being updated in the background, and count[value] is limited to 100,000 until the update is complete.

Allowed For

  • Agents
operationId: Tickets_countTickets

Responses

200

Count of tickets

GET /api/v2/tickets/count
POST /api/v2/tickets/create_many

Accepts an array of up to 100 ticket objects. Note: Every ticket created with this endpoint may be affected by your business rules, which can include sending email notifications to your end users. If you are importing historical tickets or creating more than 1000 tickets, consider using the Ticket Bulk Import endpoint.

This endpoint returns a job_status JSON object and queues a background job to do the work. Use the Show Job Status endpoint to check for the job’s completion. Only a certain number of jobs can be queued or running at the same time. See Job limit for more information.

Allowed For

  • Agents
operationId: Tickets_createMany

Request Body

application/json
schema TicketsCreateRequest
Property Type Required
tickets array optional
tags array optional
type string optional
due_at string optional
status string optional
comment object required
id integer optional
via object optional
source object optional
channel string optional
body string optional
type string optional
public boolean optional
uploads array optional
audit_id integer optional
metadata object optional
author_id integer optional
html_body string optional
created_at string optional
plain_body string optional
attachments array optional
id integer optional
url string optional
size integer optional
width string optional
height string optional
inline boolean optional
deleted boolean optional
file_name string optional
content_url string optional
content_type string optional
mapped_content_url string optional
malware_scan_result string optional
malware_access_override boolean optional
thumbnails array optional
subject string optional
group_id integer optional
priority string optional
email_ccs array optional
action string optional
user_id string optional
user_email string optional
user_name string optional
followers array optional
action string optional
user_id string optional
user_email string optional
problem_id integer optional
assignee_id integer optional
external_id string optional
safe_update boolean optional
requester_id integer optional
custom_fields array optional
id integer optional
key string required
tag string optional
url string optional
type string required
title string required
active boolean optional
system boolean optional
position integer optional
raw_title string optional
created_at string optional
updated_at string optional
description string optional
raw_description string optional
relationship_filter object optional
custom_field_options array optional
id integer optional
url string optional
name string required
value string required
position integer optional
raw_name string optional
regexp_for_validation string optional
relationship_target_type string optional
updated_stamp string optional
assignee_email string optional
organization_id integer optional
collaborator_ids array optional
…15 more object optional

Responses

200

Create many tickets

POST /api/v2/tickets/create_many
DELETE /api/v2/tickets/destroy_many

Accepts a comma-separated list of up to 100 ticket ids.

Allowed For

  • Admins
  • Agents with permission to delete tickets

Agent delete permissions are set in Support. See
Deleting tickets
in the Support Help Center.

This endpoint returns a job_status JSON object and queues a background job to do the work. Use the Show Job Status endpoint to check for the job’s completion. Only a certain number of jobs can be queued or running at the same time. See Job limit for more information.

operationId: Tickets_bulkDelete

Parameters

Name In Required Type Description
ids query optional string

Comma-separated list of ticket ids

Responses

200

Successful response

DELETE /api/v2/tickets/destroy_many
PUT /api/v2/tickets/mark_many_as_spam

Accepts a comma-separated list of up to 100 ticket ids.

This endpoint returns a job_status JSON object and queues a background job to do the work. Use the Show Job Status endpoint to check for the job’s completion. Only a certain number of jobs can be queued or running at the same time. See Job limit for more information.

Allowed For

  • Agents
operationId: Tickets_markManyAsSpam

Parameters

Name In Required Type Description
ids query optional string

Comma-separated list of ticket ids

Responses

200

Successful response

PUT /api/v2/tickets/mark_many_as_spam
GET /api/v2/tickets/show_many

Accepts a comma-separated list of ticket ids to return.

This endpoint will return up to 100 tickets records.

Allowed For

  • Agents
operationId: Tickets_showMany

Parameters

Name In Required Type Description
ids query optional string

Comma-separated list of ticket ids

Responses

200

List tickets

GET /api/v2/tickets/show_many
PUT /api/v2/tickets/update_many

Accepts an array of up to 100 ticket objects, or a comma-separated list of up to 100 ticket ids.

operationId: Tickets_updateMany

Parameters

Name In Required Type Description
ids query optional string

Comma-separated list of ticket ids

Responses

200

Successful response

PUT /api/v2/tickets/update_many
DELETE /api/v2/tickets/{ticket_id}

Allowed For

  • Admins
  • Agents with permission to delete tickets

Agent delete permissions are set in Support. See
Deleting tickets
in the Support Help Center.

Ticket deletion rate limit

You can delete 400 tickets every 1 minute using this endpoint.
The rate limiting mechanism behaves as described in
Rate limits in the API introduction.
Zendesk recommends that you obey the Retry-After header values.
To delete many tickets, you may use Bulk Delete Tickets.

operationId: Tickets_deleteTicket

Parameters

Name In Required Type Description
ticket_id path optional integer

The ID of the ticket

Responses

204

No content

DELETE /api/v2/tickets/{ticket_id}
GET /api/v2/tickets/{ticket_id}

Returns a number of ticket properties though not the ticket comments. To get the comments, use List Comments

Allowed For

  • Agents
operationId: Tickets_showTicketDetails

Parameters

Name In Required Type Description
ticket_id path optional integer

The ID of the ticket

Responses

200

Ticket

GET /api/v2/tickets/{ticket_id}
PUT /api/v2/tickets/{ticket_id}
operationId: Tickets_updateTicket

Parameters

Name In Required Type Description
ticket_id path optional integer

The ID of the ticket

Request Body

application/json
schema TicketUpdateRequest
Property Type Required
ticket object optional
tags array optional
type string optional
due_at string optional
status string optional
comment object optional
id integer optional
via object optional
source object optional
channel string optional
body string optional
type string optional
public boolean optional
uploads array optional
audit_id integer optional
metadata object optional
author_id integer optional
html_body string optional
created_at string optional
plain_body string optional
attachments array optional
id integer optional
url string optional
size integer optional
width string optional
height string optional
inline boolean optional
deleted boolean optional
file_name string optional
content_url string optional
content_type string optional
mapped_content_url string optional
malware_scan_result string optional
malware_access_override boolean optional
thumbnails array optional
subject string optional
group_id integer optional
priority string optional
email_ccs array optional
action string optional
user_id string optional
user_email string optional
user_name string optional
followers array optional
action string optional
user_id string optional
user_email string optional
problem_id integer optional
assignee_id integer optional
external_id string optional
safe_update boolean optional
requester_id integer optional
custom_fields array optional
id integer optional
key string required
tag string optional
url string optional
type string required
title string required
active boolean optional
system boolean optional
position integer optional
raw_title string optional
created_at string optional
updated_at string optional
description string optional
raw_description string optional
relationship_filter object optional
custom_field_options array optional
id integer optional
url string optional
name string required
value string required
position integer optional
raw_name string optional
regexp_for_validation string optional
relationship_target_type string optional
updated_stamp string optional
assignee_email string optional
organization_id integer optional
collaborator_ids array optional
…4 more object optional

Responses

200

Successful request

PUT /api/v2/tickets/{ticket_id}
GET /api/v2/tickets/{ticket_id}/collaborators

Allowed For

  • Agents
operationId: Tickets_listCollaborators

Parameters

Name In Required Type Description
ticket_id path optional integer

The ID of the ticket

Responses

200

Successful response

GET /api/v2/tickets/{ticket_id}/collaborators
GET /api/v2/tickets/{ticket_id}/email_ccs

Returns any users cc’d on the ticket.

Availability

The CCs and Followers feature must be enabled in Zendesk Support.

If the feature is not enabled, the default CC functionality is used. In that case, use List Collaborators to list the users cc’ed on the ticket.

Allowed For

  • Agents
operationId: Tickets_getEmailCCs

Parameters

Name In Required Type Description
ticket_id path optional integer

The ID of the ticket

Responses

200

Successful response

GET /api/v2/tickets/{ticket_id}/email_ccs
GET /api/v2/tickets/{ticket_id}/followers

Returns any users who follow the ticket.

Availability

The CCs and Followers feature must be enabled in Zendesk Support.

Allowed For

  • Agents
operationId: Tickets_listFollowers

Parameters

Name In Required Type Description
ticket_id path optional integer

The ID of the ticket

Responses

200

Successful response

GET /api/v2/tickets/{ticket_id}/followers
GET /api/v2/tickets/{ticket_id}/incidents

Allowed For

  • Agents

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

operationId: Tickets_listIncidents

Parameters

Name In Required Type Description
ticket_id path optional integer

The ID of the ticket

Responses

200

Successful response

GET /api/v2/tickets/{ticket_id}/incidents
PUT /api/v2/tickets/{ticket_id}/mark_as_spam

Allowed For

  • Agents
operationId: Tickets_markAsSpamAndSuspendRequester

Parameters

Name In Required Type Description
ticket_id path optional integer

The ID of the ticket

Responses

200

Successful response

PUT /api/v2/tickets/{ticket_id}/mark_as_spam
POST /api/v2/tickets/{ticket_id}/merge

Merges one or more tickets into the ticket with the specified id.

See Merging tickets
in the Support Help Center for ticket merging rules.

Any attachment to the source ticket is copied to the target ticket.

This endpoint returns a job_status JSON object and queues a background job to do the work. Use the Show Job Status endpoint to check for the job’s completion. Only a certain number of jobs can be queued or running at the same time. See Job limit for more information.

Allowed For

  • Agents

Agents in the Enterprise account must have merge permissions.
See Creating custom roles and assigning agents (Enterprise)
in the Support Help Center.

Available parameters

The request takes a data object with the following properties:

Name Type Required Comments
ids array yes Ids of tickets to merge into the target ticket
target_comment string no Private comment to add to the target ticket. This comment is optional but strongly recommended
source_comment string no Private comment to add to the source ticket. This comment is optional but strongly recommended
target_comment_is_public boolean no Whether comments in the target ticket are public or private
source_comment_is_public boolean no Whether comments in the source tickets are public or private

target_comment and source_comment can be used to provide a reason for the merge for recordkeeping purposes. If the source ticket has attachments, they are included in target_comment.

Comments are private and can’t be modified in the following cases:

  • Any of the sources or target tickets are private
  • Any of the sources or target tickets were created through X (formerly Twitter), Facebook or the Channel framework

In any other case, comments default to private but can be modified with the comment privacy parameters.

operationId: Tickets_mergeIntoTarget

Parameters

Name In Required Type Description
ticket_id path optional integer

The ID of the ticket

Request Body

application/json
schema TicketMergeInput
Property Type Required
ids array required
source_comment string optional
target_comment string optional
source_comment_is_public boolean optional
target_comment_is_public boolean optional

Responses

200

Successful response

POST /api/v2/tickets/{ticket_id}/merge
GET /api/v2/tickets/{ticket_id}/related

The request returns a data object with the following properties:

Name Type Comment
topic_id string Related topic in the Web portal (deprecated feature)
followup_source_ids array Sources to follow up
from_archive boolean Is true if the current ticket is archived
incidents integer A count of related incident occurrences
twitter object X (formerly Twitter) information associated with the ticket

Allowed For

  • Agents
operationId: Tickets_getRelatedInfo

Parameters

Name In Required Type Description
ticket_id path optional integer

The ID of the ticket

Responses

200

Successful response

GET /api/v2/tickets/{ticket_id}/related

Triggercategories 4 endpoints

GET /api/v2/trigger_categories

Returns all the trigger categories in the account.

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

operationId: TriggerCategories_getList

Parameters

Name In Required Type Description
page query optional object

Pagination parameters

sort query optional string

Sort parameters

include query optional string

Allowed sideloads

Responses

200

A paged array of trigger categories

400

Error

403

Error

GET /api/v2/trigger_categories
POST /api/v2/trigger_categories

Creates a trigger category.

operationId: TriggerCategories_createCategory

Request Body

required
application/json
schema TriggerCategoriesCreateCategoryRequest
Property Type Required
trigger_category object optional
name string required
position integer optional

Responses

200

The created trigger category

400

Error

403

Error

POST /api/v2/trigger_categories
POST /api/v2/trigger_categories/jobs

Creates a job that performs a batch operation for the given trigger categories.

operationId: TriggerCategories_createBatchJob

Request Body

required
application/json
schema BatchJobRequest
Property Type Required
job object optional
items object optional
triggers array optional
id string required
active boolean optional
position integer optional
category_id string optional
trigger_categories array optional
id string required
position integer required
action string optional

Responses

200

The response to the batch job

400

Error

POST /api/v2/trigger_categories/jobs
DELETE /api/v2/trigger_categories/{trigger_category_id}

Deletes the trigger category with the specified ID.

operationId: TriggerCategories_deleteById

Parameters

Name In Required Type Description
trigger_category_id path required string

The id of the trigger category to delete

Responses

204

No content

400

Error

404

Error

DELETE /api/v2/trigger_categories/{trigger_category_id}
Load more endpoints