/api/v2/requests/search
Examples:
GET /api/v2/requests/search.json?query=printerGET /api/v2/requests/search.json?query=printer&organization_id=1GET /api/v2/requests/search.json?query=printer&cc_id=trueGET /api/v2/requests/search.json?query=printer&status=hold,openThe Search Requests endpoint returns up to 1,000 results per query, with a maximum of 100 results per page. See Pagination. If you request a page past the limit (page=11 at 100 results per page), a 422 Insufficient Resource Error is returned.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| query | query | optional | string | The syntax and matching logic for the string is detailed in the Zendesk Support search reference. See also Query basics in the Tickets API doc. |
Success response
GET /api/v2/requests/search
/api/v2/requests/{request_id}
The following sideloads are supported:
| Name | Will sideload |
|---|---|
| users | The email ccs for a request by side-loading users |
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| request_id | path | optional | integer | The ID of the request |
Success response
GET /api/v2/requests/{request_id}
/api/v2/requests/{request_id}
Updates a request with a comment or collaborators (cc’s). The end user who created the request can also use it to mark the request as solved. The endpoint can’t be used to update other request attributes.
This endpoint can only update the following properties in the request.
| Name | Type | Required | Description |
|---|---|---|---|
| comment | object | no | Adds a comment to the request. See Request comments |
| solved | boolean | no | Marks the request as solved. Example: {"request": {"solved": "true"}}. End users can mark requests as solved only if the request’s can_be_solved_by_me property is true. The property is true only when the ticket is assigned to an agent and the ticket type is not a problem but a question, task, or incident |
| additional_collaborators | array | no | Adds collaborators to the request. An email notification is sent to them when the ticket is updated. See Adding collaborators |
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| request_id | path | optional | integer | The ID of the request |
Success response
PUT /api/v2/requests/{request_id}
/api/v2/requests/{request_id}/comments
See Pagination.
By default, comments are sorted by creation date in ascending order.
When using cursor pagination, use the following parameter to change the sort order:
| Name | Type | Required | Comments |
|---|---|---|---|
sort |
string | no | Possible values are “created_at” (ascending order) or “-created_at” (descending order) |
When using offset pagination, use the following parameters to change the sort order:
| Name | Type | Required | Comments |
|---|---|---|---|
sort_by |
string | no | One of created_at, updated_at |
sort_order |
string | no | One of asc, desc |
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| request_id | path | optional | integer | The ID of the request |
| since | query | optional | string | Filters the comments from the given datetime |
| role | query | optional | string | One of “agent”, “end_user”. If not specified it does not filter |
Success response
GET /api/v2/requests/{request_id}/comments
/api/v2/requests/{request_id}/comments/{ticket_comment_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| request_id | path | optional | integer | The ID of the request |
| ticket_comment_id | path | optional | integer | The ID of the ticket comment |
Success response
GET /api/v2/requests/{request_id}/comments/{ticket_comment_id}
/api/v2/accounts
Created response
POST /api/v2/accounts
/api/v2/accounts/available
Zendesk Support credentials are not required to access this endpoint. You can use any Zendesk Support subdomain.
Returns “true” if the subdomain is available.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| subdomain | query | required | string | Specify the name of the subdomain you want to verify. The name can’t contain underscores, hyphens, or spaces. |
Success response
GET /api/v2/accounts/available
/api/v2/resource_collections
Lists resource collections for the account.
Success response
GET /api/v2/resource_collections
/api/v2/resource_collections
Creates a resource collection from a provided payload object. The payload object is specified the same way as the content of a requirements.json file in a Zendesk app. See Specifying Apps Requirements in the Zendesk Apps framework docs.
The response includes a job
status for creation of the specified resources.
Success response
POST /api/v2/resource_collections
/api/v2/resource_collections/{resource_collection_id}
Deletes a specified resource collection.
The response includes a job
status for deletion of the collection’s resources.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| resource_collection_id | path | optional | integer | The id of the resource collection |
Success response
DELETE /api/v2/resource_collections/{resource_collection_id}
/api/v2/resource_collections/{resource_collection_id}
Retrieves details for a specified resource collection.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| resource_collection_id | path | optional | integer | The id of the resource collection |
Success response
GET /api/v2/resource_collections/{resource_collection_id}
/api/v2/resource_collections/{resource_collection_id}
Updates a resource collection using a provided payload object. The payload object is specified the same way as the content of a requirements.json file in a Zendesk app. See Specifying Apps Requirements in the Zendesk Apps framework docs.
The response includes a job
status for the resource updates.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| resource_collection_id | path | optional | integer | The id of the resource collection |
Success response
PUT /api/v2/resource_collections/{resource_collection_id}
/api/v2/slas/policies
Success response
GET /api/v2/slas/policies
/api/v2/slas/policies
Created response
POST /api/v2/slas/policies
/api/v2/slas/policies/definitions
Success response
GET /api/v2/slas/policies/definitions
/api/v2/slas/policies/reorder
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sla_policy_ids | query | optional | array | The IDs of the SLA Policies to reorder |
Success response
PUT /api/v2/slas/policies/reorder
/api/v2/slas/policies/{sla_policy_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sla_policy_id | path | optional | integer | The ID of the SLA Policy |
No Content response
DELETE /api/v2/slas/policies/{sla_policy_id}
/api/v2/slas/policies/{sla_policy_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sla_policy_id | path | optional | integer | The ID of the SLA Policy |
Success response
GET /api/v2/slas/policies/{sla_policy_id}
/api/v2/slas/policies/{sla_policy_id}
Updates the specified policy.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sla_policy_id | path | optional | integer | The ID of the SLA Policy |
Success response
PUT /api/v2/slas/policies/{sla_policy_id}
/api/v2/satisfaction_ratings
See Pagination.
| Parameter | Value |
|---|---|
| score | offered, unoffered, received, received_with_comment, received_without_comment, good, good_with_comment, good_without_comment, bad, bad_with_comment, bad_without_comment |
| start_time | Time of the oldest satisfaction rating, as a Unix epoch time |
| end_time | Time of the most recent satisfaction rating, as a Unix epoch time |
If you specify an unqualified score such as good, the results include all the records with and without comments.
Examples:
/api/v2/satisfaction_ratings.json?score=bad/api/v2/satisfaction_ratings.json?score=bad&start_time=1498151194/api/v2/satisfaction_ratings.json?start_time=1340384793&end_time=1371920793Success response
GET /api/v2/satisfaction_ratings
/api/v2/satisfaction_ratings/count
Returns an approximate count of satisfaction ratings in the account. 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.
Count of satisfaction ratings
GET /api/v2/satisfaction_ratings/count
/api/v2/satisfaction_ratings/{satisfaction_rating_id}
Returns a specific satisfaction rating. You can get the id from
the List Satisfaction Ratings endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| satisfaction_rating_id | path | required | integer | The id of the satisfaction rating to retrieve |
Success response
GET /api/v2/satisfaction_ratings/{satisfaction_rating_id}
/api/v2/tickets/{ticket_id}/satisfaction_rating
Creates a CSAT rating for a solved ticket, or for a ticket that was previously
solved and then reopened.
Only the end user listed as the ticket requester can create a satisfaction rating for the ticket.
The end user must be a verified user.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ticket_id | path | required | integer | The id of the ticket |
Success response
POST /api/v2/tickets/{ticket_id}/satisfaction_rating
/api/v2/satisfaction_reasons
List all reasons for an account
Success response
GET /api/v2/satisfaction_reasons
/api/v2/satisfaction_reasons/{satisfaction_reason_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| satisfaction_reason_id | path | required | integer | The id of the satisfaction rating reason |
Success response
GET /api/v2/satisfaction_reasons/{satisfaction_reason_id}
/api/v2/search
Use the ampersand character (&) to append the sort_by or sort_order parameters to the URL.
For examples, see Searching with Zendesk API.
Offset pagination may result in duplicate results when paging. You can also use the
Export Search Results endpoint, which
uses cursor-based pagination and doesn’t return duplicate results. See
Pagination for more information.
Errors are represented as JSON objects which have the following keys:
| Name | Type | Comment |
|---|---|---|
| error | string | The type of error. Examples: “unavailable”, “invalid” |
| description | string |
{
"error": "unavailable",
"description": "Sorry, we could not complete your search query. Please try again in a moment."
}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| query | query | required | string | The search query. See Query basics above. For details on the query syntax, see the Zendesk Support search reference |
| sort_by | query | optional | string | One of |
| sort_order | query | optional | string | One of |
Success response
GET /api/v2/search
/api/v2/search/count
Returns the number of items matching the query rather than the items. The search string works the same as a regular search.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| query | query | required | string | The search query |
Success response
GET /api/v2/search/count
/api/v2/search/export
Exports a set of results. See Query basics for the syntax of the query parameter.
This endpoint is for search queries that will return more than 1000 results. The result set is ordered only by the created_at attribute.
The search only returns results of a single object type. The following object types are supported: ticket, organization, user, or group.
You must specify the type in the filter[type] parameter. Searches with type in the query string will result in an error.
See Pagination.
Returns a maximum of 1000 records per page. The number of results shown in a page is determined by the page[size] parameter.
Note: You may experience a speed reduction or a timeout if you request 1000 results per page and you have many archived tickets in the results. Try reducing the number of results per page. We recommend 100 results per page.
The cursor specified by the after_cursor property in a response expires after one hour.
For more information on cursor-based pagination, see the following articles:
This API endpoint is rate-limited to 100 requests per minute per account. The limit also counts towards the global API rate limit.
| Name | Type | Comment |
|---|---|---|
| links[next] | string | URL to the next page of results |
| meta[has_more] | string | Boolean indicating if there are more results |
| meta[after_cursor] | string | Cursor object returned from the Search Service |
| results | array | May consist of tickets, users, groups, or organizations, as specified by the filter_type parameter |
The response is similar to the response of GET /api/v2/search.json?, with a few changes:
links - Has the following nested properties: prev and next. These replace the next_page and prev_page links. The prev property is always null because backward pagination is not supported. The next property may include an auto-generated link to the next page of results.meta - Has the following nested properties: has_more and after_cursor. The has_more property indicates whether the next page has more results. The after_cursor property is the cursor used to paginate to the next page. It expires after one hour.There’s no count property.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| query | query | required | string | The search query. See Query basics above. For details on the query syntax, see the Zendesk Support search reference |
| page[size] | query | optional | integer | The number of results shown in a page. |
| filter[type] | query | optional | string | The object type returned by the export query. Can be |
Success response
GET /api/v2/search/export
/api/v2/sessions
If authenticated as an admin, returns all the account’s sessions. If authenticated as an agent or end user, returns only the sessions of the user making the request.
See Pagination.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
Success response
GET /api/v2/sessions
/api/v2/users/me/logout
Deletes the current session. In practice, this only works when using session auth for requests, such as client-side requests
made from a Zendesk app. When using OAuth or basic authentication, you don’t have a current session so this endpoint has no effect.
No Content
DELETE /api/v2/users/me/logout
/api/v2/users/me/session
Success response
GET /api/v2/users/me/session
/api/v2/users/me/session/renew
Success response
GET /api/v2/users/me/session/renew
/api/v2/users/{user_id}/sessions
Deletes all the sessions for a user.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
No Content
DELETE /api/v2/users/{user_id}/sessions
/api/v2/users/{user_id}/sessions/{session_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| session_id | path | optional | integer | The ID of the session |
| user_id | path | optional | integer | The id of the user |
No Content
DELETE /api/v2/users/{user_id}/sessions/{session_id}
/api/v2/users/{user_id}/sessions/{session_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| session_id | path | optional | integer | The ID of the session |
| user_id | path | optional | integer | The id of the user |
Success response
GET /api/v2/users/{user_id}/sessions/{session_id}
/api/v2/sharing_agreements
Success response
GET /api/v2/sharing_agreements
/api/v2/sharing_agreements
Created response
POST /api/v2/sharing_agreements
/api/v2/sharing_agreements/{sharing_agreement_id}
Deletes a sharing agreement.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sharing_agreement_id | path | optional | integer | The ID of the sharing agreement |
No Content response
DELETE /api/v2/sharing_agreements/{sharing_agreement_id}
/api/v2/sharing_agreements/{sharing_agreement_id}
Returns a sharing agreement for your account.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sharing_agreement_id | path | optional | integer | The ID of the sharing agreement |
Success response
GET /api/v2/sharing_agreements/{sharing_agreement_id}
/api/v2/sharing_agreements/{sharing_agreement_id}
Returns an updated sharing agreement. Only status is allowed to be updated.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sharing_agreement_id | path | optional | integer | The ID of the sharing agreement |
Success response
PUT /api/v2/sharing_agreements/{sharing_agreement_id}
/api/v2/routing/agents/{user_id}/instance_values
Returns an attribute value.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
Success response
GET /api/v2/routing/agents/{user_id}/instance_values
/api/v2/routing/agents/{user_id}/instance_values
Adds the specified attributes if no attributes exists, or replaces all existing attributes with the specified attributes.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
Success response
POST /api/v2/routing/agents/{user_id}/instance_values
/api/v2/routing/attributes
Returns a list of attributes for the account.
The following sideloads are supported:
| Name | Will sideload |
|---|---|
| attribute_values | The attribute values available on the account |
Success response
GET /api/v2/routing/attributes
/api/v2/routing/attributes
Creates an attribute.
Created response
POST /api/v2/routing/attributes
/api/v2/routing/attributes/definitions
Returns the condition definitions that can be configured to apply attributes to a ticket.
Success response
GET /api/v2/routing/attributes/definitions
/api/v2/routing/attributes/{attribute_id}
Deletes an attribute.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| attribute_id | path | optional | string | The ID of the skill-based routing attribute |
No Content response
DELETE /api/v2/routing/attributes/{attribute_id}
/api/v2/routing/attributes/{attribute_id}
Returns an attribute.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| attribute_id | path | optional | string | The ID of the skill-based routing attribute |
Success response
GET /api/v2/routing/attributes/{attribute_id}
/api/v2/routing/attributes/{attribute_id}
Updates an attribute.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| attribute_id | path | optional | string | The ID of the skill-based routing attribute |
Success response
PUT /api/v2/routing/attributes/{attribute_id}
/api/v2/routing/attributes/{attribute_id}/values
Returns a list of attribute values for a provided attribute.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| attribute_id | path | optional | string | The ID of the skill-based routing attribute |
Success response
GET /api/v2/routing/attributes/{attribute_id}/values
/api/v2/routing/attributes/{attribute_id}/values
Creates an attribute value.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| attribute_id | path | optional | string | The ID of the skill-based routing attribute |
Created response
POST /api/v2/routing/attributes/{attribute_id}/values