Users 10 endpoints

POST /api/v2/users/request_create

Sends the owner a reminder email to update their subscription so more agents can be created.

Allowed For

  • Agents
operationId: Users_requestCreateReminder

Request Body

required
application/json
schema UserRequest
Property Type Required
user object required

Responses

200

description

POST /api/v2/users/request_create
GET /api/v2/users/search

Returns an array of users who meet the search criteria.

Pagination

  • Offset pagination only

See Using Offset Pagination.

Allowed For

  • Admins, Agents and Light Agents
operationId: Users_searchResults

Parameters

Name In Required Type Description
query query optional string

The query parameter supports the Zendesk search syntax for more advanced
user searches. It can specify a partial or full value of any
user property, including name, email address, notes, or phone. Example:
query="jdoe".
See the Search API.

external_id query optional string

The external_id parameter does not support the search syntax. It only accepts ids.

Responses

200

Success response

GET /api/v2/users/search
GET /api/v2/users/show_many

Accepts a comma-separated list of up to 100 user ids or external ids.

Allowed For:

  • Agents
operationId: Users_getMany

Parameters

Name In Required Type Description
ids query optional string

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

external_ids query optional string

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

Responses

200

Success response

GET /api/v2/users/show_many
PUT /api/v2/users/update_many
operationId: Users_updateMany

Parameters

Name In Required Type Description
ids query optional string

Id of the users to update. Comma separated

external_ids query optional string

External Id of the users to update. Comma separated

Request Body

required
application/json
schema UsersUpdateManyRequest

Responses

200

Successful response

PUT /api/v2/users/update_many
DELETE /api/v2/users/{user_id}

Deletes the user and associated records from the account.

Warning:

  • Deleted users are not recoverable.
  • Both agents and administrators can soft delete users in the agent interface in Zendesk Support. Agents with permission can delete end users, while administrators can delete all users except the account owner.

To comply with GDPR, a further step is needed. See Permanently Delete User.

Allowed For

operationId: Users_deleteUser

Parameters

Name In Required Type Description
user_id path optional integer

The id of the user

Responses

200

Success response

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

Allowed For

  • Agents
operationId: Users_showUser

Parameters

Name In Required Type Description
user_id path optional integer

The id of the user

Responses

200

Success response

GET /api/v2/users/{user_id}
PUT /api/v2/users/{user_id}
operationId: Users_updateUser

Parameters

Name In Required Type Description
user_id path optional integer

The id of the user

Request Body

required
application/json
schema UserRequest
Property Type Required
user object required

Responses

200

Success response

PUT /api/v2/users/{user_id}
GET /api/v2/users/{user_id}/compliance_deletion_statuses

Returns the GDPR status for each user per area of compliance. A Zendesk area of compliance is typically a product like “support/explore” but can be more fine-grained for areas within the product lines.

If the user is not in the account, the request returns a 404 status.

Status: 404
{
  "error":"RecordNotFound",
  "description":"Not found"
}

Allowed For

  • Agents, with restrictions

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

operationId: Users_showComplianceDeletionStatuses

Parameters

Name In Required Type Description
user_id path optional integer

The id of the user

application query optional string

Area of compliance

Responses

200

Success response

GET /api/v2/users/{user_id}/compliance_deletion_statuses
PUT /api/v2/users/{user_id}/merge

Merges the end user specified in the path parameter into the existing end user specified in the request body.

Any two end users can be merged with the exception of end users created by sharing agreements.

Agents and admins cannot be merged.

For more information about how user data is merged, see Merging a user’s duplicate account in Zendesk help.

Allowed For

  • Admins or agents with permission to edit end users
operationId: Users_mergeEndUser

Parameters

Name In Required Type Description
user_id path optional integer

The id of the user

Request Body

required
application/json
schema UserRequest
Property Type Required
user object required

Responses

200

Success response

PUT /api/v2/users/{user_id}/merge
GET /api/v2/users/{user_id}/related
operationId: Users_showRelatedInfo

Parameters

Name In Required Type Description
user_id path optional integer

The id of the user

Responses

200

Success response

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

Views 19 endpoints

GET /api/v2/views

Lists shared and personal views available to the current user.

Sideloads

The following sideloads are supported:

Name Will sideload
app_installation The app installation that requires each view, if present
permissions The permissions for each view

Pagination

  • Cursor pagination (recommended, but only sorts by created_at)
  • Offset pagination

See Pagination.

Returns a maximum of 100 records per page.

Allowed For

  • Agents
operationId: Views_listAvailable

Parameters

Name In Required Type Description
access query optional string

Only views with given access. May be “personal”, “shared”, or “account”

active query optional boolean

Only active views if true, inactive views if false

group_id query optional integer

Only views belonging to given group

sort_by query optional string

Possible values are “alphabetical”, “created_at”, or “updated_at”. Defaults to “position”

sort_order query optional string

One of “asc” or “desc”. Defaults to “asc” for alphabetical and position sort, “desc” for all others

Responses

200

Success response

GET /api/v2/views
POST /api/v2/views

Allowed For

  • Agents

JSON Format

The JSON format consists of one property, a view object that lists the values to set when the view is created.

Note: The request must include at least one condition in the all array that checks one of the following fields: status, type, group_id, assignee_id, or requester_id.

Name Description
title Required. The title of the view
all Required. An array of one or more conditions. A ticket must meet all of them to be included in the view. See Conditions reference
any An array of one or more conditions. A ticket must meet any of them to be included in the view. See Conditions reference
description The description of the view
active Allowed values are true or false. Determines if the view is displayed or not
output An object that specifies the columns to display. Example: "output": {"columns": ["status", "description", "priority"]}. See View columns
restriction An object that describes who can access the view. To give all agents access to the view, omit this property

The restriction object has the following properties.

Name Comment
type Allowed values are “Group” or “User”
id The numeric ID of a single group or user
ids The numeric IDs of a single or more groups. Recommended for “Group” type

If type is “Group”, the ids property is the preferred method of specifying the group id or ids.

Example Request Body

{
  "view": {
    "title": "Kelly's tickets",
    "raw_title": "{{dc.tickets_assigned_to_kelly}}",
    "description": "Tickets that are assigned to Kelly",
    "active": true,
    "position": 3,
    "restriction": {
      "type": "User",
      "id": "213977756"
    },
    "all": [
      {
        "field": "status",
        "operator": "less_than",
        "value": "solved"
      },
      {
        "field": "group_id",
        "operator": "is",
        "value": "24000932"
      },
      {
        "field": "custom_fields_360011872073",
        "operator": "is",
        "value": "Canada"
      },
      ...
    ],
    "output": {
      "columns": ["status", "requester", "assignee"],
      "group_by": "assignee",
      "group_order": "desc",
      "sort_by": "status",
      "sort_order": "desc"
    }
  }
}

View columns

The output request parameter lets you specify what columns to include in the view in the agent interface. Example: "output": {"columns": ["status", "description", "priority"]}. The following table lists possible columns for views in the agent UI and the corresponding values in the columns array.

For custom fields, specify the id of the custom field in the columns array.

You can specify a total of 10 columns to a view.

View column title in UI Value
Assigned assigned
Assignee assignee
Due Date due_date
Group group
ID nice_id
Updated updated
Assignee updated updated_assignee
Requester updated updated_requester
Updater updated_by_type
Organization organization
Priority priority
Requested created
Requester requester
Requester language locale_id
Satisfaction satisfaction_score
Solved solved
Status category status
Subject description
Submitter submitter
Ticket form ticket_form
Type type
Brand brand
Ticket status custom_status_id

View sorting

You can group and sort items in the view by adding items to the output parameter:

Attribute Description
group_by, sort_by Sort or group the tickets by a column in the View columns table. The subject and submitter columns are not supported
group_order, sort_order Either “asc” or “desc”
operationId: Views_createNewView

Responses

200

Success response

POST /api/v2/views
GET /api/v2/views/active

Lists active shared and personal views available to the current user.

Sideloads

The following sideloads are supported:

Name Will sideload
app_installation The app installation that requires each view, if present
permissions The permissions for each view

Pagination

  • Offset pagination

See Pagination.

Returns a maximum of 100 records per page.

Allowed For

  • Agents
operationId: Views_listActiveViews

Parameters

Name In Required Type Description
access query optional string

Only views with given access. May be “personal”, “shared”, or “account”

group_id query optional integer

Only views belonging to given group

sort_by query optional string

Possible values are “alphabetical”, “created_at”, or “updated_at”. Defaults to “position”

sort_order query optional string

One of “asc” or “desc”. Defaults to “asc” for alphabetical and position sort, “desc” for all others

Responses

200

Success response

GET /api/v2/views/active
GET /api/v2/views/compact

A compacted list of shared and personal views available to the current user. This endpoint never returns more than 32 records and does not respect the “per_page” option.

Allowed For

  • Agents
operationId: Views_listCompactViews

Responses

200

Success response

GET /api/v2/views/compact
GET /api/v2/views/count

Returns an approximate count of shared and personal views available to the current user. If the count exceeds 100,000, the count will return a cached result. This cached result will update every 24 hours.

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: Views_getCount

Responses

200

Count of views

GET /api/v2/views/count
GET /api/v2/views/count_many

Returns the ticket count of each view in a list of views. Accepts up to 20 view ids per request. For the ticket count of a single view, see Count Tickets in View.

Only returns values for personal and shared views accessible to the user performing the request.

This endpoint is rate limited to 6 requests every 5 minutes.

Allowed For

  • Agents
operationId: Views_getTicketCountForManyViews

Parameters

Name In Required Type Description
ids query required string

List of view’s ids separated by commas.

Responses

200

Success response

GET /api/v2/views/count_many
DELETE /api/v2/views/destroy_many

Deletes the views corresponding to the provided list of IDs.

Allowed For

  • Agents
operationId: Views_bulkDelete

Parameters

Name In Required Type Description
ids query required string

The IDs of the views to delete

Responses

204

No Content response

DELETE /api/v2/views/destroy_many
POST /api/v2/views/preview

You can preview views by constructing the conditions in the proper format and nesting them under the view property. See Conditions reference. The output can also be controlled by passing in any of the following parameters and nesting them under the output property.

Name Type Comment
columns Array The ticket fields to display. System fields are looked up by name, custom fields by title or id. See the View columns table
group_by String When present, the field by which the tickets are grouped
group_order String The direction the tickets are grouped. May be one of “asc” or “desc”
sort_order String The direction the tickets are sorted. May be one of “asc” or “desc”
sort_by String The ticket field used for sorting. This will either be a title or a custom field id.

This endpoint is rate limited to 5 requests per minute, per view, per agent.

Allowed For

  • Agents
operationId: Views_previewCreate

Responses

200

Success response

POST /api/v2/views/preview
POST /api/v2/views/preview/count

Returns the ticket count for a single preview.

Allowed For

  • Agents
operationId: Views_getTicketCount

Responses

200

Success response

POST /api/v2/views/preview/count
GET /api/v2/views/search

Pagination

  • Offset pagination only

See Using Offset Pagination.

Allowed For

  • Agents

Sideloads

The following sideloads are supported. For more information, see Side-loading.

Name Will sideload
app_installation The app installation that requires each view, if present
permissions The permissions for each view
operationId: Views_searchResults

Parameters

Name In Required Type Description
query query required string

Query string used to find all views with matching title

access query optional string

Filter views by access. May be “personal”, “shared”, or “account”

active query optional boolean

Filter by active views if true or inactive views if false

group_id query optional integer

Filter views by group

sort_by query optional string

Possible values are “alphabetical”, “created_at”, “updated_at”, and “position”. If unspecified, the views are sorted by relevance

sort_order query optional string

One of “asc” or “desc”. Defaults to “asc” for alphabetical and position sort, “desc” for all others

include query optional string

A sideload to include in the response. See Sideloads

Responses

200

Success response

GET /api/v2/views/search
GET /api/v2/views/show_many

Allowed For

  • Agents

Sideloads

The following sideloads are supported:

Name Will sideload
app_installation The app installation that requires each view, if present
permissions The permissions for each view
operationId: Views_listByIds

Parameters

Name In Required Type Description
ids query required string

List of view’s ids separated by commas.

active query optional boolean

Only active views if true, inactive views if false

Responses

200

Success response

GET /api/v2/views/show_many
PUT /api/v2/views/update_many

Allowed For

  • Agents

Request Parameters

The PUT request expects a views object that lists the views to update.

Each view may have the following properties:

Name Mandatory Description
id yes The ID of the view to update
position no The new position of the view
active no The active status of the view (true or false)

Example Request Body

{
  "views": [
    {"id": 25, "position": 3},
    {"id": 23, "position": 5},
    {"id": 27, "position": 9},
    {"id": 22, "position": 7}
  ]
}
operationId: Views_updateMany

Responses

200

Success response

PUT /api/v2/views/update_many
DELETE /api/v2/views/{view_id}

Allowed For

  • Agents
operationId: Views_deleteView

Parameters

Name In Required Type Description
view_id path optional integer

The ID of the view

Responses

204

No Content response

DELETE /api/v2/views/{view_id}
GET /api/v2/views/{view_id}

Allowed For

  • Agents
operationId: Views_showView

Parameters

Name In Required Type Description
view_id path optional integer

The ID of the view

Responses

200

Success response

GET /api/v2/views/{view_id}
PUT /api/v2/views/{view_id}

Allowed For

  • Agents

JSON Format

The PUT request takes one property, a view object that lists the values to update. All properties are optional.

Note: Updating a condition updates the containing array, clearing the other conditions. Include all your conditions when updating any condition.

Name Description
title The title of the view
all An array of one or more conditions. A ticket must meet all the conditions to be included in the view. The PUT request replaces all existing conditions. See Conditions reference
any An array of one or more conditions. A ticket must meet any of them to be included in the view. At least one all condition must be defined with the any conditions. The PUT request replaces all existing any conditions. See Conditions reference
active Allowed values are true or false. Determines if the view is displayed or not
output An object that specifies the columns to display. Example: "output": {"columns": ["status", "description," "priority"]}. See View columns
restriction An object that describes who can access the view. To give all agents access to the view, omit this property

The restriction object has the following properties.

Name Comment
type Allowed values are “Group” or “User”
id The numeric ID of a single group or user
ids The numeric IDs of a single or more groups. Recommended for “Group” type

If type is “Group”, the ids property is the preferred method of specifying the group id or ids.

You can also update how items are sorted and grouped. See View sorting in Create View.

Example Request Body

{
  "view": {
    "title": "Code red tickets",
    "restriction": {
      "type": "Group",
      "ids": [10052, 10057, 10062, 10002]
    },
    "all": [
      {
        "field": "priority",
        "operator": "is",
        "value": "urgent"
      }
    ],
    "output": {
      "columns": ["status", "requester", "assignee", "updated"]
    }
  }
}
operationId: Views_updateView

Parameters

Name In Required Type Description
view_id path optional integer

The ID of the view

Responses

200

Success response

PUT /api/v2/views/{view_id}
GET /api/v2/views/{view_id}/count

Returns the ticket count for a single view.

This endpoint is rate limited to 5 requests per minute, per view, per agent.

View Counts

The view count endpoints, Count Tickets in View (this endpoint) and Count Tickets in Views, let you estimate how many tickets remain in a view without having to retrieve the entire view. They’re designed to help estimate view size. From a business perspective, accuracy becomes less relevant as view size increases.

To ensure quality of service, these counts are cached more heavily as the number of tickets in a view grows. For a view with thousands of tickets, you can expect the count to be cached for 60-90 minutes. As a result, the count may not reflect the actual number of tickets in your view.

View counts are represented as JSON objects with the following attributes:

Name Type Comment
view_id integer The id of the view
url string The API url of the count
value integer The cached number of tickets in the view. Can also be null if the system is loading and caching new data. Not to be confused with 0 tickets
pretty string A pretty-printed text approximation of the view count
fresh boolean false if the cached data is stale and the system is still loading and caching new data
active boolean Only active views if true, inactive views if false, all views if null.

Example

{
  "view_count": {
    "view_id": 25,
    "url":     "https://company.zendesk.com/api/v2/views/25/count.json",
    "value":   719,
    "pretty":  "~700",
    "fresh":   true
  }
}
operationId: Views_countTickets

Parameters

Name In Required Type Description
view_id path optional integer

The ID of the view

Responses

200

Success response

GET /api/v2/views/{view_id}/count
GET /api/v2/views/{view_id}/execute

Returns the column titles and the rows of the specified view.

The columns array lists the view’s column titles and includes only views parameters.

The rows array lists the values of each column for each ticket and includes parameters from both views and tickets. Though not displayed in the view, a partial ticket object is included with each row object.

Note: To get the full ticket objects for a specified view, use List Tickets from a View.

This endpoint is rate limited to 5 requests per minute, per view, per agent.

The view execution system is designed for periodic rather than high-frequency API usage. In particular, views called very frequently may be cached by Zendesk. This means that the API client will still receive a result, but that result may have been computed at any time within the last 10 minutes.

Zendesk recommends using the Incremental Ticket Export endpoint to get the latest changes. You can call it more often, and it returns all the tickets that changed since the last poll. For details and rate limits, see Incremental Exports.

View output sorting can be controlled by passing the sort_by and sort_order parameters in the format described in the table in Preview Views.

Allowed For

  • Agents

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

operationId: Views_executeView

Parameters

Name In Required Type Description
view_id path optional integer

The ID of the view

sort_by query optional string

The ticket field used for sorting. This will either be a title or a custom field id.

sort_order query optional string

The direction the tickets are sorted. May be one of ‘asc’ or ‘desc’

Responses

200

Success response

GET /api/v2/views/{view_id}/execute
GET /api/v2/views/{view_id}/export

Returns the csv attachment of the specified view if possible. Enqueues a job to produce the csv if necessary.

Allowed For

  • Agents
operationId: Views_exportCsv

Parameters

Name In Required Type Description
view_id path optional integer

The ID of the view

Responses

200

Success response

GET /api/v2/views/{view_id}/export
GET /api/v2/views/{view_id}/tickets

Allowed For

  • Agents

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

operationId: Views_listTicketsFromView

Parameters

Name In Required Type Description
view_id path optional integer

The ID of the view

sort_by query optional string

Sort or group the tickets by a column in the View columns table. The subject and submitter columns are not supported

sort_order query optional string

One of “asc” or “desc”. Defaults to “asc” for alphabetical and position sort, “desc” for all others

Responses

200

Success response

GET /api/v2/views/{view_id}/tickets

Workspaces 7 endpoints

GET /api/v2/workspaces

Allowed For

  • Admins, Agents
operationId: Workspaces_list

Responses

200

Success Response

GET /api/v2/workspaces
POST /api/v2/workspaces

Allowed For

  • Admins
operationId: Workspaces_createNew

Request Body

application/json
schema WorkspacesCreateNewRequest
Property Type Required
workspace object optional
title string optional
macros array optional
conditions object optional
all array optional
field string optional
value string optional
operator string optional
any array optional
field string optional
value string optional
operator string optional
description string optional
ticket_form_id number optional

Responses

201

Created workspace

POST /api/v2/workspaces
DELETE /api/v2/workspaces/destroy_many

Allowed For

  • Admins
operationId: Workspaces_bulkDelete

Parameters

Name In Required Type Description
ids query required array

The ids of the workspaces to delete

Responses

200

Succesful response

DELETE /api/v2/workspaces/destroy_many
PUT /api/v2/workspaces/reorder

Allowed For

  • Admins
operationId: Workspaces_reorderWorkspaces

Request Body

application/json
schema WorkspacesReorderWorkspacesRequest
Property Type Required
ids array optional

Responses

200

Succesful response

PUT /api/v2/workspaces/reorder
DELETE /api/v2/workspaces/{workspace_id}

Allowed For

  • Admins
operationId: Workspaces_deleteWorkspace

Parameters

Name In Required Type Description
workspace_id path optional integer

The id of the workspace

Responses

204

No Content

DELETE /api/v2/workspaces/{workspace_id}
GET /api/v2/workspaces/{workspace_id}

Allowed For

  • Admins
operationId: Workspaces_getWorkspace

Parameters

Name In Required Type Description
workspace_id path optional integer

The id of the workspace

Responses

200

Successful response

GET /api/v2/workspaces/{workspace_id}
PUT /api/v2/workspaces/{workspace_id}

Allowed For

  • Admins
operationId: Workspaces_updateWorkspace

Parameters

Name In Required Type Description
workspace_id path optional integer

The id of the workspace

Request Body

application/json
schema WorkspacesUpdateWorkspaceRequest
Property Type Required
workspace object optional
title string optional
macros array optional
conditions object optional
all array optional
field string optional
value string optional
operator string optional
any array optional
field string optional
value string optional
operator string optional
description string optional
ticket_form_id number optional

Responses

200

OK

PUT /api/v2/workspaces/{workspace_id}

Xchannel 4 endpoints

GET /api/v2/channels/twitter/monitored_twitter_handles

Allowed For

  • Admins
  • Agents
operationId: XChannel_listMonitoredHandles

Responses

200

Success response

GET /api/v2/channels/twitter/monitored_twitter_handles
GET /api/v2/channels/twitter/monitored_twitter_handles/{monitored_twitter_handle_id}

Allowed For

  • Admins
  • Agents
operationId: XChannel_showMonitoredHandle

Parameters

Name In Required Type Description
monitored_twitter_handle_id path optional integer

The ID of the custom agent role

Responses

200

Success response

GET /api/v2/channels/twitter/monitored_twitter_handles/{monitored_twitter_handle_id}
POST /api/v2/channels/twitter/tickets

Turns a tweet into a ticket. You must provide the tweet id as well as the id of a monitored X (formerly Twitter) handle configured for your account.

The submitter of the ticket is set to be the user submitting the API request.

Allowed For

  • Agents
operationId: XChannel_tweetToTicket

Responses

201

description

POST /api/v2/channels/twitter/tickets
GET /api/v2/channels/twitter/tickets/{comment_id}/statuses

Allowed For

  • Agents
operationId: XChannel_listTicketStatuses

Parameters

Name In Required Type Description
comment_id path optional integer

The ID of the comment

ids query optional string

Optional comment ids to retrieve tweet information for only particular comments

Responses

200

Success response

GET /api/v2/channels/twitter/tickets/{comment_id}/statuses