From 3e268b8af5d50b8cdd7e3fce388fdb43c626d6ea Mon Sep 17 00:00:00 2001
From: jonathan zollinger You must specify a category name and locale. The locale can be omitted if it's specified in the URL. Optionally, you can specify multiple translations for the category. The specified locales must be enabled for the current Help Center. You must specify a category name and locale. The locale can be omitted if it's specified in the URL. Optionally, you can specify multiple translations for the category. The specified locales must be enabled for the current Help Center. WARNING: Every section and all articles in the category will also be deleted. WARNING: Every section and all articles in the category will also be deleted. No content The response will list only the categories that the agent, end user, or anonymous user can view in the help center. Translations are embedded within the category because they're not shared between resources. The The response will list only the categories that the agent can view in the help center. Sorts the results by one of the accepted values Selects the order of the results. description Note: Translations are embedded within the category because they're not shared between resources. description description These endpoints only update category-level metadata such as the sorting position. They don't update category translations. These endpoints only update category-level metadata such as the sorting position. They don't update category translations. The endpoint updates the category OK Response Exports a set of results. See Query syntax for the syntax of the {@code query} parameter. Use this endpoint for search queries that will return more than 1000 results. The result set is ordered only by the {@code 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 {@code 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 {@code 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 {@code 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. Returns the search results. See Query syntax for details on the {@code query} parameter. Use the ampersand character (&) to append the {@code sort_by} or {@code sort_order} parameters to the URL. For examples, see Searching with Zendesk API. This endpoint has its own rate limit. The rate limit counts towards the global API rate limit. See Limits. 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 Using cursor pagination for more information. Creates any of the following custom field types: Note: Tags can't be re-used across custom ticket fields. For example, if you configure a tag for a checkbox field, you can't use that tag value for a dropdown (tagger) field option. The use of tags isn't validated and can prevent editing in the future. See About custom field types in the Zendesk Help Center. We recommend the following best practices for ticket fields limits. Creating more than these amounts can affect performance. Returns a list of all system and custom ticket fields in your account. For end users, only the ticket fields with visible_in_portal set to true are returned. Consider caching this resource to use with the{@link TicketClient}. Returns a number of ticket properties though not the ticket comments. To get the comments, use List Comments Lists the topics that use the specified user segment. This endpoint supports pagination as described in Pagination. See Pagination. Some user segments can only be applied to sections and topics on certain Guide plans. For instance, user segments with a The portion of an article that is relevant to the search query, with matching words or phrases delimited by <em></em> tags. Example: a query for Conversation with wp native URL: None This is a new private comment This is a new private comment Returns a list of all system and custom ticket fields in your account. For end users, only the ticket fields with visible_in_portal set to true are returned. Consider caching this resource to use with the{@link TicketClient}.Allowed for
+ *
+ * @param locale The locale the item is displayed in. (must be lowercase, even if returned from zendesk as mixed case) (required)
+ * @param createCategoryRequest (optional)
+ * @return Created response (status code 201)
+ */
+ @Post("/api/v2/help_center/{locale}/categories")
+ Mono<@Valid CategoryResponse> createCategory(
+ @PathVariable("locale") @NotNull String locale,
+ @Body @Nullable @Valid CreateCategoryRequest createCategoryRequest
+ );
+
+ /**
+ * {@summary Create Category}
+ * Allowed for
+ *
+ * @param createCategoryRequest (optional)
+ * @return OK Response (status code 201)
+ */
+ @Post("/api/v2/help_center/categories")
+ Mono<@Valid CategoryResponse> createCategoryNoLocale(
+ @Body @Nullable @Valid CreateCategoryRequest createCategoryRequest
+ );
+
+ /**
+ * {@summary Delete Category by Locale}
+ * Allowed for
+ *
+ * @param locale The locale the item is displayed in. (must be lowercase, even if returned from zendesk as mixed case) (required)
+ * @param categoryId The unique ID of the category (required)
+ * @return No content (status code 204)
+ */
+ @Delete("/api/v2/help_center/{locale}/categories/{category_id}")
+ MonoAllowed for
+ *
+ * @param categoryId The unique ID of the category (required)
+ * @return Allowed for
sort_by parameter can have one of the following values:
(optional)
+ * @param sortOrder value description positionorder set manually using the Arrange Content page. Default order created_atorder by creation time updated_atorder by update time
(optional)
+ * @return OK (status code 200)
+ */
+ @Get("/api/v2/help_center/{locale}/categories")
+ Mono<@Valid CategoriesResponse> listCategories(
+ @PathVariable("locale") @NotNull String locale,
+ @QueryValue("sort_by") @Nullable ListCategoriesSortByParameter sortBy,
+ @QueryValue("sort_order") @Nullable ListArticlesSortOrderParameter sortOrder
+ );
+
+ /**
+ * {@summary List Categories}
+ * value description ascascending order descdescending order Allowed for
{/locale} is an optional parameter for admins and agents. End users and anonymous users must provide the parameter.Allowed for
Allowed for
+ *
+ * @param categoryId The unique ID of the category (required)
+ * @return Allowed for
+ *
+ * @param locale The locale the item is displayed in. (must be lowercase, even if returned from zendesk as mixed case) (required)
+ * @param categoryId The unique ID of the category (required)
+ * @param createCategoryRequest (optional)
+ * @return OK Response (status code 200)
+ */
+ @Put("/api/v2/help_center/{locale}/categories/{category_id}")
+ Mono<@Valid CategoryResponse> updateCategory(
+ @PathVariable("locale") @NotNull String locale,
+ @PathVariable("category_id") @NotNull Long categoryId,
+ @Body @Nullable @Valid CreateCategoryRequest createCategoryRequest
+ );
+
+ /**
+ * {@summary Update Category}
+ * Allowed for
+ *
+ * @param categoryId The unique ID of the category (required)
+ * @param createCategoryRequest (optional)
+ * @return OK Response (status code 200)
+ */
+ @Put("/api/v2/help_center/categories/{category_id}")
+ Mono<@Valid CategoryResponse> updateCategoryNoLocale(
+ @PathVariable("category_id") @NotNull Long categoryId,
+ @Body @Nullable @Valid CreateCategoryRequest createCategoryRequest
+ );
+
+ /**
+ * {@summary Update Category Source Locale by Locale}
+ * source_locale propertyAllowed for
+ *
+ * @param categoryId The unique ID of the category (required)
+ * @return
Allowed for anyone
+ *
+ * @return Success response (status code 200)
+ */
+ @Get("/api/v2/locales")
+ Mono<@Valid LocalesResponse> listLocales();
+}
\ No newline at end of file
diff --git a/src/main/java/lol/pbu/z4j/client/SearchClient.java b/src/main/java/lol/pbu/z4j/client/SearchClient.java
new file mode 100644
index 0000000..2e50c38
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/client/SearchClient.java
@@ -0,0 +1,72 @@
+package lol.pbu.z4j.client;
+
+import io.micronaut.core.annotation.Nullable;
+import io.micronaut.http.annotation.Get;
+import io.micronaut.http.annotation.QueryValue;
+import io.micronaut.http.client.annotation.Client;
+import io.micronaut.retry.annotation.Retryable;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotNull;
+import lol.pbu.z4j.model.SearchExportType;
+import lol.pbu.z4j.model.SearchResponse;
+import lol.pbu.z4j.model.SearchSortBy;
+import lol.pbu.z4j.model.SearchSortOrder;
+import reactor.core.publisher.Mono;
+
+@Retryable
+@Client("zendesk")
+public interface SearchClient {
+
+ /**
+ * {@summary Show Search Results Count}
+ * Returns the number of items matching the query rather than returning the items. The search string works the same as a regular search. Allowed For
+ *
+ * @param query Returns the search results. See Query syntax for details on the {@code query} parameter. For details on the query syntax, see the Zendesk Support search reference. (required)
+ * @return Success response (status code 200)
+ * or Error response (status code 400)
+ */
+ @Get("/api/v2/search/count")
+ Mono<@Valid SearchResponse> count(
+ @QueryValue("query") @NotNull String query
+ );
+
+ /**
+ * {@summary Export Search Results}
+ * Allowed For
Pagination
Export Search Results Limits
Allowed For
Pagination
Custom field type Description text Default custom field type when type is not specified textarea For multi-line text checkbox To capture a boolean value. Allowed values are true or false. Optionally, you can specify a tag to be added to the ticket when the value is true. date Example: 2021-04-16 integer String composed of numbers. May contain an optional decimal point decimal For numbers containing decimals regexp Matches the Regex pattern found in the custom field settings partialcreditcard A credit card number. Only the last 4 digits are retained multiselect Enables users to choose multiple options from a dropdown menu. It contains one or more tag values belonging to the field's options. tagger Single-select dropdown menu. It contains one or more tag values belonging to the field's options. Example: ( {"id": 21938362, "value": ["hd_3000", "hd_5555"]}) lookup A field to create a relationship (see lookup relationships) to another object such as a user, ticket, or organization Allowed For
Field limits
+ *
+ * @return Created response (status code 201)
+ */
+ @Post("/api/v2/ticket_fields")
+ Mono<@Valid TicketFieldResponse> createTicketField();
+
+ /**
+ * {@summary Count Tickets}
+ * Returns an approximate count of tickets in the account. If the count exceeds 100,000, it is updated every 24 hours.
{@code ccd} lists tickets that the specified user is cc'd on.
The {@code count[refreshed_at]} property is a timestamp that indicates when the count was last updated.
Note: When the count exceeds 100,000, {@code 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
+ *
+ * @return Count of tickets (status code 200)
+ */
+ @Get("/api/v2/tickets/count")
+ Mono<@Valid TicketCountResponse> getTicketCount();
+
+ /**
+ * {@summary List Ticket Fields}
+ * Allowed For
+ *
+ * @param locale Forces the {@code titleInPortal} property to return a dynamic content variant for the specified locale. Only accepts {@link LocaleClient#listLocales() active locale ids}. (optional)
+ * @param creator Includes the {@code creatorUserId} and {@code creatorAppName} properties in the response. If the ticket field is created by an app, {@code creatorAppName} is the name of the app and {@code creatorUserId} is {@code -1}. If the ticket field is not created by an app, {@code creatorAppName} is null. (optional)
+ * @return Success response (status code 200)
+ */
+ @Get("/api/v2/ticket_fields")
+ Mono<@Valid TicketFieldsResponse> listTicketFields(
+ @QueryValue("locale") @Nullable String locale,
+ @QueryValue("creator") @Nullable Boolean creator
+ );
+
+ /**
+ * {@summary List Tickets}
+ *
+ * @param externalId 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. (optional)
+ * @return List tickets (status code 200)
+ */
+ @Get("/api/v2/tickets")
+ Mono<@Valid TicketsResponse> listTickets(
+ @QueryValue("external_id") @Nullable String externalId
+ );
+
+ /**
+ * {@summary Show Ticket}
+ * Allowed For
+ *
+ * @param ticketId The ID of the ticket (required)
+ * @return Ticket (status code 200)
+ */
+ @Get("/api/v2/tickets/{ticket_id}")
+ Mono<@Valid TicketResponse> showTicket(
+ @PathVariable("ticket_id") @NotNull Long ticketId
+ );
+
+ /**
+ * {@summary Update Ticket}
+ *
+ * @param ticketId The ID of the ticket (required)
+ * @param ticketUpdateRequest (optional)
+ * @return Successful request (status code 200)
+ */
+ @Put("/api/v2/tickets/{ticket_id}")
+ Mono<@Valid TicketUpdateResponse> updateTicket(
+ @PathVariable("ticket_id") @NotNull Long ticketId,
+ @Body @Nullable @Valid TicketUpdateRequest ticketUpdateRequest
+ );
+}
\ No newline at end of file
diff --git a/src/main/java/lol/pbu/z4j/client/UserSegmentClient.java b/src/main/java/lol/pbu/z4j/client/UserSegmentClient.java
new file mode 100644
index 0000000..c374c7e
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/client/UserSegmentClient.java
@@ -0,0 +1,104 @@
+package lol.pbu.z4j.client;
+
+import io.micronaut.core.annotation.Nullable;
+import io.micronaut.http.annotation.*;
+import io.micronaut.http.annotation.Post;
+import io.micronaut.http.client.annotation.Client;
+import io.micronaut.retry.annotation.Retryable;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotNull;
+import lol.pbu.z4j.model.*;
+import reactor.core.publisher.Mono;
+
+@Retryable
+@Client("zendesk")
+public interface UserSegmentClient {
+
+ /**
+ * {@summary Create User Segment}
+ * (Allowed for Help Center managers)
+ *
+ * @param createUserSegmentRequest (optional)
+ * @return Created response (status code 201)
+ * or Bad request response (status code 400)
+ */
+ @Post("/api/v2/help_center/user_segments")
+ Mono<@Valid UserSegmentResponse> createUserSegment(
+ @Body @Nullable @Valid CreateUserSegmentRequest createUserSegmentRequest
+ );
+
+ /**
+ * {@summary Delete User Segment}
+ * (Allowed for Help Center managers)
+ *
+ * @param userSegmentId The unique ID of the user segment (required)
+ * @return Response when the use rsegment was deleted (status code 204)
+ */
+ @Delete("/api/v2/help_center/user_segments/{user_segment_id}")
+ Mono
(Allowed for Help Center managers)
+ *
+ * @param userSegmentId The unique ID of the user segment (required)
+ * @return OK Response (status code 200)
+ */
+ @Get("/api/v2/help_center/user_segments/{user_segment_id}/sections")
+ Mono<@Valid SectionsResponse> listUserSegmentSections(
+ @PathVariable("user_segment_id") @NotNull Long userSegmentId
+ );
+
+ /**
+ * {@summary List Topics with User Segment}
+ * Allowed for
Pagination
user_type of "staff" cannot be applied to sections and topics on accounts on the Guide Lite plan or the Suite Team plan.
(Allowed for Help Center managers)article
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_RESULT_TYPE)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String resultType = "article";
+
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_RESULTS)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private List<@Valid Article> results;
+
+ /**
+ * carrot potato might return the snippet ...don't confuse <em>carrots</em> with <em>potatoes</em>...
+
+ Fuzzy search is supported for the following text-based field types: Text fields, Multi Line Text fields, and RegExp fields.
+
+ For example, you might want to search for records related to Tesla vehicles: `query=Tesla`. In this example the API would return every record for the given custom object where any of the supported text fields contain the word 'Tesla'.
+
+ You can include multiple words or numbers in your search. For example: `query=Tesla Honda 2020`. This search phrase would be URL encoded as `query=Tesla%20Honda%202020` and return every record for the custom object for which any of the supported text fields contained 'Tesla', 'Honda', or '2020'.
+ schema:
+ type: string
+ example: jdoe
+ - name: sort
+ in: query
+ description: |
+ One of `name`, `created_at`, `updated_at`, `-name`, `-created_at`, or `-updated_at`. The `-` denotes the sort will be descending. Defaults to sorting by relevance.
+ schema:
+ type: string
+ - name: page[before]
+ in: query
+ description: |
+ A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) that tells the endpoint which page to start on. It should be a `meta.before_cursor` value from a previous request. Note: `page[before]` and `page[after]` can't be used together in the same request.
+ schema:
+ type: string
+ - name: page[after]
+ in: query
+ description: |
+ A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) that tells the endpoint which page to start on. It should be a `meta.after_cursor` value from a previous request. Note: `page[before]` and `page[after]` can't be used together in the same request.
+ schema:
+ type: string
+ - name: page[size]
+ in: query
+ description: |
+ Specifies how many records should be returned in the response. You can specify up to 100 records per page.
+ schema:
+ type: integer
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomObjectRecordsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomObjectRecordsSearchResponseExample'
+ post:
+ operationId: FilteredSearchCustomObjectRecords
+ tags:
+ - Custom Object Records
+ summary: Filtered Search of Custom Object Records
+ description: |-
+ Returns an array of custom object records that meet the search and filter criteria. For simple searches limited to only text fields and no complex logic, use the [Search Custom Object Records API](/api-reference/custom-data/custom-objects/custom_object_records/#search-custom-object-records) endpoint.
+
+ Filters can contain either an individual [comparison object](#comparison-object) or an array of [comparison objects](#comparison-object) within logical namespaces.
+
+ A filter is a JSON object that has the following properties:
+
+ | Name | Type | Required | Description
+ | --------- | ------ | -------- | -----------
+ | ATTRIBUTE | object | no | A [comparison object](#comparison-object) specifying an attribute value condition to be met for records to match.
Examples are marked below.
+ | $and | array | no | Array of conjunctive filter objects (logical AND)
+ | $or | array | no | Array of conjunctive filter objects (logical OR)
+
+ ##### Examples
+
+ ```js
+ {
+ "filter": {
+ "custom_object_fields.field_key": { "$eq": "value" } // ATTRIBUTE
+ }
+ }
+ ```
+
+ ```js
+ // $or
+ {
+ "filter": {
+ "$or": [
+ { "custom_object_fields.field_key": { "$eq": "value" } }, // ATTRIBUTE
+ { "external_id": { "$eq": "Record123" } } // ATTRIBUTE
+ ]
+ }
+ }
+ ```
+
+ #### Comparison Object
+
+ A comparison object defines a condition a record must meet to be considered a match. The condition is based on an attribute value or object type.
+
+ A comparison object is a JSON object that has the following properties:
+
+ | Name | Type | Required | Description
+ | --------- | ------------- | -------- | -----------
+ | FIELD_KEY | string | yes | When filtering on a custom field, they must be namedspaced with `custom_object_fields.`. ex. `custom_object_fields.field_key`
When filtering on a standard field, no namespace is required. The following fields are considered standard: `created_at`, `updated_at`, `created_by_user`, `updated_by_user`, `name`, `external_id`
+ | OPERATOR | string | yes | [Supported operators](/documentation/custom-data/v2/searching-custom-object-records/) vary by the value's data type
+ | VALUE | string, array | yes | The value you're filtering for
+
+ * Date values should be in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
+
+ #### Pagination
+
+ * [Cursor pagination](/api-reference/introduction/pagination/#cursor-pagination) only.
+ * Returns the records sorted by relevancy with page limits. Without a `sort` parameter, only the first 10,000 records are returned. With a `sort` parameter, all records are returned.
+
+ #### Allowed For
+
+ * Agents
+ * End users (when an admin [configures](https://support.zendesk.com/hc/en-us/articles/6034260247066) the custom object to be accessible to end users)
+ parameters:
+ - $ref: '#/components/parameters/CustomObjectKey'
+ - name: query
+ in: query
+ description: |
+ The query parameter is used to search text-based fields for records that match specific query terms.
+ The query can be multiple words or numbers. Every record that matches the beginning of any word or number in the query string is returned.
+
+ Fuzzy search is supported for the following text-based field types: Text fields, Multi Line Text fields, and RegExp fields.
+
+ For example, you might want to search for records related to Tesla vehicles: `query=Tesla`. In this example the API would return every record for the given custom object where any of the supported text fields contain the word 'Tesla'.
+
+ You can include multiple words or numbers in your search. For example: `query=Tesla Honda 2020`. This search phrase would be URL encoded as `query=Tesla%20Honda%202020` and return every record for the custom object for which any of the supported text fields contained 'Tesla', 'Honda', or '2020'.
+ schema:
+ type: string
+ example: jdoe
+ - name: sort
+ in: query
+ description: |
+ One of "name", "created_at", "updated_at", "-name", "-created_at", or "-updated_at". The "-" denotes the sort will be descending. Defaults to sorting by relevance.
+ schema:
+ type: string
+ - name: page[before]
+ in: query
+ description: |
+ A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) that tells the endpoint which page to start on. It should be a `meta.before_cursor` value from a previous request. Note: `page[before]` and `page[after]` can't be used together in the same request.
+ schema:
+ type: string
+ - name: page[after]
+ in: query
+ description: |
+ A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) that tells the endpoint which page to start on. It should be a `meta.after_cursor` value from a previous request. Note: `page[before]` and `page[after]` can't be used together in the same request.
+ schema:
+ type: string
+ - name: page[size]
+ in: query
+ description: |
+ Specifies how many records should be returned in the response. You can specify up to 100 records per page.
+ schema:
+ type: integer
+ requestBody:
+ content:
+ application/json:
+ schema:
+ anyOf:
+ - $ref: '#/components/schemas/CustomObjectRecordsFilteredSearchRequestBasic'
+ - $ref: '#/components/schemas/CustomObjectRecordsFilteredSearchRequestComplex'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomObjectRecordsFilteredSearchRequestExample'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomObjectRecordsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomObjectRecordsSearchResponseExample'
+ /api/v2/custom_objects/{custom_object_key}/triggers:
+ parameters:
+ - $ref: '#/components/parameters/CustomObjectKey'
+ get:
+ operationId: ListObjectTriggers
+ tags:
+ - Object Triggers
+ summary: List Object Triggers
+ description: "Lists all triggers for the specified custom object.\n\n#### Allowed For \n* Agents\n"
+ parameters:
+ - $ref: '#/components/parameters/TriggerActive'
+ - $ref: '#/components/parameters/TriggerSortBy'
+ - $ref: '#/components/parameters/TriggerSortOrder'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ObjectTriggersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ObjectTriggersResponseExample'
+ post:
+ operationId: CreateObjectTrigger
+ tags:
+ - Object Triggers
+ summary: Create Object Trigger
+ description: |
+ Creates a new object trigger for a specified object.
+
+ #### Allowed For
+
+ * Administrators
+ * Agents in custom roles with the `manage_triggers` permission (Enterprise only)
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ObjectTriggerRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/ObjectTriggerRequestExample'
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ObjectTriggerResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ObjectTriggerResponseExample'
+ /api/v2/custom_objects/{custom_object_key}/triggers/{trigger_id}:
+ parameters:
+ - $ref: '#/components/parameters/CustomObjectKey'
+ - $ref: '#/components/parameters/TriggerId'
+ get:
+ operationId: GetObjectTrigger
+ tags:
+ - Object Triggers
+ summary: Show Object Trigger
+ description: |
+ Returns details of a specific object trigger.
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ObjectTriggerResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ObjectTriggerResponseExample'
+ put:
+ operationId: UpdateObjectTrigger
+ tags:
+ - Object Triggers
+ summary: Update Object Trigger
+ description: |
+ Updates a specified object trigger.
+
+ **Note**: Updating a condition or action updates both the conditions and actions arrays,
+ clearing all existing values of both arrays. Include all your conditions
+ and actions when updating any condition or action.
+
+ #### Allowed For
+
+ * Administrators
+ * Agents in custom roles with the `manage_triggers` permission (Enterprise only)
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ObjectTriggerRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/ObjectTriggerRequestExample'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ObjectTriggerResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ObjectTriggerResponseExample'
+ delete:
+ operationId: DeleteObjectTrigger
+ tags:
+ - Object Triggers
+ summary: Delete Object Trigger
+ description: |
+ Deletes a specified object trigger.
+
+ #### Allowed For
+
+ * Administrators
+ * Agents in custom roles with the `manage_triggers` permission (Enterprise only)
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/custom_objects/{custom_object_key}/triggers/active:
+ parameters:
+ - $ref: '#/components/parameters/CustomObjectKey'
+ - $ref: '#/components/parameters/TriggerSortBy'
+ - $ref: '#/components/parameters/TriggerSortOrder'
+ get:
+ operationId: ListActiveObjectTriggers
+ tags:
+ - Object Triggers
+ summary: List Active Object Triggers
+ description: |
+ Lists all active object triggers.
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Administrators
+ * Agents in custom roles with the `manage_triggers` permission (Enterprise only)
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ObjectTriggersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ObjectTriggersActiveResponseExample'
+ /api/v2/custom_objects/{custom_object_key}/triggers/definitions:
+ parameters:
+ - $ref: '#/components/parameters/CustomObjectKey'
+ get:
+ operationId: ListObjectTriggersDefinitions
+ tags:
+ - Object Triggers
+ summary: List Object Trigger Action and Condition Definitions
+ description: "Lists the conditions and actions of all triggers for the specified custom object.\n\n#### Allowed For \n* Agents\n"
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ObjectTriggerDefinitionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ObjectTriggerDefinitionResponseExample'
+ /api/v2/custom_objects/{custom_object_key}/triggers/destroy_many:
+ parameters:
+ - $ref: '#/components/parameters/CustomObjectKey'
+ - $ref: '#/components/parameters/TriggerIds'
+ delete:
+ operationId: DeleteManyObjectTriggers
+ tags:
+ - Object Triggers
+ summary: Delete Many Object Triggers
+ description: "Deletes the object triggers corresponding to the provided comma-separated list of ids. \n\n**Note**: You can only bulk-delete triggers associated with one object at a time, specified by the `custom_object_key` in the request.\n\n#### Allowed For\n\n* Administrators\n* Agents in custom roles with the `manage_triggers` permission (Enterprise only)\n\n#### Request Parameters\n\nThe DELETE request takes an `ids` object that lists the\nobject triggers to delete. All of the specified object trigger `ids` must be associated with a single object.\n\n| Name | Description\n| ---- | -----------\n| ids | The ids of the triggers to delete\n\n#### Example request\n\n```js\n{\n \"ids\": \"25,23,27,22\"\n}\n```\n"
+ responses:
+ "204":
+ description: No content response
+ /api/v2/custom_objects/{custom_object_key}/triggers/search:
+ parameters:
+ - $ref: '#/components/parameters/CustomObjectKey'
+ - $ref: '#/components/parameters/TriggerSearchQuery'
+ - $ref: '#/components/parameters/TriggerSearchFilter'
+ - $ref: '#/components/parameters/TriggerActive'
+ - $ref: '#/components/parameters/TriggerSort'
+ - $ref: '#/components/parameters/TriggerSortBy'
+ - $ref: '#/components/parameters/TriggerSortOrder'
+ - $ref: '#/components/parameters/TriggerInclude'
+ get:
+ operationId: SearchObjectTriggers
+ tags:
+ - Object Triggers
+ summary: Search Object Triggers
+ description: |
+ Returns a list of object triggers that meet your filter or search criteria.
+
+ #### Pagination
+
+ * Offset pagination only
+
+ See [Using Offset Pagination](/api-reference/introduction/pagination/#using-offset-pagination).
+
+ #### Allowed For
+
+ * Agents
+
+ #### Filter
+
+ Use the `filter` query parameter to filter an object trigger search by one or more attributes. For example, the following `filter` argument filters object triggers by the `title` attribute:
+
+ ```json
+ {
+ "json": {
+ "title": "test"
+ }
+ }
+ ```
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ObjectTriggersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ObjectTriggersSearchResponseExample'
+ /api/v2/custom_objects/{custom_object_key}/triggers/update_many:
+ parameters:
+ - $ref: '#/components/parameters/CustomObjectKey'
+ put:
+ operationId: UpdateManyObjectTriggers
+ tags:
+ - Object Triggers
+ summary: Update Many Object Triggers
+ description: |
+ Updates the position or the active status of multiple object triggers. Any additional properties are ignored.
+
+ **Note**: You can only bulk-update triggers associated with one object at a time, specified by the `custom_object_key` in the request.
+
+ #### Allowed For
+
+ * Administrators
+ * Agents in custom roles with the `manage_triggers` permission (Enterprise only)
+
+ #### Request Parameters
+
+ The PUT request expects a `triggers` object that lists the object triggers to update. All of the specified object trigger `ids` must be associated with a single object.
+
+ You can specify the following properties for each object trigger you're updating:
+
+ | Name | Mandatory | Description
+ | -------- | --------- | -----------
+ | id | yes | The ID of the object trigger to update
+ | position | no | The new position of the object trigger
+ | active | no | The active status of the object trigger (true or false)
+
+ #### Example Request
+
+ ```js
+ {
+ "triggers": [
+ {"id": 25, "position": 3},
+ {"id": 23, "active": true},
+ {"id": 27, "position": 9, "active": false},
+ {"id": 22, "position": 7}
+ ]
+ }
+ ```
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ObjectTriggerBulkUpdateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/ObjectTriggerBulkUpdateRequestExample'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ObjectTriggersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ObjectTriggersResponseExample'
+ /api/v2/custom_objects/limits/object_limit:
+ get:
+ operationId: CustomObjectsLimit
+ tags:
+ - Custom Objects
+ summary: Custom Objects Limit
+ description: |-
+ List the current count and the limit for custom objects
+ #### Allowed For
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomObjectLimitsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomObjectsLimitResponseExample'
+ /api/v2/custom_objects/limits/record_limit:
+ get:
+ operationId: CustomObjectRecordsLimit
+ tags:
+ - Custom Object Records
+ summary: Custom Object Records Limit
+ description: |-
+ List the current count and the limit for custom object records
+ #### Allowed For
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomObjectLimitsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomObjectRecordsLimitResponseExample'
+ /api/v2/custom_roles:
+ get:
+ operationId: ListCustomRoles
+ tags:
+ - Custom Roles
+ summary: List Custom Roles
+ description: |
+ #### Availability
+
+ * Accounts on the Enterprise plan or above
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomRolesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomRolesResponseExample'
+ post:
+ operationId: CreateCustomRole
+ tags:
+ - Custom Roles
+ summary: Create Custom Role
+ description: |
+ #### Availability
+
+ * Accounts on the Enterprise plan or above
+
+ #### Allowed for
+
+ * Administrators
+ * Agents with the `manage_roles` permission
+ responses:
+ "200":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomRoleResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomRoleResponseExample'
+ /api/v2/custom_roles/{custom_role_id}:
+ parameters:
+ - $ref: '#/components/parameters/CustomRoleId'
+ get:
+ operationId: ShowCustomRoleById
+ tags:
+ - Custom Roles
+ summary: Show Custom Role
+ description: |
+ #### Availability
+
+ * Accounts on the Enterprise plan or above
+
+ #### Allowed for
+
+ * Administrators
+ * Agents with the `manage_roles` permission
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomRoleResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomRoleResponseExample'
+ put:
+ operationId: UpdateCustomRoleById
+ tags:
+ - Custom Roles
+ summary: Update Custom Role
+ description: |
+ #### Availability
+
+ * Accounts on the Enterprise plan or above
+
+ #### Allowed for
+
+ * Administrators
+ Agents with the `manage_roles` permission
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomRoleResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomRoleResponseExample'
+ delete:
+ operationId: DeleteCustomRoleById
+ tags:
+ - Custom Roles
+ summary: Delete Custom Role
+ description: |
+ #### Availability
+
+ * Accounts on the Enterprise plan or above
+
+ #### Allowed for
+
+ * Administrators
+ * Agents with the `manage_roles` permission
+ responses:
+ "204":
+ description: No Contetnt response
+ /api/v2/custom_status/default:
+ put:
+ operationId: BulkUpdateDefaultCustomStatus
+ tags:
+ - Custom Ticket Statuses
+ summary: Bulk Update Default Custom Ticket Status
+ description: |
+ Updates the default values for many custom ticket statuses at once.
+
+ #### Allowed For
+
+ * Admins
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BulkUpdateDefaultCustomStatusRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/BulkUpdateDefaultCustomStatusRequestExample'
+ responses:
+ "200":
+ description: Updated
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BulkUpdateDefaultCustomStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/BulkUpdateDefaultCustomStatusResponseExample'
+ /api/v2/custom_statuses:
+ get:
+ operationId: ListCustomStatuses
+ tags:
+ - Custom Ticket Statuses
+ summary: List Custom Ticket Statuses
+ description: |
+ Lists all undeleted custom ticket statuses for the account. No pagination is provided.
+
+ #### Allowed For
+
+ * End Users
+ parameters:
+ - name: status_categories
+ in: query
+ description: Filter the list of custom ticket statuses by a comma-separated list of status categories
+ schema:
+ type: string
+ - name: active
+ in: query
+ description: If true, show only active custom ticket statuses. If false, show only inactive custom ticket statuses. If the filter is not used, show all custom ticket statuses
+ schema:
+ type: boolean
+ - name: default
+ in: query
+ description: If true, show only default custom ticket statuses. If false, show only non-default custom ticket statuses. If the filter is not used, show all custom ticket statuses
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: List custom ticket statuses
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomStatusesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomStatusesResponseExample'
+ post:
+ operationId: CreateCustomStatus
+ tags:
+ - Custom Ticket Statuses
+ summary: Create Custom Ticket Status
+ description: |
+ Takes a `custom_status` object that specifies the custom ticket status properties to create.
+
+ #### Allowed For
+
+ * Admins
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomStatusCreateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomStatusCreateRequestExample'
+ responses:
+ "201":
+ description: Created
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomStatusResponseExample'
+ /api/v2/custom_statuses/{custom_status_id}:
+ get:
+ operationId: ShowCustomStatus
+ tags:
+ - Custom Ticket Statuses
+ summary: Show Custom Ticket Status
+ description: |
+ Returns the custom ticket status object.
+
+ #### Allowed For
+
+ * End Users
+ parameters:
+ - $ref: '#/components/parameters/CustomStatusId'
+ responses:
+ "200":
+ description: Custom Status
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomStatusResponseExample'
+ put:
+ operationId: UpdateCustomStatus
+ tags:
+ - Custom Ticket Statuses
+ summary: Update Custom Ticket Status
+ description: |
+ Takes a `custom_status` object that specifies the properties to update.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/CustomStatusId'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomStatusUpdateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomStatusUpdateRequestExample'
+ responses:
+ "200":
+ description: Updated
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomStatusResponseExample'
+ delete:
+ operationId: DeleteCustomStatus
+ tags:
+ - Custom Ticket Statuses
+ summary: Delete Custom Ticket Status
+ description: |
+ Deletes the custom ticket status. The status must first be unassigned
+ from all active (non-closed) tickets before it can be deleted.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/CustomStatusId'
+ responses:
+ "204":
+ description: No Content
+ /api/v2/custom_statuses/{custom_status_id}/ticket_form_statuses:
+ parameters:
+ - $ref: '#/components/parameters/CustomStatusId'
+ post:
+ operationId: CreateTicketFormStatusesForCustomStatus
+ tags:
+ - Custom Ticket Statuses
+ - Ticket Form Statuses
+ summary: Create Ticket Form Statuses for a Custom Status
+ description: |
+ Creates one or many tickets form status associations for a custom status.
+
+ #### Allowed For
+
+ * Admins
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ ticket_form_status:
+ type: array
+ items:
+ type: object
+ properties:
+ ticket_form_id:
+ type: integer
+ description: The id of the ticket form
+ example: 1
+ example:
+ ticket_form_status:
+ - ticket_form_id: 1
+ - ticket_form_id: 2
+ - ticket_form_id: 3
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFormStatusesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFormStatusesResponseExample'
+ /api/v2/deleted_tickets:
+ get:
+ operationId: ListDeletedTickets
+ tags:
+ - Tickets
+ summary: List Deleted Tickets
+ description: |-
+ Returns a maximum of 100 deleted tickets per page. See [Pagination](/api-reference/introduction/pagination/).
+
+ The results includes all deleted (and not yet archived) tickets that
+ have not yet been [scrubbed](https://support.zendesk.com/hc/en-us/articles/4408845703194#topic_fv5_w51_sdb) in the past 30 days. Archived tickets are
+ not included in the results. See [About archived tickets](https://support.zendesk.com/hc/en-us/articles/203657756)
+ 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](https://support.zendesk.com/hc/en-us/articles/203657756).
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/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. These rate limits apply to both API calls and actions performed in the Admin Center.
+ The rate limiting mechanism behaves as described in
+ [Monitoring your request activity](/api-reference/ticketing/account-configuration/usage_limits/#monitoring-your-request-activity) in the API introduction.
+ parameters:
+ - $ref: '#/components/parameters/TicketSortBy'
+ - $ref: '#/components/parameters/TicketSortOrder'
+ - $ref: '#/components/parameters/TicketSupportTypeScope'
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ListDeletedTicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ListDeletedTicketsResponseExample'
+ /api/v2/deleted_tickets/{ticket_id}:
+ delete:
+ operationId: DeleteTicketPermanently
+ tags:
+ - Tickets
+ summary: Delete Ticket Permanently
+ description: |-
+ Permanently deletes a soft-deleted ticket. See [Soft delete](https://support.zendesk.com/hc/en-us/articles/4408834005530#topic_zrm_wbj_1db)
+ in the Zendesk GDPR docs. To soft delete a ticket, use the [Delete Ticket](#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](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work.
+ Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#show-job-status) endpoint to check for the job's completion.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/PermanentlyDeleteTicketJobStatusResponseExample'
+ /api/v2/deleted_tickets/{ticket_id}/restore:
+ put:
+ operationId: RestoreDeletedTicket
+ tags:
+ - Tickets
+ summary: Restore a Previously Deleted Ticket
+ description: |-
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ responses:
+ "200":
+ description: Empty response
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/deleted_tickets/destroy_many:
+ delete:
+ operationId: BulkPermanentlyDeleteTickets
+ tags:
+ - Tickets
+ summary: Delete Multiple Tickets Permanently
+ description: |-
+ Permanently deletes up to 100 soft-deleted tickets. See [Soft delete](https://support.zendesk.com/hc/en-us/articles/4408834005530#topic_zrm_wbj_1db)
+ in the Zendesk GDPR docs. To soft delete tickets, use the [Bulk Delete Tickets](#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](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/TicketIds'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/PermanentlyDeleteTicketJobStatusResponseExample'
+ /api/v2/deleted_tickets/restore_many:
+ put:
+ operationId: BulkRestoreDeletedTickets
+ tags:
+ - Tickets
+ summary: Restore Previously Deleted Tickets in Bulk
+ description: |-
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/TicketIds'
+ responses:
+ "200":
+ description: Empty response
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/deleted_users:
+ get:
+ operationId: ListDeletedUsers
+ tags:
+ - Users
+ summary: List Deleted Users
+ description: |
+ Returns deleted users, including permanently deleted users.
+
+ If the results contains permanently deleted users, the users' properties
+ that normally contain personal data, such as `email` and `phone`,
+ are null. The `name` property is "Permanently Deleted User".
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeletedUsersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DeletedUsersResponseExample'
+ /api/v2/deleted_users/{deleted_user_id}:
+ parameters:
+ - $ref: '#/components/parameters/DeletedUserId'
+ get:
+ operationId: ShowDeletedUser
+ tags:
+ - Users
+ summary: Show Deleted User
+ description: |
+ Returns users that have been deleted but not permanently yet. See [Permanently Delete User](#permanently-delete-user).
+
+ #### Allowed For:
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeletedUserResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DeletedUserResponseExample'
+ delete:
+ operationId: PermanentlyDeleteUser
+ tags:
+ - Users
+ summary: Permanently Delete User
+ description: |
+ Before permanently deleting a user, you must delete the user first. See [Delete User](/api-reference/ticketing/users/users/#delete-user).
+
+ WARNING: Permanently deleting a user deletes all of their information. This information is not recoverable.
+
+ #### Permanent user deletion rate limit
+
+ You can permanently delete 700 users every 10 minutes.
+ The rate limiting mechanism behaves as described in
+ [Rates Limits](/api-reference/introduction/rate-limits/#monitoring-your-request-activity) in the API introduction.
+ Zendesk recommends that you obey the Retry-After header values.
+
+ #### Allowed For
+
+ * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage end users or team members
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeletedUserResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DeletedUserResponseExample'
+ /api/v2/deleted_users/count:
+ get:
+ operationId: CountDeletedUsers
+ tags:
+ - Users
+ summary: Count Deleted Users
+ description: |
+ Returns an approximate count of deleted users, including permanently deleted users. If the count exceeds 100,000, it is updated every 24 hours.
+
+ The response includes a `refreshed_at` property in a `count` object that contains a timestamp indicating 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
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CountResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DeletedUsersCountResponseExample'
+ /api/v2/deletion_schedules:
+ get:
+ operationId: ListDeletionSchedules
+ tags:
+ - Deletion Schedules
+ summary: List Deletion Schedules
+ description: |
+ Lists all deletion schedules for the account. Deletion schedules are used to automatically delete data from the account after a certain period of time.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ deletion_schedules:
+ type: array
+ items:
+ $ref: '#/components/schemas/DeletionSchedule'
+ examples:
+ default:
+ $ref: '#/components/examples/GetDeletionSchedulesResponseExample'
+ post:
+ operationId: CreateDeletionSchedule
+ tags:
+ - Deletion Schedules
+ summary: Create Deletion Schedule
+ description: |
+ Creates a new deletion schedule.
+
+ #### Allowed For
+
+ * Admins
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ deletion_schedule:
+ $ref: '#/components/schemas/DeletionSchedule'
+ examples:
+ default:
+ $ref: '#/components/examples/CreateDeletionScheduleRequestExample'
+ responses:
+ "201":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ deletion_schedule:
+ $ref: '#/components/schemas/DeletionSchedule'
+ examples:
+ default:
+ $ref: '#/components/examples/CreateDeletionScheduleResponseExample'
+ /api/v2/deletion_schedules/{deletion_schedule_id}:
+ get:
+ operationId: GetDeletionSchedule
+ tags:
+ - Deletion Schedules
+ summary: Get Deletion Schedule
+ description: |
+ Gets a deletion schedule by its id.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/DeletionScheduleId'
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ deletion_schedule:
+ $ref: '#/components/schemas/DeletionSchedule'
+ examples:
+ default:
+ $ref: '#/components/examples/GetDeletionScheduleResponseExample'
+ put:
+ operationId: UpdateDeletionSchedule
+ tags:
+ - Deletion Schedules
+ summary: Update Deletion Schedule
+ description: |
+ Updates a deletion schedule by its id.
+
+ **Note**: Updating a condition updates the conditions array, clearing all existing values of the array. Include all your conditions when updating any condition.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/DeletionScheduleId'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ deletion_schedule:
+ $ref: '#/components/schemas/DeletionSchedule'
+ examples:
+ default:
+ $ref: '#/components/examples/UpdateDeletionScheduleRequestExample'
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ deletion_schedule:
+ $ref: '#/components/schemas/DeletionSchedule'
+ examples:
+ default:
+ $ref: '#/components/examples/UpdateDeletionScheduleResponseExample'
+ delete:
+ operationId: DeleteDeletionSchedule
+ tags:
+ - Deletion Schedules
+ summary: Delete Deletion Schedule
+ description: |
+ Deletes a deletion schedule by its id.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/DeletionScheduleId'
+ responses:
+ "204":
+ description: Success Response
+ /api/v2/dynamic_content/items:
+ get:
+ operationId: ListDynamicContents
+ tags:
+ - Dynamic Content
+ summary: List Items
+ description: |
+ Returns a list of all dynamic content items for your account if accessed as an admin or agents who have permission to manage dynamic content.
+
+ #### Allowed For
+
+ * Admins, Agents
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DynamicContentsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DynamicContentsResponseExample'
+ post:
+ operationId: CreateDynamicContent
+ tags:
+ - Dynamic Content
+ summary: Create Item
+ description: |
+ Create a new content item, with one or more variants in the item's `variants` array. See [Specifying item variants](#specifying-item-variants).
+
+ The `default_locale_id` and variant `locale_id` values must be one of the locales the account has active. You can get the list with the [List Locales](/api-reference/ticketing/account-configuration/locales/#list-locales) endpoint.
+
+ #### Allowed For
+
+ * Admins, Agents
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DynamicContentResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DynamicContentResponseExample'
+ /api/v2/dynamic_content/items/{dynamic_content_item_id}:
+ parameters:
+ - $ref: '#/components/parameters/DynamicContentItemId'
+ get:
+ operationId: ShowDynamicContentItem
+ tags:
+ - Dynamic Content
+ summary: Show Item
+ description: |
+ #### Allowed For
+
+ * Admins, Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DynamicContentResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DynamicContentResponseExample'
+ put:
+ operationId: UpdateDynamicContentItem
+ tags:
+ - Dynamic Content
+ summary: Update Item
+ description: |
+ The only attribute you can change is the name.
+
+ To add a variant to the item, or to update or delete the variants of the item, use the [Item Variants API](/api-reference/ticketing/ticket-management/dynamic_content_item_variants/#update-many-variants).
+
+ #### Allowed For
+
+ * Admins, Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DynamicContentResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DynamicContentUpdateResponseExample'
+ delete:
+ operationId: DeleteDynamicContentItem
+ tags:
+ - Dynamic Content
+ summary: Delete Item
+ description: |
+ #### Allowed For
+
+ * Admins, Agents
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants:
+ parameters:
+ - $ref: '#/components/parameters/DynamicContentItemId'
+ get:
+ operationId: DynamicContentListVariants
+ tags:
+ - Dynamic Content Item Variants
+ summary: List Variants
+ description: |
+ Returns all the variants of the specified dynamic content item.
+
+ #### Allowed For
+
+ * Admins
+ * Agents who have permission to manage dynamic content
+
+ #### Pagination
+
+ * Cursor pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DynamicContentVariantsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DynamicContentVariantsResponseExample'
+ post:
+ operationId: CreateDynamicContentVariant
+ tags:
+ - Dynamic Content Item Variants
+ summary: Create Variant
+ description: |
+ You can only create one variant for each locale id. If a locale variant already exists, the request is rejected.
+
+ #### Allowed For
+
+ * Admins, Agents
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DynamicContentVariantResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DynamicContentVariantResponseExample'
+ /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/{dynamic_content_variant_id}:
+ parameters:
+ - $ref: '#/components/parameters/DynamicContentItemId'
+ - $ref: '#/components/parameters/DynamicContentVariantId'
+ get:
+ operationId: ShowDynamicContentVariant
+ tags:
+ - Dynamic Content Item Variants
+ summary: Show Variant
+ description: |
+ #### Allowed For
+
+ * Admins, Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DynamicContentVariantResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DynamicContentVariantResponseExample'
+ put:
+ operationId: UpdateDynamicContentVariant
+ tags:
+ - Dynamic Content Item Variants
+ summary: Update Variant
+ description: |
+ Updates the specified variant. You don't need to include all the properties. If you just want to update content, for example, then include just that.
+
+ You can't switch the active state of the default variant of an item. Similarly, you can't switch the default to false if the variant is the default. You must make another variant default instead.
+
+ #### Allowed For
+
+ * Admins, Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DynamicContentVariantResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DynamicContentVariantUpdateResponseExample'
+ delete:
+ operationId: DeleteDynamicContentVariant
+ tags:
+ - Dynamic Content Item Variants
+ summary: Delete Variant
+ description: |
+ #### Allowed For
+
+ * Admins, Agents
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/create_many:
+ parameters:
+ - $ref: '#/components/parameters/DynamicContentItemId'
+ post:
+ operationId: CreateManyDynamicContentVariants
+ tags:
+ - Dynamic Content Item Variants
+ summary: Create Many Variants
+ description: |
+ #### Allowed For
+
+ * Admins, Agents
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DynamicContentVariantsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DynamicContentVariantsCreateManyResponseExample'
+ /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/update_many:
+ parameters:
+ - $ref: '#/components/parameters/DynamicContentItemId'
+ put:
+ operationId: UpdateManyDynamicContentVariants
+ tags:
+ - Dynamic Content Item Variants
+ summary: Update Many Variants
+ description: |
+ Updates one or more variants. See [Update Variant](/api-reference/ticketing/ticket-management/dynamic_content_item_variants/#update-variant).
+
+ You must specify the variants by id in the body. To get the variant ids, see [List Variants](/api-reference/ticketing/ticket-management/dynamic_content_item_variants/#list-variants).
+
+ #### Allowed For
+
+ * Admins, Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DynamicContentVariantsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DynamicContentVariantsUpdateManyResponseExample'
+ /api/v2/dynamic_content/items/show_many:
+ get:
+ operationId: ShowManyDynamicContents
+ tags:
+ - Dynamic Content
+ summary: Show Many Items
+ description: |
+ #### Stability
+
+ * Development
+
+ #### Allowed For
+
+ * Admins, Agents
+ parameters:
+ - name: identifiers
+ in: query
+ description: Identifiers for the dynamic contents
+ schema:
+ type: string
+ example: item1,item2
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DynamicContentsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DynamicContentsResponseExample'
+ /api/v2/email_notifications:
+ parameters:
+ - $ref: '#/components/parameters/EmailNotificationsFilter'
+ - $ref: '#/components/parameters/IncrementalPage'
+ - $ref: '#/components/parameters/Sort'
+ get:
+ operationId: ListEmailNotifications
+ tags:
+ - Email Notifications
+ summary: List Email Notifications
+ description: |
+ #### Allowed For
+
+ * Agents
+
+ #### Request parameters
+
+ ##### Filters
+
+ **Important**: You must specify a `filter` query parameter to narrow the scope of the search for this endpoint.
+
+ * By notification: `api/v2/email_notifications?filter[notification_id]=7824075373693`
+ * By comment: `api/v2/email_notifications?filter[comment_id]=782407`
+ * By ticket: `api/v2/email_notifications?filter[ticket_id]=623`
+
+ ##### Pagination
+
+ By default, a maximum of 100 email notifications are included per page. Use cursor-based pagination parameters (`page[after]` and `page[before]`) to navigate the records (can't be used together in the same request). See [Pagination](/api-reference/introduction/pagination/) for more details.
+
+ ##### Sorting
+
+ By default, email notifications are sorted by creation time (newest first). The query parameter is not supported for this endpoint.
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EmailNotificationsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/EmailNotificationsResponseExample'
+ /api/v2/email_notifications/{notification_id}:
+ parameters:
+ - $ref: '#/components/parameters/NotificationId'
+ get:
+ operationId: ShowEmailNotification
+ tags:
+ - Email Notifications
+ summary: Show Email Notification
+ description: |
+ Shows details on an email notification. You can get the value of the `notification_id` parameter by listing the ticket's outbound emails.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EmailNotificationResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/EmailNotificationResponseExample'
+ /api/v2/email_notifications/show_many:
+ parameters:
+ - $ref: '#/components/parameters/NotificationIds'
+ - $ref: '#/components/parameters/CommentIds'
+ - $ref: '#/components/parameters/EmailNotificationsByTicketIds'
+ get:
+ operationId: ShowManyEmailNotifications
+ tags:
+ - Email Notifications
+ summary: Show Many Email Notifications
+ description: |
+ Shows details of many email notifications. Allows you to query by providing a list of notifications, comments, or tickets IDs.
+
+ #### Allowed For
+
+ * Agents
+
+ #### Filters
+
+ * By notification: `?ids=8433702508541,8433348111869`
+ * By comment: `?comment_ids=8433348111741,8433544226045,8433702508413`
+ * By ticket: `?ticket_ids=730,723`
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EmailNotificationResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/EmailNotificationResponseExample'
+ /api/v2/end_users/{user_id}/identities:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ - name: type[]
+ in: query
+ description: Filters results by one or more identity types using the format `?type[]={type}&type[]={type}`
+ explode: true
+ schema:
+ type: string
+ enum:
+ - email
+ - phone_number
+ get:
+ operationId: ListEndUserIdentities
+ tags:
+ - User Identities
+ summary: List End User Identities
+ description: |
+ Returns a list of identities for the given end user.
+
+ End users can only list email and phone number identities.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page for cursor pagination.
+
+ #### Allowed For
+
+ * Verified end users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserIdentitiesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserIdentitiesResponseExample'
+ post:
+ operationId: CreateEndUserIdentity
+ tags:
+ - User Identities
+ summary: Create End User Identity
+ description: |
+ Adds an identity to an end user's profile.
+
+ Supported identity types for end users:
+
+ | Type | Example |
+ | ---------------- | ------- |
+ | email | `{ "type" : "email", "value" : "someone@example.com" }` |
+ | phone_number | `{ "type" : "phone_number", "value" : "+1 555-123-4567" }` |
+
+ #### Allowed For
+
+ * Verified end users
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserIdentityResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserIdentityCreateResponseExample'
+ /api/v2/end_users/{user_id}/identities/{user_identity_id}:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ - $ref: '#/components/parameters/UserIdentityId'
+ get:
+ operationId: ShowEndUserIdentity
+ tags:
+ - User Identities
+ summary: Show End User Identity
+ description: |
+ Shows the identity with the given id for a given end user.
+
+ End users can only view email or phone number identity.
+
+ #### Allowed For
+
+ * Verified end users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserIdentityResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserIdentityResponseExample'
+ delete:
+ operationId: DeleteEndUserIdentity
+ tags:
+ - User Identities
+ summary: Delete End User Identity
+ description: |
+ Deletes the identity for a given end user.
+
+ In certain cases, a phone number associated with an identity is still visible on the user profile after the identity has been deleted via API.
+
+ #### Allowed For
+
+ * Verified end users
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/end_users/{user_id}/identities/{user_identity_id}/make_primary:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ - $ref: '#/components/parameters/UserIdentityId'
+ put:
+ operationId: MakeEndUserIdentityPrimary
+ tags:
+ - User Identities
+ summary: Make End User Identity Primary
+ description: |
+ Sets the specified identity as primary for the end user. This is a collection-level operation and the correct behavior for an API client is to subsequently reload the entire collection.
+
+ An end user can only make an email identity primary if the email is verified.
+
+ #### Allowed For
+
+ * Verified end users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserIdentitiesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserIdentitiesResponseExample'
+ /api/v2/end_users/{user_id}/identities/{user_identity_id}/request_verification:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ - $ref: '#/components/parameters/UserIdentityId'
+ put:
+ operationId: RequestEndUserVerification
+ tags:
+ - User Identities
+ summary: Request End User Verification
+ description: |
+ Sends the end user a verification email with a link to verify ownership of the email address.
+
+ #### Allowed For
+
+ * Verified end users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/group_memberships:
+ get:
+ operationId: ListGroupMemberships
+ tags:
+ - Group Memberships
+ summary: List Memberships
+ description: |
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For:
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ - $ref: '#/components/parameters/GroupMembershipsInclude'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupMembershipsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupMembershipsResponseExample'
+ post:
+ operationId: CreateGroupMembership
+ tags:
+ - Group Memberships
+ summary: Create Membership
+ description: |
+ Assigns an agent to a given group.
+
+ #### Allowed For
+
+ * Admins
+ * Agents assigned to a custom role with permissions to manage group memberships (Enterprise only)
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupMembershipResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupMembershipResponseExample'
+ /api/v2/group_memberships/{group_membership_id}:
+ parameters:
+ - $ref: '#/components/parameters/GroupMembershipId'
+ get:
+ operationId: ShowGroupMembershipById
+ tags:
+ - Group Memberships
+ summary: Show Membership
+ description: |
+ The 'id' is the group membership id, not a group id.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupMembershipResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupMembershipResponseExample'
+ delete:
+ operationId: DeleteGroupMembership
+ tags:
+ - Group Memberships
+ summary: Delete Membership
+ description: |
+ Immediately removes a user from a group and schedules a job to unassign all working tickets that are assigned to the given user and group combination.
+
+ #### Allowed For
+
+ * Admins
+ * Agents assigned to a custom role with permissions to manage group memberships (Enterprise only)
+ responses:
+ "204":
+ description: No content response
+ /api/v2/group_memberships/assignable:
+ get:
+ operationId: ListAssignableGroupMemberships
+ tags:
+ - Group Memberships
+ summary: List Assignable Memberships
+ description: |
+ Returns a maximum of 100 group memberships per page.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For:
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupMembershipsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupMembershipsResponseExample'
+ /api/v2/group_memberships/create_many:
+ post:
+ operationId: GroupMembershipBulkCreate
+ tags:
+ - Group Memberships
+ summary: Bulk Create Memberships
+ description: |
+ Assigns up to 100 agents to given groups.
+
+ #### Allowed For
+
+ * Admins
+ * Agents assigned to a custom role with permissions to manage group memberships (Enterprise only)
+
+ #### Response
+
+ This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#show-job-status) endpoint to check for the job's completion.
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusResponseExample'
+ /api/v2/group_memberships/destroy_many:
+ delete:
+ operationId: GroupMembershipBulkDelete
+ tags:
+ - Group Memberships
+ summary: Bulk Delete Memberships
+ description: |
+ Immediately removes users from groups and schedules a job to unassign all working tickets that are assigned to the given user and group combinations.
+
+ #### Allowed For
+
+ * Admins
+ * Agents assigned to a custom role with permissions to manage group memberships (Enterprise only)
+ parameters:
+ - name: ids
+ in: query
+ description: Id of the group memberships to delete. Comma separated
+ schema:
+ type: string
+ example: 1,2,3
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusBulkDeleteResponseExample'
+ /api/v2/group_slas/policies:
+ get:
+ operationId: ListGroupSLAPolicies
+ tags:
+ - Group SLA Policies
+ summary: List Group SLA Policies
+ description: |
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupSLAPoliciesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupSLAPoliciesResponseExample'
+ post:
+ operationId: CreateGroupSLAPolicy
+ tags:
+ - Group SLA Policies
+ summary: Create Group SLA Policy
+ description: |
+ #### Allowed For
+
+ * Admins
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupSLAPolicyResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupSLAPolicyCreateResponse'
+ /api/v2/group_slas/policies/{group_sla_policy_id}:
+ parameters:
+ - $ref: '#/components/parameters/GroupSLAPolicyId'
+ get:
+ operationId: ShowGroupSLAPolicy
+ tags:
+ - Group SLA Policies
+ summary: Show Group SLA Policy
+ description: |
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupSLAPolicyResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupSLAPolicyResponseExample'
+ put:
+ operationId: UpdateGroupSLAPolicy
+ tags:
+ - Group SLA Policies
+ summary: Update Group SLA Policy
+ description: |
+ Updates the specified policy.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupSLAPolicyResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupSLAPolicyUpdateResponse'
+ delete:
+ operationId: DeleteGroupSLAPolicy
+ tags:
+ - Group SLA Policies
+ summary: Delete Group SLA Policy
+ description: |
+ #### Allowed For
+
+ * Admins
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/group_slas/policies/definitions:
+ get:
+ operationId: RetrieveGroupSLAPolicyFilterDefinitionItems
+ tags:
+ - Group SLA Policies
+ summary: Retrieve Supported Filter Definition Items
+ description: |
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupSLAPolicyFilterDefinitionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupSLAPolicyFilterDefinitionResponseExample'
+ /api/v2/group_slas/policies/reorder:
+ put:
+ operationId: ReorderGroupSLAPolicies
+ tags:
+ - Group SLA Policies
+ summary: Reorder Group SLA Policies
+ description: |
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - name: group_sla_policy_ids
+ in: query
+ description: The ids of the Group SLA policies to reorder
+ schema:
+ type: array
+ items:
+ type: string
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/groups:
+ get:
+ operationId: ListGroups
+ tags:
+ - Groups
+ summary: List Groups
+ description: |
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Admins
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/ExcludeDeleted'
+ - $ref: '#/components/parameters/GroupsInclude'
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ - $ref: '#/components/parameters/IncludeBoundaryIndicators'
+ - $ref: '#/components/parameters/IncludeItemCursors'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupsResponseExample'
+ post:
+ operationId: CreateGroup
+ tags:
+ - Groups
+ summary: Create Group
+ description: |
+ #### Allowed For
+
+ * Admins
+ * Agents assigned to a custom role with permissions to manage groups (Enterprise only)
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupCreateResponseExample'
+ /api/v2/groups/{group_id}:
+ parameters:
+ - $ref: '#/components/parameters/GroupId'
+ get:
+ operationId: ShowGroupById
+ tags:
+ - Groups
+ summary: Show Group
+ description: |
+ #### Allowed For
+
+ * Admins
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/GroupsInclude'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupResponseExample'
+ put:
+ operationId: UpdateGroup
+ tags:
+ - Groups
+ summary: Update Group
+ description: |
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupUpdateResponseExample'
+ delete:
+ operationId: DeleteGroup
+ tags:
+ - Groups
+ summary: Delete Group
+ description: |
+ #### Allowed For
+
+ * Admins
+ * Agents assigned to a custom role with permissions to manage groups (Enterprise only)
+ responses:
+ "204":
+ description: No content response
+ /api/v2/groups/{group_id}/memberships:
+ parameters:
+ - $ref: '#/components/parameters/GroupId'
+ get:
+ operationId: ListGroupMembershipsByGroup
+ tags:
+ - Group Memberships
+ - Groups
+ summary: List Memberships By Group
+ description: |
+ Returns a list of all group memberships for a specific group.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For:
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupMembershipsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupMembershipsResponseExample'
+ /api/v2/groups/{group_id}/memberships/assignable:
+ parameters:
+ - $ref: '#/components/parameters/GroupId'
+ get:
+ operationId: ListAssignableGroupMembershipsByGroup
+ tags:
+ - Group Memberships
+ - Groups
+ summary: List Assignable Memberships By Group
+ description: |
+ Returns a list of assignable group memberships for a specific group.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For:
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupMembershipsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupMembershipsResponseExample'
+ /api/v2/groups/{group_id}/users:
+ parameters:
+ - $ref: '#/components/parameters/GroupId'
+ get:
+ operationId: ListGroupUsers
+ tags:
+ - Users
+ - Groups
+ summary: List Users By Group
+ description: |
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Admins, Agents and Light Agents
+ parameters:
+ - $ref: '#/components/parameters/UserRoleFilter'
+ - $ref: '#/components/parameters/UserRolesFilter'
+ - $ref: '#/components/parameters/UserPermissionSetFilter'
+ - $ref: '#/components/parameters/UserExternalIdFilter'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UsersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UsersResponseExample'
+ /api/v2/groups/{group_id}/users/count:
+ parameters:
+ - $ref: '#/components/parameters/GroupId'
+ get:
+ operationId: CountGroupUsers
+ tags:
+ - Users
+ - Groups
+ summary: Count Users By Group
+ description: |
+ Returns an approximate count of users in the specified group. If the count exceeds 100,000, it is updated every 24 hours.
+
+ The response includes a `refreshed_at` property in a `count` object that contains a timestamp indicating when the count was last updated.
+
+ **Note**: When the count exceeds 100,000, the `refreshed_at` property may occasionally be null.
+ This indicates that the count is being updated in the background. The `count` object's `value` property is limited to 100,000 until the update is complete.
+
+ #### Allowed For
+
+ * Admins, Agents and Light Agents
+ parameters:
+ - $ref: '#/components/parameters/UserRoleFilter'
+ - $ref: '#/components/parameters/UserRolesFilter'
+ - $ref: '#/components/parameters/UserPermissionSetFilter'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CountResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserCountResponseExample'
+ /api/v2/groups/assignable:
+ get:
+ operationId: ListAssignableGroups
+ tags:
+ - Groups
+ summary: List Assignable Groups
+ description: |
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Admins
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupsResponseExample'
+ /api/v2/groups/count:
+ get:
+ operationId: CountGroups
+ tags:
+ - Groups
+ summary: Count Groups
+ description: |
+ Returns an approximate count of groups. If the count exceeds 100,000, it is updated every 24 hours.
+
+ The `refreshed_at` property of the `count` object is a timestamp that indicates when the count was last updated.
+
+ **Note**: When the count exceeds 100,000, `refreshed_at` may occasionally be null. This indicates that the count is being updated in the background, and the `value` property of the `count` object is limited to 100,000 until the update is complete.
+
+ #### Allowed For
+
+ * Admins
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupsCountObject'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupsCountResponseExample'
+ /api/v2/imports/tickets:
+ post:
+ operationId: TicketImport
+ tags:
+ - Ticket Import
+ summary: Ticket Import
+ description: |-
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/ArchiveImmediately'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketImportRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketImportRequestExample'
+ responses:
+ "201":
+ description: Successfully created
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketResponseExample'
+ /api/v2/imports/tickets/create_many:
+ post:
+ operationId: TicketBulkImport
+ tags:
+ - Ticket Import
+ summary: Ticket Bulk Import
+ description: |-
+ Accepts an array of up to 100 ticket objects.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/ArchiveImmediately'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketBulkImportRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketBulkImportRequestExample'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusResponseExample'
+ /api/v2/incremental/{incremental_resource}/sample:
+ parameters:
+ - $ref: '#/components/parameters/IncrementalUnixTime'
+ - $ref: '#/components/parameters/IncrementalResource'
+ get:
+ operationId: IncrementalSampleExport
+ tags:
+ - Incremental Export
+ summary: Incremental Sample Export
+ description: |
+ Use this endpoint to test the incremental export format. It's more strict in terms of rate limiting,
+ at 10 requests per 20 minutes instead of 10 requests per minute. It also returns only up to 50
+ results per request. Otherwise, it's identical to the above APIs.
+
+ Use the `incremental_resource` parameter to specify the resource. Possible values are "tickets", "ticket_events", "users", or "organizations".
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TimeBasedExportIncrementalTicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TimeBasedExportIncrementalTicketsResponseExample'
+ /api/v2/incremental/custom_objects/{custom_object_key}/cursor:
+ parameters:
+ - $ref: '#/components/parameters/OptionalIncrementalUnixTime'
+ - $ref: '#/components/parameters/IncrementalCursor'
+ - name: custom_object_key
+ in: path
+ description: The key identifier for the custom object
+ required: true
+ schema:
+ type: string
+ example: apartment
+ - name: per_page
+ in: query
+ description: Number of records to return per page (default 1000, maximum 1000)
+ schema:
+ type: integer
+ default: 1000
+ minimum: 1
+ maximum: 1000
+ - name: filter[exclude_deleted]
+ in: query
+ description: If true, exclude deleted records from the export
+ schema:
+ type: boolean
+ default: false
+ get:
+ operationId: IncrementalCustomObjectRecordExportCursor
+ tags:
+ - Custom Object Records
+ - Incremental Export
+ summary: Incremental Custom Object Record Export, Cursor Based
+ description: "Returns the custom object records that changed since the start time. This endpoint supports \ncursor-based incremental exports for custom object records.\n\nThis endpoint only supports cursor-based pagination and does not support offset-based pagination.\nCursor-based exports provide more consistent performance and response body sizes. For more information, \nsee [Cursor-based incremental exports](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#cursor-based-incremental-exports) in [Using the Incremental Exports API](/documentation/ticketing/managing-tickets/using-the-incremental-export-api).\n\n#### Allowed For\n\n* Admins\n* Agents with custom object read permissions\n\n#### Rate Limiting\n\nYou can make up to 10 requests per minute to this endpoint.\n\n#### Notes\n\n- `start_time` is only required for the initial request for the pages in the record set, then `cursor` is required for all subsequent requests\n- The `start_time` must be more than 60 seconds ago\n- Deleted records will have their field values replaced with \"[DELETED]\" unless excluded via filter\n- Photo fields are excluded from incremental export responses\n"
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IncrementalCustomObjectRecordsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/IncrementalCustomObjectRecordsResponseExample'
+ "400":
+ description: Bad request - Invalid parameters
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ errors:
+ type: array
+ items:
+ type: object
+ properties:
+ code:
+ type: string
+ status:
+ type: string
+ title:
+ type: string
+ examples:
+ default:
+ value:
+ errors:
+ - code: StartTimeTooRecent
+ status: "400"
+ title: start_time must be more than 60 seconds ago
+ invalid_cursor:
+ value:
+ errors:
+ - code: InvalidCursor
+ status: "400"
+ title: cursor is invalid or expired
+ start_time_too_recent:
+ value:
+ errors:
+ - code: StartTimeTooRecent
+ status: "400"
+ title: start_time must be more than 60 seconds ago
+ "401":
+ description: Unauthorized - Authentication required
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ errors:
+ type: array
+ items:
+ type: object
+ properties:
+ code:
+ type: string
+ status:
+ type: string
+ title:
+ type: string
+ examples:
+ default:
+ value:
+ errors:
+ - code: Unauthorized
+ status: "401"
+ title: Authentication required
+ unauthorized:
+ value:
+ errors:
+ - code: Unauthorized
+ status: "401"
+ title: Authentication required
+ "403":
+ description: Forbidden - Insufficient permissions to access custom objects
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ errors:
+ type: array
+ items:
+ type: object
+ properties:
+ code:
+ type: string
+ status:
+ type: string
+ title:
+ type: string
+ examples:
+ default:
+ value:
+ errors:
+ - code: Forbidden
+ status: "403"
+ title: Insufficient permissions to access custom objects
+ forbidden:
+ value:
+ errors:
+ - code: Forbidden
+ status: "403"
+ title: Insufficient permissions to access custom objects
+ "404":
+ description: Not found - Custom object not found or feature not enabled
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ errors:
+ type: array
+ items:
+ type: object
+ properties:
+ code:
+ type: string
+ status:
+ type: string
+ title:
+ type: string
+ examples:
+ custom_object_not_found:
+ value:
+ errors:
+ - code: CustomObjectNotFound
+ status: "404"
+ title: Custom object not found
+ default:
+ value:
+ errors:
+ - code: CustomObjectNotFound
+ status: "404"
+ title: Custom object not found
+ feature_not_enabled:
+ value:
+ errors:
+ - code: FeatureNotEnabled
+ status: "404"
+ title: Custom objects feature is not enabled
+ "429":
+ description: Too many requests - Rate limit exceeded
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ errors:
+ type: array
+ items:
+ type: object
+ properties:
+ code:
+ type: string
+ status:
+ type: string
+ title:
+ type: string
+ examples:
+ default:
+ value:
+ errors:
+ - code: RateLimitExceeded
+ status: "429"
+ title: Rate limit exceeded. Maximum 10 requests per minute.
+ rate_limit_exceeded:
+ value:
+ errors:
+ - code: RateLimitExceeded
+ status: "429"
+ title: Rate limit exceeded. Maximum 10 requests per minute.
+ /api/v2/incremental/organizations:
+ parameters:
+ - $ref: '#/components/parameters/IncrementalUnixTime'
+ - $ref: '#/components/parameters/IncrementalPage'
+ get:
+ operationId: IncrementalOrganizationExport
+ tags:
+ - Incremental Export
+ summary: Incremental Organization Export
+ description: |
+ #### Allowed For
+
+ * Admins
+
+ #### Sideloading
+
+ See [Organizations sideloads](/documentation/ticketing/using-the-zendesk-api/side_loading/#supported-endpoints).
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ExportIncrementalOrganizationsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ExportIncrementalOrganizationsResponseExample'
+ /api/v2/incremental/routing/attribute_values:
+ get:
+ operationId: IncrementalSkilBasedRoutingAttributeValuesExport
+ tags:
+ - Incremental Skill Based Routing
+ summary: Incremental Attributes Values Export
+ description: |
+ Returns a stream of changes that occurred on routing attribute values.
+
+ #### Allowed For
+
+ * Admins
+
+ #### Parameters
+
+ Optional
+
+ | Name | Type | Comment
+ | ------ | ------ | -------
+ | cursor | string | The `cursor` parameter is a non-human-readable argument you can use to move forward or backward in time. The cursor is a read-only URL parameter that's only available in API responses. See [Pagination](#pagination).
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IncrementalSkillBasedRouting'
+ examples:
+ default:
+ $ref: '#/components/examples/IncrementalSkillBasedRoutingAttributeValuesExample'
+ /api/v2/incremental/routing/attributes:
+ get:
+ operationId: IncrementalSkilBasedRoutingAttributesExport
+ tags:
+ - Incremental Skill Based Routing
+ summary: Incremental Attributes Export
+ description: |
+ Returns a stream of changes that occurred on routing attributes.
+
+ #### Allowed For
+
+ * Admins
+
+ #### Parameters
+
+ Optional
+
+
+ | Name | Type | Comment
+ | ------ | ------ | -------
+ | cursor | string | The `cursor` parameter is a non-human-readable argument you can use to move forward or backward in time. The cursor is a read-only URL parameter that's only available in API responses. See [Pagination](#pagination).
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IncrementalSkillBasedRouting'
+ examples:
+ default:
+ $ref: '#/components/examples/IncrementalSkillBasedRoutingAttributesExample'
+ /api/v2/incremental/routing/instance_values:
+ get:
+ operationId: IncrementalSkilBasedRoutingInstanceValuesExport
+ tags:
+ - Incremental Skill Based Routing
+ summary: Incremental Instance Values Export
+ description: |
+ Returns a stream of changes that occurred on routing instance values. Changes are grouped by `attribute_value_id`,
+ with associate type events listed alongside unassociate type events based on the unassociate event’s timestamp.
+
+ #### Allowed For
+
+ * Admins
+
+ #### Parameters
+
+ Optional
+
+ | Name | Type | Comment
+ | ------ | ------ | -------
+ | cursor | string | The `cursor` parameter is a non-human-readable argument you can use to move forward or backward in time. The cursor is a read-only URL parameter that's only available in API responses. See [Pagination](#pagination).
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IncrementalSkillBasedRouting'
+ examples:
+ default:
+ $ref: '#/components/examples/IncrementalSkillBasedRoutingInstanceValuesExample'
+ /api/v2/incremental/ticket_events:
+ parameters:
+ - $ref: '#/components/parameters/IncrementalUnixTime'
+ - $ref: '#/components/parameters/TicketSupportTypeScope'
+ get:
+ operationId: IncrementalTicketEvents
+ tags:
+ - Incremental Export
+ summary: Incremental Ticket Event Export
+ description: |
+ Returns a stream of changes that occurred on tickets, excluding events occuring within one minute of the request. Each event is tied
+ to an update on a ticket and contains all the fields that were updated in that
+ change. For more information, see:
+
+ - [Exporting ticket events](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#exporting-ticket-events) in [Using the Incremental Exports API](/documentation/ticketing/managing-tickets/using-the-incremental-export-api)
+ - [Time-based incremental exports](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#time-based-incremental-exports) in [Using the Incremental Exports API](/documentation/ticketing/managing-tickets/using-the-incremental-export-api)
+
+ You can include comments in the event stream by using the `comment_events`
+ sideload. See Sideloading below. If you don't specify the sideload, any comment
+ present in the ticket update is described only by Boolean `comment_present`
+ and `comment_public` object properties in the event's `child_events` array.
+ The comment itself is not included.
+
+ #### Allowed For
+
+ * Admins
+
+ #### Sideloading
+
+ The endpoint supports the `comment_events` sideload. Any comment present in the ticket
+ update is listed as an object in the event's `child_events` array. Example:
+
+ ```js
+ "child_events": [
+ {
+ "id": 91048994488,
+ "via": {
+ "channel": "api",
+ "source": {"from":{},"to":{},"rel":null}},
+ "via_reference_id":null,
+ "type": "Comment",
+ "author_id": 5031726587,
+ "body": "This is a comment",
+ "html_body": "<div class="zd-comment"><p dir="auto">This is a comment</p>",
+ "public": true,
+ "attachments": [],
+ "audit_id": 91048994468,
+ "created_at": "2009-06-25T10:15:18Z",
+ "event_type": "Comment"
+ },
+ ...
+ ],
+ ...
+ ```
+ parameters:
+ - $ref: '#/components/parameters/IncrementalTicketEventsInclude'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ExportIncrementalTicketEventsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ExportIncrementalTicketEventsResponseExample'
+ /api/v2/incremental/ticket_metric_events:
+ get:
+ operationId: ListTicketMetricEvents
+ tags:
+ - Ticket Metric Events
+ summary: List Ticket Metric Events
+ description: |-
+ 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](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#time-based-incremental-exports).
+
+ #### Pagination
+ * Cursor pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - name: start_time
+ in: query
+ description: 'The Unix UTC epoch time of the oldest event you''re interested in. Example: 1332034771.'
+ required: true
+ schema:
+ type: integer
+ example: 1332034771
+ - name: include_changes
+ in: query
+ description: This optional parameter enhances incremental data retrieval, delivering a consistent and accurate representation of data changes.
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketMetricEventsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketMetricEventsResponseExample'
+ /api/v2/incremental/tickets:
+ parameters:
+ - $ref: '#/components/parameters/IncrementalUnixTime'
+ - $ref: '#/components/parameters/TicketSupportTypeScope'
+ get:
+ operationId: IncrementalTicketExportTime
+ tags:
+ - Incremental Export
+ summary: Incremental Ticket Export, Time Based
+ description: |
+ Returns the tickets that changed since the start time. For more information,
+ see [Exporting tickets](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#exporting-tickets) in [Using the Incremental Exports API](/documentation/ticketing/managing-tickets/using-the-incremental-export-api).
+
+ This endpoint supports time-based incremental exports.
+ For more information, see [Time-based incremental exports](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#time-based-incremental-exports) in [Using the Incremental Exports API](/documentation/ticketing/managing-tickets/using-the-incremental-export-api). You can also return tickets using cursor-based pagination. See [Incremental Ticket Export, Cursor Based](#incremental-ticket-export-cursor-based).
+
+ The results include tickets that were updated by the system. See
+ [Excluding system-updated tickets](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#excluding-system-updated-tickets-time-based-exports) in [Using the Incremental Exports API](/documentation/ticketing/managing-tickets/using-the-incremental-export-api).
+
+ The endpoint can return tickets with an `updated_at` time that's earlier than the
+ `start_time` time. The reason is that the API compares the `start_time` with the ticket's
+ `generated_timestamp` value, not its `updated_at` value. The `updated_at` value is
+ updated only if the update generates a [ticket event](#incremental-ticket-event-export).
+ The `generated_timestamp` value is updated for all ticket updates, including system
+ updates. If a system update occurs after a ticket event, the unchanged
+ `updated_at` time will become earlier relative to the updated `generated_timestamp`
+ time.
+
+ #### Allowed For
+
+ * Admins
+
+ #### Sideloading
+
+ See [Tickets sideloads](/documentation/ticketing/using-the-zendesk-api/side_loading/#supported-endpoints). For performance reasons,
+ `last_audits` sideloads aren't supported.
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TimeBasedExportIncrementalTicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TimeBasedExportIncrementalTicketsResponseExample'
+ /api/v2/incremental/tickets/cursor:
+ parameters:
+ - $ref: '#/components/parameters/OptionalIncrementalUnixTime'
+ - $ref: '#/components/parameters/IncrementalCursor'
+ - $ref: '#/components/parameters/TicketSupportTypeScope'
+ get:
+ operationId: IncrementalTicketExportCursor
+ tags:
+ - Incremental Export
+ summary: Incremental Ticket Export, Cursor Based
+ description: |
+ Returns the tickets that changed since the start time. For more information,
+ see [Exporting tickets](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#exporting-tickets) in [Using the Incremental Exports API](/documentation/ticketing/managing-tickets/using-the-incremental-export-api).
+
+ This endpoint supports cursor-based incremental exports.
+ Cursor-based exports are highly encouraged because they provide more consistent performance and
+ response body sizes. For more information, see [Cursor-based incremental exports](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#cursor-based-incremental-exports) in [Using the Incremental Exports API](/documentation/ticketing/managing-tickets/using-the-incremental-export-api).
+
+
+
+ #### Allowed For
+
+ * Admins
+
+ #### Sideloading
+
+ See [Tickets sideloads](/documentation/ticketing/using-the-zendesk-api/side_loading/#supported-endpoints). For performance reasons,
+ `last_audits` sideloads aren't supported.
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CursorBasedExportIncrementalTicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CursorBasedExportIncrementalTicketsResponseExample'
+ /api/v2/incremental/users:
+ parameters:
+ - $ref: '#/components/parameters/IncrementalUnixTime'
+ - $ref: '#/components/parameters/IncrementalPage'
+ get:
+ operationId: IncrementalUserExportTime
+ tags:
+ - Incremental Export
+ summary: Incremental User Export, Time Based
+ description: |
+ #### Allowed For
+
+ * Admins
+
+ #### Sideloading
+
+ See [Users sideloads](/documentation/ticketing/using-the-zendesk-api/side_loading/#supported-endpoints).
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TimeBasedExportIncrementalUsersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TimeBasedExportIncrementalUsersResponseExample'
+ /api/v2/incremental/users/cursor:
+ parameters:
+ - $ref: '#/components/parameters/OptionalIncrementalUnixTime'
+ - $ref: '#/components/parameters/IncrementalCursor'
+ - $ref: '#/components/parameters/IncrementalPage'
+ get:
+ operationId: IncrementalUserExportCursor
+ tags:
+ - Incremental Export
+ summary: Incremental User Export, Cursor Based
+ description: |
+ #### Allowed For
+
+ * Admins
+
+ #### Sideloading
+
+ See [Users sideloads](/documentation/ticketing/using-the-zendesk-api/side_loading/#supported-endpoints).
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CursorBasedExportIncrementalUsersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CursorBasedExportIncrementalUsersResponseExample'
+ /api/v2/it_asset_management/asset_types:
+ get:
+ operationId: ListItamAssetTypes
+ tags:
+ - ITAM Asset Types
+ summary: List Asset Types
+ description: |-
+ Lists all asset types.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetTypesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetTypesIndexResponseExample'
+ post:
+ operationId: CreateItamAssetType
+ tags:
+ - ITAM Asset Types
+ summary: Create Asset Type
+ description: |
+ Creates an asset type.
+
+ #### Allowed For
+
+ * Admins
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetTypeCreateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetTypeCreateRequestExample'
+ responses:
+ "201":
+ description: Created
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetTypeResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetTypeResponseExample'
+ /api/v2/it_asset_management/asset_types/{asset_type_id}:
+ get:
+ operationId: ShowItamAssetType
+ tags:
+ - ITAM Asset Types
+ summary: Show Asset Type
+ description: |
+ Returns an asset type with the specified id.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/ItamAssetTypeId'
+ responses:
+ "200":
+ description: Asset type
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetTypeResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetTypeResponseExample'
+ patch:
+ operationId: UpdateItamAssetType
+ tags:
+ - ITAM Asset Types
+ summary: Update Asset Type
+ description: |-
+ Updates an existing asset type.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/ItamAssetTypeId'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetTypeResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetTypeResponseExample'
+ delete:
+ operationId: DeleteItamAssetType
+ tags:
+ - ITAM Asset Types
+ summary: Delete Asset Type
+ description: |-
+ Deletes an asset type with the specified id.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/ItamAssetTypeId'
+ responses:
+ "204":
+ description: No content response
+ /api/v2/it_asset_management/asset_types/{asset_type_id}/fields:
+ get:
+ operationId: ListItamAssetTypeFields
+ tags:
+ - ITAM Asset Fields
+ summary: List Asset Fields
+ description: |-
+ Lists all standard and custom fields for an asset type.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/ItamAssetTypeId'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetTypeFieldsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetTypeFieldsIndexResponseExample'
+ post:
+ operationId: CreateItamAssetTypeField
+ tags:
+ - ITAM Asset Fields
+ summary: Create Asset Field
+ description: |-
+ Creates an asset field for an individual asset type.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/ItamAssetTypeId'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetFieldCreateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetFieldCreateRequestExample'
+ responses:
+ "201":
+ description: Created
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetFieldResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetFieldResponseExample'
+ /api/v2/it_asset_management/asset_types/{asset_type_id}/fields/{asset_type_field_id}:
+ get:
+ operationId: ShowItamAssetTypeField
+ tags:
+ - ITAM Asset Fields
+ summary: Show Asset Field
+ description: |
+ Returns an asset field with the specified id.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/ItamAssetTypeId'
+ - $ref: '#/components/parameters/ItamAssetTypeFieldId'
+ responses:
+ "200":
+ description: Asset field
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetFieldResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetFieldResponseExample'
+ patch:
+ operationId: UpdateItamAssetTypeField
+ tags:
+ - ITAM Asset Fields
+ summary: Update Asset Field
+ description: |-
+ Updates an existing asset field with the specified id.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/ItamAssetTypeId'
+ - $ref: '#/components/parameters/ItamAssetTypeFieldId'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetFieldResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetFieldResponseExample'
+ delete:
+ operationId: DeleteItamAssetTypeField
+ tags:
+ - ITAM Asset Fields
+ summary: Delete Asset Field
+ description: |-
+ Deletes an asset field with the specified id.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/ItamAssetTypeId'
+ - $ref: '#/components/parameters/ItamAssetTypeFieldId'
+ responses:
+ "204":
+ description: No content response
+ /api/v2/it_asset_management/assets:
+ get:
+ operationId: ListItamAssets
+ tags:
+ - ITAM Assets
+ summary: List Assets
+ description: |-
+ Lists all assets for all asset types.
+
+ #### Pagination
+
+ * [Cursor pagination](/api-reference/introduction/pagination/#cursor-pagination) only.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetsIndexResponseExample'
+ post:
+ operationId: CreateItamAsset
+ tags:
+ - ITAM Assets
+ summary: Create Asset
+ description: |
+ Creates an asset.
+
+ #### Allowed For
+
+ * Admins
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetCreateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetCreateRequestExample'
+ responses:
+ "201":
+ description: Created
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetResponseExample'
+ /api/v2/it_asset_management/assets/{asset_id}:
+ get:
+ operationId: ShowItamAsset
+ tags:
+ - ITAM Assets
+ summary: Show Asset
+ description: |
+ Returns the asset with the specified id.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/ItamAssetId'
+ responses:
+ "200":
+ description: Asset
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetResponseExample'
+ patch:
+ operationId: UpdateItamAsset
+ tags:
+ - ITAM Assets
+ summary: Update Asset
+ description: |-
+ Updates an individual asset. This request takes an `asset` object that specifies the properties to update, with custom field values nested within a `custom_field_values` object. Values are updated only for the properties specified in the request. Any asset properties that aren't specified in the request are unaffected, and their values are preserved for the asset.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/ItamAssetId'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetResponseExample'
+ delete:
+ operationId: DeleteItamAsset
+ tags:
+ - ITAM Assets
+ summary: Delete Asset
+ description: |-
+ Deletes an asset with the specified id.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/ItamAssetId'
+ responses:
+ "204":
+ description: No content response
+ /api/v2/it_asset_management/assets/jobs:
+ post:
+ operationId: ItamAssetBulkJobs
+ tags:
+ - ITAM Assets
+ summary: Asset Bulk Jobs
+ description: |
+ Queues a background job to perform bulk actions on up to 100 asset records per request.
+ Takes a `job` object with two nested fields:
+ * `action`, one of:
+ * `"create"`
+ * `"update"`
+ * `"delete"`
+ * `"delete_by_external_id"`
+ * `items`
+ * For a `"create"` action, an array of JSON objects representing the assets being created
+ * For an `"update"` action, an array of JSON objects representing the assets being updated (must include `id` attribute)
+ * For a `"delete"` action, an array of strings representing Zendesk asset ids
+ * For a `"delete_by_external_id"` action, an array of strings representing external ids
+
+ Note: For create and update actions, the `asset_type_id`, `status_id`, and `location_id` fields can be specified using either the ID or the name of the resource. For example, you can use `"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H"` or `"asset_type": "Laptop"`.
+
+ #### Allowed For
+ * Admins
+
+ #### Response
+ This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetBulkJobRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetBulkJobRequestExample'
+ responses:
+ "201":
+ description: Created
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetBulkJobResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetBulkJobResponseExample'
+ /api/v2/it_asset_management/locations:
+ get:
+ operationId: ListItamLocations
+ tags:
+ - ITAM Asset Locations
+ summary: List Asset Locations
+ description: |-
+ Lists all locations.
+
+ #### Pagination
+
+ * [Cursor pagination](/api-reference/introduction/pagination/#cursor-pagination) only.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetLocationsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetLocationsIndexResponseExample'
+ post:
+ operationId: CreateItamLocation
+ tags:
+ - ITAM Asset Locations
+ summary: Create Asset Location
+ description: |
+ Creates a location.
+
+ #### Allowed For
+
+ * Admins
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetLocationCreateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetLocationCreateRequestExample'
+ responses:
+ "201":
+ description: Created
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetLocationResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetLocationResponseExample'
+ /api/v2/it_asset_management/locations/{location_id}:
+ get:
+ operationId: ShowItamLocation
+ tags:
+ - ITAM Asset Locations
+ summary: Show Asset Location
+ description: |
+ Returns the location with the specified id.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/ItamAssetLocationId'
+ responses:
+ "200":
+ description: Location
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetLocationResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetLocationResponseExample'
+ patch:
+ operationId: UpdateItamLocation
+ tags:
+ - ITAM Asset Locations
+ summary: Update Asset Location
+ description: |-
+ Updates an existing location.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/ItamAssetLocationId'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetLocationResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetLocationResponseExample'
+ delete:
+ operationId: DeleteItamLocation
+ tags:
+ - ITAM Asset Locations
+ summary: Delete Asset Location
+ description: |-
+ Deletes a location with the specified id.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/ItamAssetLocationId'
+ responses:
+ "204":
+ description: No content response
+ /api/v2/it_asset_management/statuses:
+ get:
+ operationId: ListItamStatuses
+ tags:
+ - ITAM Asset Statuses
+ summary: List Asset Statuses
+ description: |-
+ Lists all statuses.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetStatusesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetStatusesIndexResponseExample'
+ /api/v2/it_asset_management/statuses/{status_id}:
+ get:
+ operationId: ShowItamStatus
+ tags:
+ - ITAM Asset Statuses
+ summary: Show Asset Status
+ description: |
+ Returns the status with the specified id.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/ItamAssetStatusId'
+ responses:
+ "200":
+ description: Asset Status
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItamAssetStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ItamAssetStatusResponseExample'
+ /api/v2/job_statuses:
+ get:
+ operationId: ListJobStatuses
+ tags:
+ - Job Statuses
+ summary: List Job Statuses
+ description: |
+ Shows the statuses for background jobs. Statuses are sorted first by completion date and then by creation date in descending order.
+
+ #### Allowed For:
+
+ * Agents
+
+ #### Pagination
+
+ * Cursor pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+ parameters:
+ - $ref: '#/components/parameters/CursorPaginationPage'
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusesResponseExample'
+ /api/v2/job_statuses/{job_status_id}:
+ parameters:
+ - $ref: '#/components/parameters/JobStatusId'
+ get:
+ operationId: ShowJobStatus
+ tags:
+ - Job Statuses
+ summary: Show Job Status
+ description: |
+ Shows the status of a background job.
+
+ #### Allowed For:
+
+ * Agents
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ShowJobStatusResponseExample'
+ /api/v2/job_statuses/show_many:
+ get:
+ operationId: ShowManyJobStatuses
+ tags:
+ - Job Statuses
+ summary: Show Many Job Statuses
+ description: |
+ Accepts a comma-separated list of job status ids.
+
+ #### Allowed For:
+
+ * Agents
+ parameters:
+ - name: ids
+ in: query
+ description: Comma-separated list of job status ids.
+ required: true
+ schema:
+ type: string
+ example: 8b726e606741012ffc2d782bcb7848fe,e7665094164c498781ebe4c8db6d2af5
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusesResponseExample'
+ /api/v2/locales:
+ get:
+ operationId: ListLocales
+ tags:
+ - Locales
+ summary: List Locales
+ description: |
+ Lists the translation locales available for the account.
+
+ **Note**: You can alter the list by passing an updated `locale_ids` array to the [Update Account Settings](/api-reference/ticketing/account-configuration/account_settings/#update-account-settings) endpoint.
+
+ #### Allowed For
+
+ * Anyone
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LocalesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/LocalesResponseExample'
+ /api/v2/locales/{locale_id}:
+ parameters:
+ - $ref: '#/components/parameters/LocaleId'
+ get:
+ operationId: ShowLocaleById
+ tags:
+ - Locales
+ summary: Show Locale
+ description: |
+ #### Allowed For
+
+ * Anyone
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LocaleResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/LocaleResponseExample'
+ /api/v2/locales/agent:
+ get:
+ operationId: ListLocalesForAgent
+ tags:
+ - Locales
+ summary: List Locales for Agent
+ description: |
+ Lists the translation locales that have been localized for agents on a specific account.
+
+ #### Allowed For
+
+ * Anyone
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LocalesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/LocalesResponseExample'
+ /api/v2/locales/current:
+ get:
+ operationId: ShowCurrentLocale
+ tags:
+ - Locales
+ summary: Show Current Locale
+ description: |
+ This works like [Show Locale](#show-locale), but instead of taking a locale id as an argument, it renders the locale of the user performing the request.
+
+ #### Allowed For
+
+ * Anyone
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LocaleResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/LocaleResponseExample'
+ /api/v2/locales/detect_best_locale:
+ get:
+ operationId: DetectBestLocale
+ tags:
+ - Locales
+ summary: Detect Best Language for User
+ description: |
+ #### Allowed For
+
+ * Anyone
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LocaleResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/LocaleDetectBestLanguageResponseExample'
+ /api/v2/locales/public:
+ get:
+ operationId: ListAvailablePublicLocales
+ tags:
+ - Locales
+ summary: List Available Public Locales
+ description: |
+ Lists the translation locales that are available to all accounts.
+
+ #### Allowed For
+
+ * Anyone
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LocalesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/LocalesResponseExample'
+ /api/v2/macros:
+ get:
+ operationId: ListMacros
+ tags:
+ - Macros
+ summary: List Macros
+ description: |
+ Lists all shared and personal macros available to the current user. For admins, the API returns all macros for the account, including the personal macros of agents and other admins.
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/MacroInclude'
+ - $ref: '#/components/parameters/MacroAccess'
+ - $ref: '#/components/parameters/MacroActive'
+ - $ref: '#/components/parameters/MacroCategory'
+ - $ref: '#/components/parameters/MacroGroupId'
+ - $ref: '#/components/parameters/MacroOnlyViewable'
+ - $ref: '#/components/parameters/MacroSortBy'
+ - $ref: '#/components/parameters/MacroSortOrder'
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MacrosResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/MacrosResponseExample'
+ post:
+ operationId: CreateMacro
+ tags:
+ - Macros
+ summary: Create Macro
+ description: |
+ #### Allowed For
+ * Agents
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ macro:
+ $ref: '#/components/schemas/MacroInput'
+ examples:
+ default:
+ value:
+ macro:
+ actions:
+ - field: status
+ value: solved
+ title: Roger Wilco
+ responses:
+ "200":
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ macro:
+ $ref: '#/components/schemas/MacroObject'
+ examples:
+ default:
+ $ref: '#/components/examples/CreateMacroResponseExample'
+ /api/v2/macros/{macro_id}:
+ parameters:
+ - $ref: '#/components/parameters/MacroId'
+ get:
+ operationId: ShowMacro
+ tags:
+ - Macros
+ summary: Show Macro
+ description: |
+ #### Allowed For
+ * Agents
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MacroResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/MacroResponseExample'
+ put:
+ operationId: UpdateMacro
+ tags:
+ - Macros
+ summary: Update Macro
+ description: |
+ #### Allowed For
+ * Agents
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ macro:
+ $ref: '#/components/schemas/MacroInput'
+ examples:
+ default:
+ value:
+ macro:
+ actions:
+ - field: status
+ value: solved
+ title: Sets the ticket status to `solved`
+ responses:
+ "200":
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ macro:
+ $ref: '#/components/schemas/MacroObject'
+ examples:
+ default:
+ $ref: '#/components/examples/UpdateMacroResponseExample'
+ delete:
+ operationId: DeleteMacro
+ tags:
+ - Macros
+ summary: Delete Macro
+ description: |
+ #### Allowed For
+ * Agents, with restrictions applying on certain actions
+ responses:
+ "204":
+ description: No Content
+ /api/v2/macros/{macro_id}/apply:
+ parameters:
+ - $ref: '#/components/parameters/MacroId'
+ get:
+ operationId: ShowChangesToTicket
+ tags:
+ - Macros
+ summary: Show Changes to Ticket
+ description: |
+ Returns the changes the macro would make to a ticket. It doesn't actually
+ change a ticket. You can use the response data in a subsequent API call
+ to the [Tickets](/api-reference/ticketing/tickets/tickets/) endpoint to update the ticket.
+
+ The response includes only the ticket fields that would be changed by the
+ macro. To get the full ticket object after the macro is applied,
+ see [Show Ticket After Changes](#show-ticket-after-changes).
+
+ #### Allowed For
+ * Agents
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MacroApplyTicketResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/MacroChangesToTicketsResponseExample'
+ /api/v2/macros/{macro_id}/attachments:
+ parameters:
+ - $ref: '#/components/parameters/MacroId'
+ get:
+ operationId: ListMacroAttachments
+ tags:
+ - Macros
+ summary: List Macro Attachments
+ description: |
+ Lists the attachments associated with a macro.
+
+ #### Allowed For
+ * Agents
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MacroAttachmentsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/MacroAttachmentsResponseExample'
+ post:
+ operationId: CreateAssociatedMacroAttachment
+ tags:
+ - Macros
+ summary: Create Macro Attachment
+ description: |
+ Allows an attachment to be uploaded and associated with a macro at the same time.
+
+ **Note:** A macro can be associated with up to five attachments.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "201":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MacroAttachmentResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/MacroAttachmentResponseExample'
+ /api/v2/macros/actions:
+ get:
+ operationId: ListMacrosActions
+ tags:
+ - Macros
+ summary: List Supported Actions for Macros
+ description: |
+ #### Allowed For
+ * Agents
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ actions:
+ type: array
+ items:
+ type: object
+ additionalProperties: true
+ examples:
+ default:
+ $ref: '#/components/examples/MacroActionsResponseExample'
+ /api/v2/macros/active:
+ get:
+ operationId: ListActiveMacros
+ tags:
+ - Macros
+ summary: List Active Macros
+ description: |
+ Lists all active shared and personal macros available to the current user.
+
+ #### Allowed For
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/MacroInclude'
+ - $ref: '#/components/parameters/MacroAccess'
+ - $ref: '#/components/parameters/MacroCategory'
+ - $ref: '#/components/parameters/MacroGroupId'
+ - $ref: '#/components/parameters/MacroSortBy'
+ - $ref: '#/components/parameters/MacroSortOrder'
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MacrosResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/MacrosResponseExample'
+ /api/v2/macros/attachments:
+ post:
+ operationId: CreateMacroAttachment
+ tags:
+ - Macros
+ summary: Create Unassociated Macro Attachment
+ description: |
+ Allows an attachment to be uploaded that can be associated with a macro at a later time.
+
+ **Note:** To ensure an uploaded attachment is not lost, associate it with a macro as soon as possible. From time to time, old attachments that are not not associated with any macro are purged.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "201":
+ description: Created Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MacroAttachmentResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/MacroAttachmentResponseExample'
+ /api/v2/macros/attachments/{attachment_id}:
+ parameters:
+ - $ref: '#/components/parameters/AttachmentId'
+ get:
+ operationId: ShowMacroAttachment
+ tags:
+ - Macros
+ summary: Show Macro Attachment
+ description: |
+ Shows the properties of the specified macro attachment.
+
+ #### Allowed For
+ * Agents
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MacroAttachmentResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/MacroAttachmentResponseExample'
+ /api/v2/macros/categories:
+ get:
+ operationId: ListMacroCategories
+ tags:
+ - Macros
+ summary: List Macro Categories
+ description: |
+ Lists all macro categories available to the current user.
+
+ #### Allowed For
+ * Agents
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MacroCategoriesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/MacroCategoriesResponseExample'
+ /api/v2/macros/definitions:
+ get:
+ operationId: ListMacroActionDefinitions
+ tags:
+ - Macros
+ summary: List Macro Action Definitions
+ description: |
+ Returns the definitions of the actions a macro can perform. For example,
+ one action can set the status of a ticket. The definition of the action
+ includes a title ("Status"), a type ("list"), and possible values. For a
+ list of support actions, see [Actions reference](/documentation/ticketing/reference-guides/actions-reference).
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ definitions:
+ type: object
+ properties:
+ actions:
+ type: array
+ items:
+ type: object
+ additionalProperties: true
+ examples:
+ default:
+ $ref: '#/components/examples/ShowDerivedMacroResponseExample'
+ /api/v2/macros/destroy_many:
+ delete:
+ operationId: DeleteManyMacros
+ tags:
+ - Macros
+ summary: Bulk Delete Macros
+ description: |
+ Deletes the macros corresponding to the provided comma-separated list of IDs.
+
+ #### Allowed For
+ * Agents
+ parameters:
+ - name: ids
+ in: query
+ description: The IDs of the macros to delete
+ required: true
+ schema:
+ type: array
+ items:
+ type: integer
+ example:
+ - 1
+ - 2
+ - 3
+ responses:
+ "204":
+ description: No Content
+ /api/v2/macros/new:
+ parameters:
+ - $ref: '#/components/parameters/MacroIdQuery'
+ - name: ticket_id
+ in: query
+ description: The ID of the ticket from which to build a macro replica
+ required: true
+ schema:
+ type: integer
+ example: 35436
+ get:
+ operationId: ShowDerivedMacro
+ tags:
+ - Macros
+ summary: Show Macro Replica
+ description: |
+ Returns an unpersisted macro representation derived from a ticket or macro.
+
+ The endpoint takes one of the following query parameters: `macro_id` or `ticket_id`. If you include both, `macro_id` is used.
+
+ #### Allowed For
+ * Agents
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MacroResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/MacroResponseExample'
+ /api/v2/macros/search:
+ parameters:
+ - $ref: '#/components/parameters/MacroInclude'
+ - $ref: '#/components/parameters/MacroAccess'
+ - $ref: '#/components/parameters/MacroActive'
+ - $ref: '#/components/parameters/MacroCategory'
+ - $ref: '#/components/parameters/MacroGroupId'
+ - $ref: '#/components/parameters/MacroOnlyViewable'
+ - $ref: '#/components/parameters/MacroSearchSortBy'
+ - $ref: '#/components/parameters/MacroSortOrder'
+ - $ref: '#/components/parameters/MacroQuery'
+ get:
+ operationId: SearchMacro
+ tags:
+ - Macros
+ summary: Search Macros
+ description: |
+ #### Pagination
+
+ * Offset pagination only
+
+ See [Using Offset Pagination](/api-reference/introduction/pagination/#using-offset-pagination).
+
+ #### Allowed For
+ * Agents
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MacrosResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/MacrosResponseExample'
+ /api/v2/macros/update_many:
+ put:
+ operationId: UpdateManyMacros
+ tags:
+ - Macros
+ summary: Update Many Macros
+ description: |
+ Updates the provided macros with the specified changes.
+
+ #### Allowed For
+ * Agents
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MacroUpdateManyInput'
+ examples:
+ default:
+ value:
+ macros:
+ - active: false
+ id: 25
+ - id: 23
+ position: 5
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MacrosResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/MacrosResponseExample'
+ /api/v2/oauth/clients:
+ get:
+ operationId: ListOAuthClients
+ tags:
+ - OAuth Clients
+ summary: List Clients
+ description: |
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/CursorPaginationPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OAuthClientsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OAuthClientsResponseExample'
+ post:
+ operationId: CreateOAuthClient
+ tags:
+ - OAuth Clients
+ summary: Create Client
+ description: |
+ #### Allowed For
+
+ * Admins
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OauthClientResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OAuthClientResponseExample'
+ /api/v2/oauth/clients/{oauth_client_id}:
+ parameters:
+ - $ref: '#/components/parameters/OAuthClientId'
+ get:
+ operationId: ShowClient
+ tags:
+ - OAuth Clients
+ summary: Show Client
+ description: |
+ #### Allowed for
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OauthClientResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OAuthClientResponseExample'
+ put:
+ operationId: UpdateClient
+ tags:
+ - OAuth Clients
+ summary: Update Client
+ description: |
+ #### Allowed for
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OauthClientResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OAuthClientUpdateResponseExample'
+ delete:
+ operationId: DeleteClient
+ tags:
+ - OAuth Clients
+ summary: Delete Client
+ description: |
+ #### Allowed for
+ * Admins
+ responses:
+ "204":
+ description: No content response
+ /api/v2/oauth/clients/{oauth_client_id}/generate_secret:
+ parameters:
+ - $ref: '#/components/parameters/OAuthClientId'
+ put:
+ operationId: ClientGenerateSecret
+ tags:
+ - OAuth Clients
+ summary: Generate Secret
+ description: |
+ #### Allowed for
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OauthClientResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OAuthClientResponseExample'
+ /api/v2/oauth/global_clients:
+ get:
+ operationId: ListGlobalOAuthClients
+ tags:
+ - Global Clients
+ summary: List Global OAuth Clients
+ description: |
+ Returns all the global OAuth clients that users on your account have authorized.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/CursorPaginationPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GlobalClientsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GlobalClientsResponseExample'
+ /api/v2/oauth/global_clients/{global_client_id}:
+ parameters:
+ - $ref: '#/components/parameters/GlobalClientId'
+ get:
+ operationId: ShowGlobalClient
+ tags:
+ - Global Clients
+ summary: Show Global OAuth Client
+ description: |
+ Returns the global OAuth client associated with the ID sent on the request.
+
+ #### Allowed for
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GlobalClientResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GlobalClientResponseExample'
+ /api/v2/oauth/global_clients/token_summary:
+ parameters:
+ - $ref: '#/components/parameters/OAuthGlobalClientIdQuery'
+ - $ref: '#/components/parameters/GlobalClientTokenSummaryIncludeExpiredTokensQuery'
+ get:
+ operationId: GlobalOAuthClientsTokenSummary
+ tags:
+ - Global Clients
+ summary: Show Token summary for Global OAuth Clients
+ description: |
+ Returns information about tokens for the global clients that your account has authorized.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GlobalClientsTokenSummaryResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GlobalClientsTokenSummaryResponseExample'
+ /api/v2/oauth/tokens:
+ parameters:
+ - $ref: '#/components/parameters/OAuthClientIdQuery'
+ - $ref: '#/components/parameters/OAuthGlobalClientIdQuery'
+ - $ref: '#/components/parameters/OAuthAllTokensQuery'
+ get:
+ operationId: ListOAuthTokens
+ tags:
+ - OAuth Tokens
+ summary: List Tokens
+ description: |
+ Returns the properties of the tokens for the current user. Admins can view OAuth token properties for all users using the [all](/api-reference/ticketing/oauth/oauth_tokens/#parameters) parameter. To filter the list by OAuth client, use the [client_id](/api-reference/ticketing/oauth/oauth_tokens/#parameters) parameter for a local OAuth client ID, or the [global_client_id](/api-reference/ticketing/oauth/oauth_tokens/#parameters) parameter for a global OAuth client ID. For security reasons, only the first 10 characters of each access token are included.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/CursorPaginationPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OAuthTokensResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OAuthTokensResponseExample'
+ post:
+ operationId: CreateOAuthToken
+ tags:
+ - OAuth Tokens
+ summary: Create Token
+ description: |
+ Returns an OAuth access token with a specified [scope](#scopes).
+
+ Refresh tokens aren't used. An access token doesn't expire but it can be [revoked](#revoke-token).
+
+ For a tutorial, see [Creating and using OAuth tokens with the API](/documentation/ticketing/working-with-oauth/creating-and-using-oauth-tokens-with-the-api/).
+
+ **Note**: For OAuth authorization code, use the [Create Token for Grant Type](/api-reference/ticketing/oauth/grant_type_tokens/#create-token-for-grant-type) endpoint.
+ The two APIs don't share the same path, JSON format, or request parameters. However, both APIs return access tokens that can be used to [authenticate API requests](/api-reference/ticketing/introduction/#oauth-access-token).
+
+ #### Allowed For
+
+ * Admins
+
+ #### Request parameters
+
+ The POST request takes a "token" object that contains an OAuth client's resource id and scopes.
+
+ | Name | Type | Description
+ | --------- | ------- | --------------------------------------------------
+ | client_id | integer | The resource `id` of an [OAuth client](/api-reference/ticketing/oauth/oauth_clients/#json-format) (not the client's unique identifier). For the ids, see [List Clients](/api-reference/ticketing/oauth/oauth_clients/#list-clients)
+ | scopes | array | Valid scopes for the token. See [Scopes](#scopes) below
+
+ #### Scopes
+
+ The **scopes** parameter defines whether requests authenticated with the token can
+ post, put, and delete data, or only get data.
+
+ **Note**: Don't confuse the **scopes** parameter (plural) with the **scope** parameter (singular)
+ for [grant-type tokens](/api-reference/ticketing/oauth/grant_type_tokens/).
+
+ The **scopes** parameter is an array of strings, each specifying a resource name and
+ an access setting. Access is either "read" or "write". If you don't specify a resource,
+ access to all resources is assumed. If you don't specify the access, read and write
+ access are assumed.
+
+ The syntax is as follows:
+
+ `"scopes": [resource:scope, ...]`
+
+ where `resource` is optional.
+
+ **Examples**
+
+ `"scopes": ["read"]`
+
+ `"scopes": ["tickets:read"]`
+
+ To give read and write access to a resource, specify both scopes:
+
+ `"scopes": ["users:read", "users:write"]`
+
+ To give write access only to one resource and read access to everything
+ else:
+
+ `"scopes": ["organizations:write", "read"]`
+
+ **Note**: The endpoint returns an access token even if you specify an
+ invalid scope. Any request you make with the token will return
+ a "Forbidden" error.
+
+ **Available scopes**
+
+ * `read` - gives access to GET endpoints. Includes
+ permission to sideload related resources
+ * `write` - gives access to POST, PUT, and DELETE endpoints
+ * `impersonate` - allows Zendesk Support admins to make requests on behalf of
+ end users. See [Making API requests on behalf of end users](/documentation/ticketing/using-the-zendesk-api/making-api-requests-on-behalf-of-end-users/)
+
+ **Resources that can be scoped**
+
+ * tickets
+ * users
+ * auditlogs (read only)
+ * organizations
+ * hc
+ * apps
+ * triggers
+ * automations
+ * targets
+ * webhooks
+ * macros
+ * requests
+ * satisfaction_ratings
+ * dynamic_content
+ * any_channel (write only)
+ * web_widget (write only)
+ * security (read only)
+ * unrestricted (read and write)
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OAuthTokenResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OAuthTokenResponseExample'
+ /api/v2/oauth/tokens/{oauth_token_id}:
+ parameters:
+ - $ref: '#/components/parameters/OAuthTokenId'
+ get:
+ operationId: ShowToken
+ tags:
+ - OAuth Tokens
+ summary: Show Token
+ description: |
+ Returns the properties of the specified token. For security reasons, only the first 10 characters of the access token are included.
+
+ In the first endpoint, `id` is a token id, not the full token.
+
+ In the second endpoint, include an `Authorization: Bearer` header with the full token to get its associated properties. Example:
+
+ ```sh
+ curl https://{subdomain}.zendesk.com/api/v2/oauth/tokens/current \
+ -H 'Authorization: Bearer ${authToken}' \
+ -v -u {email_address}/token:{api_token}
+ ```
+
+ #### Allowed for
+
+ * Admins, Agents, End Users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OAuthTokenResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OAuthTokenResponseExample'
+ delete:
+ operationId: RevokeOAuthToken
+ tags:
+ - OAuth Tokens
+ summary: Revoke Token
+ description: |
+ #### Allowed for
+ * Admins, Agents, End Users
+ responses:
+ "204":
+ description: No content response
+ /api/v2/oauth/tokens/current:
+ get:
+ operationId: ShowCurrentToken
+ tags:
+ - OAuth Tokens
+ summary: Show Current Token
+ description: |
+ Returns the properties of the current token. Include an `Authorization: Bearer` header with the full token to get its associated properties.
+
+ For security reasons, only the first 10 characters of the access token are included.
+
+ #### Allowed for
+
+ * Admins, Agents, End Users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OAuthTokenResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OAuthTokenResponseExample'
+ delete:
+ operationId: RevokeCurrentOAuthToken
+ tags:
+ - OAuth Tokens
+ summary: Revoke Current Token
+ description: |
+ Revokes the current OAuth token. Include an `Authorization: Bearer` header with the full token.
+
+ #### Allowed for
+
+ * Admins, Agents, End Users
+ responses:
+ "204":
+ description: No content response
+ /api/v2/organization_fields:
+ get:
+ operationId: ListOrganizationFields
+ tags:
+ - Organization Fields
+ summary: List Organization Fields
+ description: |
+ Returns a list of custom organization fields in your account. Fields are returned in the order that you specify in your organization fields configuration in Zendesk Support. Clients should cache this resource for the duration of their API usage and map the key for each organization field to the values returned under the `organization_fields` attribute on the [organization](/api-reference/ticketing/organizations/organizations/) resource.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/CursorPaginationPage'
+ - name: resolve_dc
+ in: query
+ description: If true, resolves dynamic content placeholders.
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationFieldsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationFieldsResponseExample'
+ post:
+ operationId: CreateOrganizationField
+ tags:
+ - Organization Fields
+ summary: Create Organization Field
+ description: |
+ Creates any of the following custom field types:
+
+ * text (default when no "type" is specified)
+ * textarea
+ * checkbox
+ * date
+ * integer
+ * decimal
+ * regexp
+ * dropdown
+ * lookup
+ * multiselect
+
+ See [About custom field types](https://support.zendesk.com/hc/en-us/articles/203661866) in Zendesk help.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationFieldResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationFieldCreateResponseExample'
+ /api/v2/organization_fields/{organization_field_id}:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationFieldId'
+ get:
+ operationId: ShowOrganizationField
+ tags:
+ - Organization Fields
+ summary: Show Organization Field
+ description: |
+ #### Allowed for
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationFieldResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationFieldResponseExample'
+ put:
+ operationId: UpdateOrganizationField
+ tags:
+ - Organization Fields
+ summary: Update Organization Field
+ description: |
+ #### Updating a Dropdown (Tagger) or Multiselect Field
+
+ Dropdown and multiselect fields return an array of `custom_field_options` which specify the name, value, and order of dropdown or multiselect options. When updating a dropdown or multiselect field, note the following information:
+
+ - All options must be passed on update. Options that are not passed will be removed. As a result, these values will be removed from any organizations
+ - To create a new option, pass a null `id` along with the `name` and `value`
+ - To update an existing option, pass its `id` along with the `name` and `value`
+ - To reorder an option, reposition it in the `custom_field_options` array relative to the other options
+ - To remove an option, omit it from the list of options upon update
+
+ #### Example Request
+
+ ```bash
+ curl https://{subdomain}.zendesk.com/api/v2/organization_fields/{organization_field_id} \
+ -H "Content-Type: application/json" -X PUT \
+ -d '{"organization_field": {"custom_field_options": [{"id": 124, "name": "Option 2", "value": "option_2"}, {"id": 123, "name": "Option 1", "value": "option_1"}, {"id": 125, "name": "Option 3", "value": "option_3"}]}}' \
+ -v -u {email_address}/token:{api_token}
+ ```
+ #### Allowed for
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationFieldResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationFieldUpdateResponseExample'
+ delete:
+ operationId: DeleteOrganizationField
+ tags:
+ - Organization Fields
+ summary: Delete Organization Field
+ description: |
+ #### Allowed for
+
+ * Admins
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/organization_fields/reorder:
+ put:
+ operationId: ReorderOrganizationField
+ tags:
+ - Organization Fields
+ summary: Reorder Organization Field
+ description: |
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/organization_memberships:
+ get:
+ operationId: ListOrganizationMemberships
+ tags:
+ - Organization Memberships
+ summary: List Memberships
+ description: |
+ Returns a list of organization memberships for the account, user or organization in question.
+
+ **Note**: When returning organization memberships for a user, organization memberships are sorted with the default organization first, and then by organization name.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ - Agents
+ - End users
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ - $ref: '#/components/parameters/OrganizationMembershipsInclude'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationMembershipsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationMembershipsResponseExample'
+ post:
+ operationId: CreateOrganizationMembership
+ tags:
+ - Organization Memberships
+ summary: Create Membership
+ description: |
+ Assigns a user to a given organization. Returns an error with status 422 if the user is already assigned to the organization.
+
+ #### Allowed For
+
+ * Admins
+ * Agents when creating a new organization membership for an end user
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationMembershipResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationMembershipCreateResponseExample'
+ /api/v2/organization_memberships/{organization_membership_id}:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationMembershipId'
+ get:
+ operationId: ShowOrganizationMembershipById
+ tags:
+ - Organization Memberships
+ summary: Show Membership
+ description: |
+ #### Allowed for
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationMembershipResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationMembershipResponseExample'
+ delete:
+ operationId: DeleteOrganizationMembership
+ tags:
+ - Organization Memberships
+ summary: Delete Membership
+ description: |
+ Immediately removes a user from an organization and schedules a job to unassign all working tickets currently assigned to the user and organization combination. The `organization_id` of the unassigned tickets is set to null.
+
+ #### Allowed for
+
+ * Admins
+ * Agents when deleting an organization membership for an end user
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/organization_memberships/create_many:
+ post:
+ operationId: CreateManyOrganizationMemberships
+ tags:
+ - Organization Memberships
+ summary: Create Many Memberships
+ description: |
+ Accepts an array of up to 100 organization membership objects.
+
+ This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
+
+ #### Allowed For
+ * Admins
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationMembershipCreateManyResponseExample'
+ /api/v2/organization_memberships/destroy_many:
+ delete:
+ operationId: DeleteManyOrganizationMemberships
+ tags:
+ - Organization Memberships
+ summary: Bulk Delete Memberships
+ description: |
+ Immediately removes a user from an organization and schedules a job to unassign all working tickets currently assigned to the user and organization combination. The `organization_id` of the unassigned tickets is set to null.
+
+ #### Response
+
+ This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - name: ids
+ in: query
+ description: The IDs of the organization memberships to delete
+ schema:
+ type: array
+ items:
+ type: integer
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusBulkDeleteResponseExample'
+ /api/v2/organization_merges/{organization_merge_id}:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationMergeId'
+ get:
+ operationId: ShowOrganizationMerge
+ tags:
+ - Organizations
+ summary: Show Organization Merge
+ description: |
+ Retrieves the details of a specific organization merge operation. This endpoint is useful for obtaining the status and outcome of a merge that was previously initiated. It provides information such as the winning and losing organization IDs, the status of the merge, and the associated URLs.
+
+ This endpoint can be used to determine if a merge is still in progress, has completed successfully, or has encountered an error.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationMergeResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationMergeResponseExample'
+ /api/v2/organization_subscriptions:
+ get:
+ operationId: ListOrganizationSubscriptions
+ tags:
+ - Organization Subscriptions
+ summary: List Organization Subscriptions
+ description: |-
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For:
+
+ * Agents
+ * End users
+
+ For end users, the response will only list the subscriptions created by the requesting end user.
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationSubscriptionsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationSubscriptionsResponseExample'
+ post:
+ operationId: CreateOrganizationSubscription
+ tags:
+ - Organization Subscriptions
+ summary: Create Organization Subscription
+ description: |-
+ #### Allowed For:
+
+ * Agents
+ * End users
+
+ End users can only subscribe to shared organizations in which they're members.
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationSubscriptionCreateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationSubscriptionCreateRequestExample'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationSubscriptionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationSubscriptionResponseExample'
+ /api/v2/organization_subscriptions/{organization_subscription_id}:
+ get:
+ operationId: ShowOrganizationSubscription
+ tags:
+ - Organization Subscriptions
+ summary: Show Organization Subscription
+ description: |-
+ #### Allowed For:
+
+ * Agents
+ * End users
+
+ For end users, the response will only list the subscriptions created by the requesting end user.
+ parameters:
+ - $ref: '#/components/parameters/OrganizationSubscriptionId'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationSubscriptionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationSubscriptionResponseExample'
+ delete:
+ operationId: DeleteOrganizationSubscription
+ tags:
+ - Organization Subscriptions
+ summary: Delete Organization Subscription
+ description: |-
+ #### Allowed For:
+
+ * Agents
+ * End users
+ parameters:
+ - $ref: '#/components/parameters/OrganizationSubscriptionId'
+ responses:
+ "204":
+ description: No content
+ /api/v2/organizations:
+ get:
+ operationId: ListOrganizations
+ tags:
+ - Organizations
+ summary: List Organizations
+ description: |
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Agents, with certain restrictions
+
+ If the agent has a custom agent role that restricts their access to only users in their own organization, a 403 Forbidden error is returned. See [Creating custom agent roles](https://support.zendesk.com/hc/en-us/articles/203662026-Creating-custom-roles-and-assigning-agents#topic_cxn_hig_bd) in Zendesk help.
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ - $ref: '#/components/parameters/IncludeBoundaryIndicators'
+ - $ref: '#/components/parameters/IncludeItemCursors'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationsResponseExample'
+ post:
+ operationId: CreateOrganization
+ tags:
+ - Organizations
+ summary: Create Organization
+ description: |
+ You must provide a unique `name` for each organization. Normally
+ the system doesn't allow records to be created with identical names.
+ However, a race condition can occur if you make two or more identical
+ POSTs very close to each other, causing the records to have identical
+ organization names.
+
+ **Note**: Leading and trailing whitespace in `name` is automatically trimmed before validation. This means that names differing only by whitespace are treated as duplicates. For example, "API Company" and "API Company " are considered the same name.
+
+ #### Allowed For
+
+ * Admins
+ * Agents assigned to a custom role with permissions to manage organizations (Enterprise only)
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateOrganizationRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/CreateOrganizationRequestExample'
+ responses:
+ "201":
+ description: Created
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CreatedOrganizationResponseExample'
+ /api/v2/organizations/{organization_id}:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationId'
+ get:
+ operationId: ShowOrganization
+ tags:
+ - Organizations
+ summary: Show Organization
+ description: |
+ #### Allowed For
+
+ * Admins
+ * Agents
+ parameters:
+ - name: include
+ in: query
+ description: |
+ Include additional related data. Supported values: `lookup_relationship_fields`.
+ schema:
+ type: string
+ - $ref: '#/components/parameters/IncludeBoundaryIndicators'
+ - $ref: '#/components/parameters/IncludeItemCursors'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationResponseExample'
+ put:
+ operationId: UpdateOrganization
+ tags:
+ - Organizations
+ summary: Update Organization
+ description: |
+ #### Allowed For
+
+ * Admins
+ * Agents
+
+ Agents with no permissions restrictions can only update "notes" on organizations.
+
+ **Note:** Updating an organization's `domain_names` property overwrites all existing `domain_names` values. To prevent this, submit a complete list of `domain_names` for the organization in your request.
+
+ #### Example Request
+
+ ```js
+ {
+ "organization": {
+ "notes": "Something interesting"
+ }
+ }
+ ```
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UpdateOrganizationResponseExample'
+ "429":
+ description: Too Many Requests
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Errors'
+ examples:
+ default:
+ value:
+ errors:
+ - code: TooManyRequests
+ title: Too many requests to update
+ delete:
+ operationId: DeleteOrganization
+ tags:
+ - Organizations
+ summary: Delete Organization
+ description: |
+ #### Allowed For
+
+ * Admins
+ * Agents assigned to a custom role with permissions to manage organizations (Enterprise only)
+ responses:
+ "204":
+ description: No Content Response
+ /api/v2/organizations/{organization_id}/merge:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationId'
+ post:
+ operationId: CreateOrganizationMerge
+ tags:
+ - Organizations
+ summary: Merge Organization With Another Organization
+ description: "Merges two organizations by moving all users, tickets, and domain names from the organization specified by `{organization_id}` to the organization specified by `winner_id`. After the merge:\n\n- The \"losing\" organization will be deleted.\n- Other organization fields and their values will not be carried over to the \"winning\" organization.\n- The merge operation creates an `Organization Merge` record which contains a status indicating the progress of the merge.\n\n**Note**: This operation is irreversible.\n\n#### Merge Statuses\n\n| Status | Description |\n|--------|-------------|\n| new | A job has been queued to merge the two organizations. |\n| in progress | The job to merge the two organizations has started. |\n| error | An error occurred during the merge job. The merge can be retried by repeating the API call. | \n| complete | The merge has been completed successfully. |\n\n#### Allowed For\n\n* Admins\n"
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationMergeRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationMergeRequestExample'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationMergeResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationMergeResponseExample'
+ /api/v2/organizations/{organization_id}/merges:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationId'
+ get:
+ operationId: ListOrganizationMerges
+ tags:
+ - Organizations
+ summary: List Organization Merges
+ description: |
+ Retrieves a list of all organization merge operations associated with a given organization. This endpoint allows you to track the history of merge actions for an organization, including ongoing and completed merges.
+
+ Each entry in the list contains details such as the ID of the merge, the winning and losing organization IDs, the current status of the merge, and a URL to access the `Organization Merge` record.
+
+ #### Pagination
+
+ - Cursor pagination is used for this endpoint.
+ - A maximum of 100 records can be returned per page.
+
+ See [Pagination](/api-reference/introduction/pagination/) for more details.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationMergeListResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationMergeListResponseExample'
+ /api/v2/organizations/{organization_id}/organization_memberships:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationId'
+ get:
+ operationId: ListOrganizationMembershipsByOrganization
+ tags:
+ - Organization Memberships
+ summary: List Organization Memberships by Organization
+ description: |
+ Returns a list of organization memberships for the account, user or organization in question.
+
+ **Note**: When returning organization memberships for a user, organization memberships are sorted with the default organization first, and then by organization name.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ - Agents
+ - End users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationMembershipsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationMembershipsResponseExample'
+ /api/v2/organizations/{organization_id}/related:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationId'
+ get:
+ operationId: OrganizationRelated
+ tags:
+ - Organizations
+ summary: Show Organization's Related Information
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationsRelatedResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationsRelatedResponse'
+ /api/v2/organizations/{organization_id}/requests:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationId'
+ get:
+ operationId: ListOrganizationRequests
+ tags:
+ - Requests
+ summary: List Organization Requests
+ description: |
+ Returns a list of requests for a specific organization.
+
+ #### Allowed for
+
+ * End Users
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+ parameters:
+ - name: sort_by
+ in: query
+ description: Possible values are "updated_at", "created_at"
+ schema:
+ type: string
+ - name: sort_order
+ in: query
+ description: One of "asc", "desc". Defaults to "asc"
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RequestsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RequestsResponseExample'
+ /api/v2/organizations/{organization_id}/subscriptions:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationId'
+ get:
+ operationId: ListOrganizationSubscriptionsByOrganization
+ tags:
+ - Organization Subscriptions
+ - Organizations
+ summary: List Subscriptions By Organization
+ description: |-
+ Returns a list of organization subscriptions for a specific organization.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For:
+
+ * Agents
+ * End users
+
+ For end users, the response will only list the subscriptions created by the requesting end user.
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationSubscriptionsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationSubscriptionsResponseExample'
+ /api/v2/organizations/{organization_id}/tags:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationId'
+ get:
+ operationId: ListOrganizationTags
+ tags:
+ - Tags
+ summary: List Organization Tags
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TagsByObjectIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TagsByObjectIdResponse'
+ post:
+ operationId: SetOrganizationTags
+ tags:
+ - Tags
+ summary: Set Organization Tags
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TagsByObjectIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TagsByObjectIdResponse'
+ put:
+ operationId: AddOrganizationTags
+ tags:
+ - Tags
+ summary: Add Organization Tags
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TagsByObjectIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TagsByObjectIdResponse'
+ delete:
+ operationId: RemoveOrganizationTags
+ tags:
+ - Tags
+ summary: Remove Organization Tags
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TagsByObjectIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TagsRemoveResponseExample'
+ /api/v2/organizations/{organization_id}/tickets:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationId'
+ get:
+ operationId: ListOrganizationTickets
+ tags:
+ - Tickets
+ summary: List Organization Tickets
+ description: |
+ Returns a list of tickets for a specific organization.
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: List tickets
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketsResponseExample'
+ /api/v2/organizations/{organization_id}/tickets/count:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationId'
+ get:
+ operationId: CountOrganizationTickets
+ tags:
+ - Tickets
+ summary: Count Organization Tickets
+ description: |
+ Returns an approximate count of tickets for a specific organization. If the count exceeds 100,000, it is updated 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
+ responses:
+ "200":
+ description: Count of tickets
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ count:
+ type: object
+ properties:
+ refreshed_at:
+ type: string
+ format: date-time
+ value:
+ type: integer
+ examples:
+ default:
+ value:
+ count:
+ refreshed_at: "2020-04-06T02:18:17Z"
+ value: 102
+ /api/v2/organizations/{organization_id}/users:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationId'
+ get:
+ operationId: ListOrganizationUsers
+ tags:
+ - Users
+ summary: List Organization Users
+ description: |
+ Returns a list of users for a specific organization.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Admins, Agents and Light Agents
+ parameters:
+ - $ref: '#/components/parameters/UserRoleFilter'
+ - $ref: '#/components/parameters/UserRolesFilter'
+ - $ref: '#/components/parameters/UserPermissionSetFilter'
+ - $ref: '#/components/parameters/UserExternalIdFilter'
+ - $ref: '#/components/parameters/OrganizationUserSortBy'
+ - $ref: '#/components/parameters/OrganizationUserSortOrder'
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UsersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UsersResponseExample'
+ /api/v2/organizations/{organization_id}/users/count:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationId'
+ get:
+ operationId: CountOrganizationUsers
+ tags:
+ - Users
+ summary: Count Organization Users
+ description: |
+ Returns an approximate count of users for a specific organization. If the count exceeds 100,000, it is updated every 24 hours.
+
+ The response includes a `refreshed_at` property in a `count` object that contains a timestamp indicating when the count was last updated.
+
+ **Note**: When the count exceeds 100,000, the `refreshed_at` property may occasionally be null.
+ This indicates that the count is being updated in the background. The `count` object's `value` property is limited to 100,000 until the update is complete.
+
+ #### Allowed For
+
+ * Admins, Agents and Light Agents
+ parameters:
+ - $ref: '#/components/parameters/UserRoleFilter'
+ - $ref: '#/components/parameters/UserRolesFilter'
+ - $ref: '#/components/parameters/UserPermissionSetFilter'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CountResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserCountResponseExample'
+ /api/v2/organizations/autocomplete:
+ get:
+ operationId: AutocompleteOrganizations
+ tags:
+ - Organizations
+ summary: Autocomplete Organizations
+ description: |
+ Returns an array of organizations whose name starts with the
+ value specified in the `name` parameter.
+
+ #### Pagination
+
+ * Offset pagination only
+
+ See [Using Offset Pagination](/api-reference/introduction/pagination/#using-offset-pagination).
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/OrganizationQueryFragment'
+ - $ref: '#/components/parameters/LookupRelationshipAutocompleteFieldIdFragment'
+ - $ref: '#/components/parameters/LookupRelationshipAutocompleteSourceFragment'
+ - $ref: '#/components/parameters/IncludeBoundaryIndicators'
+ - $ref: '#/components/parameters/IncludeItemCursors'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/AutocompleteOrganizationsResponseExample'
+ "400":
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Errors'
+ examples:
+ default:
+ value:
+ errors:
+ - code: QueryError
+ title: Invalid type:sample_type
+ "429":
+ description: Too Many Requests
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Errors'
+ examples:
+ default:
+ value:
+ errors:
+ - code: TooManyRequests
+ title: Too many requests to autocomplete
+ /api/v2/organizations/count:
+ get:
+ operationId: CountOrganizations
+ tags:
+ - Organizations
+ summary: Count Organizations
+ description: |
+ Returns an approximate count of organizations. If the count exceeds
+ 100,000, it is updated every 24 hours.
+
+ The `refreshed_at` property of the `count` object is a timestamp that indicates
+ when the count was last updated.
+
+ When the count exceeds 100,000, the `refreshed_at` property may
+ occasionally be null. This indicates that the count is being
+ updated in the background and the `value` property of the `count` object is limited to
+ 100,000 until the update is complete.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/IncludeBoundaryIndicators'
+ - $ref: '#/components/parameters/IncludeItemCursors'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CountOrganizationResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CountOrganizationsResponseExample'
+ /api/v2/organizations/create_many:
+ post:
+ operationId: CreateManyOrganizations
+ tags:
+ - Organizations
+ summary: Create Many Organizations
+ description: |
+ Accepts an array of up to 100 organization objects.
+
+ #### Response
+
+ This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
+
+ #### Allowed For
+
+ * Agents, with restrictions applying on certain actions
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ShowJobStatusResponseExample'
+ /api/v2/organizations/create_or_update:
+ post:
+ operationId: CreateOrUpdateOrganization
+ tags:
+ - Organizations
+ summary: Create Or Update Organization
+ description: |
+ Creates an organization if it doesn't already exist, or updates
+ an existing organization. Using this method means one less call
+ to check if an organization exists before creating it. You need
+ to specify the id or external id when updating
+ an organization to avoid a duplicate error response. Name is
+ not available as a matching criteria.
+
+ #### Allowed For
+
+ * Agents, with restrictions on certain actions
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CreatedOrganizationResponseExample'
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CreatedOrganizationResponseExample'
+ /api/v2/organizations/destroy_many:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationIds'
+ - $ref: '#/components/parameters/OrganizationExternalIds'
+ delete:
+ operationId: DeleteManyOrganizations
+ tags:
+ - Organizations
+ summary: Bulk Delete Organizations
+ description: |
+ Accepts a comma-separated list of up to 100 organization ids or external ids.
+
+ #### Response
+
+ This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
+
+ #### Allowed For
+
+ * Admins
+ * Agents assigned to a custom role with permissions to manage organizations (Enterprise only)
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusBulkDeleteResponseExample'
+ /api/v2/organizations/search:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationExternalId'
+ - $ref: '#/components/parameters/OrganizationName'
+ get:
+ operationId: SearchOrganizations
+ tags:
+ - Organizations
+ summary: Search Organizations
+ description: |
+ Returns an array of organizations matching the criteria. You may search by an organization's `external_id` or `name`, but not both:
+
+ #### Searching by `external_id`
+
+ If you set the `external_id` value of an organization to associate it to an external record, you can use it to search for the organization.
+
+ For an organization to be returned, its `external_id` must exactly match the value provided (case insensitive).
+
+ #### Searching by `name`
+
+ For an organization to be returned, its `name` must exactly match the value provided (case insensitive).
+
+ #### Allowed For:
+
+ * Admins
+ * Agents assigned to a custom role with permissions to add or modify organizations (Enterprise only)
+
+ See [Creating custom agent roles](https://support.zendesk.com/hc/en-us/articles/203662026#topic_cxn_hig_bd) in the Support Help Center.
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationsResponseExample'
+ /api/v2/organizations/show_many:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationIds'
+ - $ref: '#/components/parameters/OrganizationExternalIds'
+ get:
+ operationId: ShowManyOrganizations
+ tags:
+ - Organizations
+ summary: Show Many Organizations
+ description: |
+ Accepts a comma-separated list of up to 100 organization ids or external ids.
+
+ #### Allowed For
+
+ * Admins
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/AutocompleteOrganizationsResponseExample'
+ /api/v2/organizations/update_many:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationIds'
+ - $ref: '#/components/parameters/OrganizationExternalIds'
+ put:
+ operationId: UpdateManyOrganizations
+ tags:
+ - Organizations
+ summary: Update Many Organizations
+ description: |
+ Bulk or batch updates up to 100 organizations.
+
+ #### Bulk update
+
+ To make the same change to multiple organizations, use the following endpoint and data format:
+
+ `https://{subdomain}.zendesk.com/api/v2/organizations/update_many?ids=1,2,3`
+
+ ```js
+ {
+ "organization": {
+ "notes": "Priority"
+ }
+ }
+ ```
+
+ #### Batch update
+
+ To make different changes to multiple organizations, use the following endpoint and data format:
+
+ `https://{subdomain}.zendesk.com/api/v2/organizations/update_many`
+
+ ```js
+ {
+ "organizations": [
+ { "id": 1, "notes": "Priority" },
+ { "id": 2, "notes": "Normal" }
+ ]
+ }
+ ```
+
+ #### Response
+
+ This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
+
+ #### Allowed For
+
+ * Admins
+ * Agents
+
+ Agents with no permissions restrictions can only update "notes" on organizations.
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ShowJobStatusResponseExample'
+ /api/v2/problems:
+ get:
+ operationId: ListTicketProblems
+ tags:
+ - Tickets
+ summary: List Ticket Problems
+ description: |-
+ The response is always ordered by `updated_at` in descending order
+
+ #### Allowed For
+
+ * Agents
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ - $ref: '#/components/parameters/IncludeBoundaryIndicators'
+ - $ref: '#/components/parameters/IncludeItemCursors'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ListTicketProblemsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ListTicketProblemsResponseExample'
+ /api/v2/problems/autocomplete:
+ post:
+ operationId: AutocompleteProblems
+ tags:
+ - Tickets
+ summary: Autocomplete Problems
+ description: |-
+ 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
+ parameters:
+ - name: text
+ in: query
+ description: The text to search for
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ text:
+ type: string
+ description: The text to search for
+ example:
+ text: fire
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ListTicketProblemsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ListTicketProblemsResponseExample'
+ /api/v2/push_notification_devices/destroy_many:
+ post:
+ operationId: PushNotificationDevices
+ tags:
+ - Push Notification Devices
+ summary: Bulk Unregister Push Notification Devices
+ description: |-
+ Unregisters the mobile devices that are receiving push notifications. Specify the devices as an array of mobile device tokens.
+
+ #### Allowed for
+
+ * Admins
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PushNotificationDevicesRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/PushNotificationDevicesRequestExample'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ type: string
+ description: empty
+ example: ""
+ example: ""
+ /api/v2/queues:
+ get:
+ operationId: ListQueues
+ tags:
+ - Omnichannel Routing Queues
+ summary: List queues
+ description: |
+ Returns all active queues for an account.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/QueuesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/QueuesResponseExample'
+ post:
+ operationId: CreateQueue
+ tags:
+ - Omnichannel Routing Queues
+ summary: Create Queue
+ description: |
+ Creates a queue. Accepts a JSON queue definition as the request body.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/QueueResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/QueueCreateResponseExample'
+ /api/v2/queues/{queue_id}:
+ parameters:
+ - $ref: '#/components/parameters/OcrQueueId'
+ get:
+ operationId: ShowQueueById
+ tags:
+ - Omnichannel Routing Queues
+ summary: Show Queue
+ description: |
+ Returns a queue for the given queue id.
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/QueueResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/QueueResponseExample'
+ put:
+ operationId: UpdateQueue
+ tags:
+ - Omnichannel Routing Queues
+ summary: Update Queue
+ description: |
+ Updates the queue definition for a given queue id.
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/QueueResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/QueuesUpdateResponseExample'
+ delete:
+ operationId: DeleteQueue
+ tags:
+ - Omnichannel Routing Queues
+ summary: Delete Queue
+ description: |
+ Deletes the queue and related records.
+ #### Allowed For
+
+ * Admins
+ responses:
+ "204":
+ description: No content response
+ /api/v2/queues/definitions:
+ get:
+ operationId: ListQueueDefinitions
+ tags:
+ - Omnichannel Routing Queues
+ summary: List Queue Definitions
+ description: |
+ Returns the definitions of the queues and the
+ definitions of the conditions under which a queue can execute. The
+ definition of the action includes a title ("Status"), a type ("list"), and
+ possible values. The definition of the condition includes the same fields
+ as well as the possible operators.
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DefinitionsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DefinitionsResponseExample'
+ /api/v2/queues/order:
+ patch:
+ operationId: ReorderQueues
+ tags:
+ - Omnichannel Routing Queues
+ summary: Reorder Queues
+ description: |
+ Alters the evaluation order of OCR queues in the account.
+ The evaluation order is set in a `queue_ids` array in the request body.
+
+ You must include every queue id in your account to reorder the OCR queues. If not, the endpoint will return 400 Bad Request.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "204":
+ description: No Content
+ /api/v2/recipient_addresses:
+ get:
+ operationId: ListSupportAddresses
+ tags:
+ - Support Addresses
+ summary: List Support Addresses
+ description: |
+ Lists all the support addresses for the account.
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Admins
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ - $ref: '#/components/parameters/IncludeSideloads'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SupportAddressesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SupportAddressesResponseExample'
+ post:
+ operationId: CreateSupportAddress
+ tags:
+ - Support Addresses
+ summary: Create Support Address
+ description: |
+ Adds a Zendesk or external support address to your account.
+
+ To add a Zendesk address, use the following syntax: `{local-part}@{accountname}.zendesk.com`.
+ Example: 'sales-team@example.zendesk.com'. The [local-part](https://en.wikipedia.org/wiki/Email_address#Local-part) can be anything you like.
+
+ To add an external email address such as help@omniwearshop.com, the email must already exist and you must set up forwarding on your email server. The exact steps depend on your mail server. See [Forwarding incoming email to Zendesk Support](https://support.zendesk.com/hc/en-us/articles/203663266). After setting up forwarding, run the [Verify Support Address Forwarding](#verify-support-address-forwarding) endpoint. The address won't work in Zendesk Support until it's been verified.
+
+ #### Allowed For
+
+ * Admins
+ * Agents with permission to manage channels and extensions. See the system permissions in [Creating custom roles and assigning agents (Enterprise)](https://support.zendesk.com/hc/en-us/articles/203662026-Creating-custom-roles-and-assigning-agents-Enterprise-#topic_cxn_hig_bd) in the Support Help Center
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SupportAddressResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SupportAddressCreateResponseExample'
+ /api/v2/recipient_addresses/{support_address_id}:
+ parameters:
+ - $ref: '#/components/parameters/SupportAddressId'
+ get:
+ operationId: ShowSupportAddress
+ tags:
+ - Support Addresses
+ summary: Show Support Address
+ description: |
+ #### Allowed For
+
+ * Admins
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SupportAddressResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SupportAddressResponseExample'
+ put:
+ operationId: UpdateSupportAddress
+ tags:
+ - Support Addresses
+ summary: Update Support Address
+ description: |
+ Updates an existing support address for your account.
+
+ You can't use this endpoint to update a support address's `email` property.
+ Instead, you can create a new address using the [Create Support
+ Address](#create-support-address) endpoint.
+
+ #### Allowed For
+
+ * Admins
+ * Agents with permission to manage channels and extensions. See the system permissions in [Creating custom roles and assigning agents (Enterprise)](https://support.zendesk.com/hc/en-us/articles/203662026-Creating-custom-roles-and-assigning-agents-Enterprise-#topic_cxn_hig_bd) in the Support Help Center
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SupportAddressResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SupportAddressUpdateResponseExample'
+ delete:
+ operationId: DeleteRecipientAddress
+ tags:
+ - Support Addresses
+ summary: Delete Support Address
+ description: |
+ Deletes a support address.
+
+ #### Allowed For
+
+ * Admins
+ * Agents with permission to manage channels and extensions. See the system permissions in [Creating custom roles and assigning agents (Enterprise)](https://support.zendesk.com/hc/en-us/articles/203662026-Creating-custom-roles-and-assigning-agents-Enterprise-#topic_cxn_hig_bd) in the Support Help Center
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/recipient_addresses/{support_address_id}/verify:
+ parameters:
+ - $ref: '#/components/parameters/SupportAddressId'
+ put:
+ operationId: VerifySupportAddressForwarding
+ tags:
+ - Support Addresses
+ summary: Verify Support Address Forwarding
+ description: |
+ Sends a test email to the specified support address to verify that email forwarding for the address works. An external support address won't work in Zendesk Support until it's verified.
+
+ **Note**: You don't need to verify Zendesk system support addresses.
+
+ The endpoint takes the following body: `{"type": "forwarding"}`. The value of the `type` property defaults to "forwarding" if none is specified, but the values "spf" and "dns" are also accepted.
+
+ Use this endpoint after [adding](#create-support-address) an external support address to Zendesk Support and setting up forwarding on your email server. See [Forwarding incoming email to Zendesk Support](https://support.zendesk.com/hc/en-us/articles/203663266).
+
+ The endpoint doesn't return the results of the test. Instead, use the [Show Support Address](#show-support-address) endpoint to check that the `forwarding_status` property is "verified".
+
+ Other verification checks can also be performed using this API. These include SPF checks and DNS checks.
+
+ When calling the endpoint with `type` set to "spf", it will queries the DNS records to check that the SPF records for Zendesk are present for outbound emails.
+
+ When calling the endpoint with `type` set to "dns", it runs checks on your CNAME records to make sure they are set up properly in your DNS.
+
+ #### Allowed For
+
+ * Admins
+ * Agents with permission to manage channels and extensions. See the system permissions in [Creating custom roles and assigning agents (Enterprise)](https://support.zendesk.com/hc/en-us/articles/203662026-Creating-custom-roles-and-assigning-agents-Enterprise-#topic_cxn_hig_bd) in the Support Help Center
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/relationships/definitions/{target_type}:
+ get:
+ operationId: GetRelationshipFilterDefinitions
+ tags:
+ - Lookup Relationships
+ summary: Filter Definitions
+ description: |
+ Returns filter definitions based on the given target type. Target types
+ include users (zen:user), tickets (zen:ticket), organizations (zen:organization), or custom objects (zen:custom_object:CUSTOM_OBJECT_KEY).
+ The returned filter definitions are the options that you can use to build a custom field or ticket field's
+ `relationship_filter`.
+ parameters:
+ - name: target_type
+ in: path
+ description: |
+ The target type for which you would like to see filter definitions.
+ The options are "zen:user", "zen:ticket", "zen:organization", and "zen:custom_object:CUSTOM_OBJECT_KEY"
+ required: true
+ schema:
+ type: string
+ example: zen:custom_object:apartment
+ - name: source_type
+ in: query
+ description: |
+ The source type for which you would like to see filter definitions.
+ The options are "zen:user", "zen:ticket", and "zen:organization"
+ schema:
+ type: string
+ example: zen:user
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RelationshipFilterDefinitionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RelationshipFilterDefinitionExample'
+ /api/v2/remote_authentications:
+ get:
+ operationId: ListRemoteAuthentications
+ tags:
+ - Remote Authentications
+ summary: List Remote Authentications
+ description: |
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RemoteAuthenticationsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RemoteAuthenticationsResponseExample'
+ /api/v2/requests:
+ get:
+ operationId: ListRequests
+ tags:
+ - Requests
+ summary: List Requests
+ description: "#### Allowed for\n\n* End Users\n\n#### Pagination\n\n* Cursor pagination (recommended)\n* Offset pagination\n\nSee [Pagination](/api-reference/introduction/pagination/).\n\n#### High volume requests\n\nRequesting a large number of tickets may return intermittent \"503 Service Unavailable\" errors. Workarounds:\n\n- Use cursor pagination with a smaller page size. Example: GET /api/v2/requests?page[size]=100. If you continue to see timeouts, try a smaller value, such as 50 or 25. \n- Use [Search Requests](/api-reference/ticketing/tickets/ticket-requests/#search-requests) instead. \n"
+ parameters:
+ - name: sort_by
+ in: query
+ description: Possible values are "updated_at", "created_at"
+ schema:
+ type: string
+ - name: sort_order
+ in: query
+ description: One of "asc", "desc". Defaults to "asc"
+ schema:
+ type: string
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RequestsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RequestsResponseExample'
+ post:
+ operationId: CreateRequest
+ tags:
+ - Requests
+ summary: Create Request
+ description: |
+ Accepts a `request` object that sets one or more properties.
+
+ #### Allowed for
+
+ * End users
+ * Anonymous users (rate limit of 5 requests per hour for [trial accounts](/documentation/developer-tools/getting-started/getting-a-trial-or-sponsored-account-for-development/))
+
+ #### Additional properties
+
+ In addition to the writable request properties in the [JSON Format table](#json-format) above, you can set the following properties when creating a request.
+
+ | Name | Type | Mandatory | Comment
+ | ---------------- | -------| --------- | -------
+ | comment | object | yes | Describes the problem, incident, question, or task. See [Request comments](#request-comments)
+ | collaborators | array | no | Adds collaborators (cc's) to the request. An email notification is sent to them when the ticket is created. See [Setting collaborators](/documentation/ticketing/managing-tickets/creating-and-managing-requests#setting-collaborators)
+ | requester | object | yes* | \*Required for anonymous requests. Specifies the requester of the anonymous request. See [Creating anonymous requests](/documentation/ticketing/managing-tickets/creating-and-managing-requests#creating-anonymous-requests)
+
+ #### Creating follow-up requests
+
+ Once a ticket is closed (as distinct from solved), it can't be reopened. However, you can create a new request that references the closed ticket. To create the follow-up request, include a `via_followup_source_id` property in the `request` object that specifies the closed ticket. The parameter only works with closed tickets. It has no effect with other tickets.
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RequestResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RequestCreateResponseExample'
+ /api/v2/requests/{request_id}:
+ parameters:
+ - $ref: '#/components/parameters/RequestId'
+ get:
+ operationId: ShowRequest
+ tags:
+ - Requests
+ summary: Show Request
+ description: |
+ #### Sideloads
+
+ The following sideloads are supported:
+
+ | Name | Will sideload
+ | ---------------- | -------------
+ | users | The email ccs for a request by side-loading users
+
+ #### Allowed For
+
+ * End Users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RequestResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RequestResponseExample'
+ put:
+ operationId: UpdateRequest
+ tags:
+ - Requests
+ summary: Update Request
+ description: |
+ 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.
+
+ #### Writable properties
+ 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](#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](/documentation/ticketing/managing-tickets/creating-and-managing-requests#adding-collaborators) |
+
+ #### Allowed For
+
+ * End users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RequestResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RequestCreateResponseExample'
+ /api/v2/requests/{request_id}/comments:
+ parameters:
+ - $ref: '#/components/parameters/RequestId'
+ get:
+ operationId: ListComments
+ tags:
+ - Requests
+ summary: Listing Comments
+ description: |
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ #### Sorting
+
+ 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`
+
+ #### Allowed For
+
+ * End Users
+ parameters:
+ - name: since
+ in: query
+ description: Filters the comments from the given datetime
+ schema:
+ type: string
+ - name: role
+ in: query
+ description: One of "agent", "end_user". If not specified it does not filter
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketCommentsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RequestListCommentsResponseExample'
+ /api/v2/requests/{request_id}/comments/{ticket_comment_id}:
+ parameters:
+ - $ref: '#/components/parameters/RequestId'
+ - $ref: '#/components/parameters/TicketCommentId'
+ get:
+ operationId: ShowComment
+ tags:
+ - Requests
+ summary: Getting Comments
+ description: |
+ #### Allowed For
+
+ * End Users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketCommentResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RequestGetCommentResponseExample'
+ /api/v2/requests/ccd:
+ get:
+ operationId: ListCCDRequests
+ tags:
+ - Requests
+ summary: List CCD Requests
+ description: |
+ Lists requests where the authenticated end user is CC'd.
+
+ #### Allowed for
+
+ * End Users
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+ parameters:
+ - name: sort_by
+ in: query
+ description: Possible values are "updated_at", "created_at"
+ schema:
+ type: string
+ - name: sort_order
+ in: query
+ description: One of "asc", "desc". Defaults to "asc"
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RequestsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RequestsResponseExample'
+ /api/v2/requests/open:
+ get:
+ operationId: ListOpenRequests
+ tags:
+ - Requests
+ summary: List Open Requests
+ description: |
+ Lists requests with the "open" status for the authenticated end user.
+
+ #### Allowed for
+
+ * End Users
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+ parameters:
+ - name: sort_by
+ in: query
+ description: Possible values are "updated_at", "created_at"
+ schema:
+ type: string
+ - name: sort_order
+ in: query
+ description: One of "asc", "desc". Defaults to "asc"
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RequestsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RequestsResponseExample'
+ /api/v2/requests/search:
+ get:
+ operationId: SearchRequests
+ tags:
+ - Requests
+ summary: Search Requests
+ description: |
+ Examples:
+
+ * `GET /api/v2/requests/search?query=printer`
+ * `GET /api/v2/requests/search?query=printer&organization_id=1`
+ * `GET /api/v2/requests/search?query=printer&cc_id=true`
+ * `GET /api/v2/requests/search?query=printer&status=hold,open`
+
+ #### Pagination
+
+ * Offset pagination only
+
+ See [Using Offset Pagination](/api-reference/introduction/pagination/#using-offset-pagination).
+
+ #### Results limit
+
+ The Search Requests endpoint returns up to 1,000 results per query, with a maximum of 100 results per page. See [Pagination](/api-reference/ticketing/introduction/#pagination). If you request a page past the limit (`page=11` at 100 results per page), a 422 Insufficient Resource Error is returned.
+
+ #### Allowed For
+
+ * End Users
+ parameters:
+ - name: query
+ in: query
+ description: The syntax and matching logic for the string is detailed in the [Zendesk Support search reference](https://support.zendesk.com/hc/en-us/articles/203663226). See also [Query basics](/api-reference/ticketing/ticket-management/search/#query-basics) in the Tickets API doc.
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RequestsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RequestsResponseExample'
+ /api/v2/requests/solved:
+ get:
+ operationId: ListSolvedRequests
+ tags:
+ - Requests
+ summary: List Solved Requests
+ description: |
+ Lists requests with the "solved" status for the authenticated end user.
+
+ #### Allowed for
+
+ * End Users
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+ parameters:
+ - name: sort_by
+ in: query
+ description: Possible values are "updated_at", "created_at"
+ schema:
+ type: string
+ - name: sort_order
+ in: query
+ description: One of "asc", "desc". Defaults to "asc"
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RequestsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RequestsResponseExample'
+ /api/v2/resource_collections:
+ get:
+ operationId: ListResourceCollections
+ tags:
+ - Resource Collections
+ summary: List Resource Collections
+ description: |
+ Lists resource collections for the account.
+
+ #### Allowed for
+
+ * Admins
+ parameters:
+ - $ref: '#/components/parameters/PerPage'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ResourceCollectionsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ResourceCollectionsResponseExample'
+ post:
+ operationId: CreateResourceCollection
+ tags:
+ - Resource Collections
+ summary: Create Resource Collection
+ description: |
+ 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](/documentation/apps/app-developer-guide/apps_requirements/) in the Zendesk Apps framework docs.
+
+ The response includes a [job
+ status](/api-reference/ticketing/ticket-management/job_statuses/) for creation of the specified resources.
+
+ #### Allowed for
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ResourceCollectionCreateResponseExample'
+ /api/v2/resource_collections/{resource_collection_id}:
+ parameters:
+ - $ref: '#/components/parameters/ResourceCollectionId'
+ get:
+ operationId: RetrieveResourceCollection
+ tags:
+ - Resource Collections
+ summary: Show Resource Collection
+ description: |
+ Retrieves details for a specified resource collection.
+
+ #### Allowed for
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ResourceCollectionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ResourceCollectionResponseExample'
+ put:
+ operationId: UpdateResourceCollection
+ tags:
+ - Resource Collections
+ summary: Update Resource Collection
+ description: |
+ 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](/documentation/apps/app-developer-guide/apps_requirements/) in the Zendesk Apps framework docs.
+
+ The response includes a [job
+ status](/api-reference/ticketing/ticket-management/job_statuses/) for the resource updates.
+
+ #### Allowed for
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ResourceCollectionUpdateResponseExample'
+ delete:
+ operationId: DeleteResourceCollection
+ tags:
+ - Resource Collections
+ summary: Delete Resource Collection
+ description: |
+ Deletes a specified resource collection.
+
+ The response includes a [job
+ status](/api-reference/ticketing/ticket-management/job_statuses/) for deletion of the collection's resources.
+
+ #### Allowed for
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ResourceCollectionDeleteResponseExample'
+ /api/v2/routing/agents/{user_id}/instance_values:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ListAGentAttributeValues
+ tags:
+ - Skill Based Routing
+ summary: List Agent Attribute Values
+ description: |
+ Returns an attribute value.
+
+ #### Allowed For
+
+ * Agents and admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributeValuesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SkillBasedRoutingAttributeValuesResponseExample'
+ post:
+ operationId: SetAgentAttributeValues
+ tags:
+ - Skill Based Routing
+ summary: Set Agent Attribute Values
+ description: |
+ Adds the specified attributes if no attributes exists, or replaces all existing attributes with the specified attributes.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributeValuesWithoutPriorityResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SkillBasedRoutingAttributeValuesWithoutPriorityResponseExample'
+ /api/v2/routing/agents/instance_values:
+ get:
+ operationId: ListManyAgentsAttributeValues
+ tags:
+ - Skill Based Routing
+ summary: List Attribute Values for Many Agents
+ description: |
+ Accepts a comma-separated list of up to 100 agent ids and returns attribute values for each agent in the list.
+
+ #### Allowed For
+ * Admins
+ * [Agents in custom role with permission to manage skills](https://support.zendesk.com/hc/en-us/articles/4408882153882-Creating-custom-roles-and-assigning-agents)
+
+ #### Pagination
+ * [Cursor pagination](/api-reference/introduction/pagination/#cursor-pagination) only.
+ Note: `page[before]` and `page[after]` can't be used together in the same request.
+ parameters:
+ - name: filter[agent_ids]
+ in: query
+ description: A comma-separated list of agent ids
+ required: true
+ schema:
+ type: string
+ example: 224,225
+ - name: page[before]
+ in: query
+ description: |
+ A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) that tells the endpoint which page to start on. It should be a `meta.before_cursor` value from a previous request.
+ schema:
+ type: string
+ - name: page[after]
+ in: query
+ description: |
+ A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) that tells the endpoint which page to start on. It should be a `meta.after_cursor` value from a previous request.
+ schema:
+ type: string
+ - name: page[size]
+ in: query
+ description: The number of items to return per page
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ maximum: 100
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ManySkillBasedRoutingAttributeValuesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ManySkillBasedRoutingAttributeValuesResponseExample'
+ "400":
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributeValuesError'
+ examples:
+ default:
+ $ref: '#/components/examples/ManySkillBasedRoutingAttributeValuesErrorExample'
+ /api/v2/routing/agents/instance_values/jobs:
+ post:
+ operationId: BulkSetAgentAttributeValuesJob
+ tags:
+ - Skill Based Routing
+ - Job Statuses
+ summary: Bulk Set Agent Attribute Values Jobs
+ description: |
+ Adds, replaces or removes multiple attributes for up to 100 agents.
+
+ #### Allowed For
+ * Admins
+ * [Agents in custom role with permission to manage skills](https://support.zendesk.com/hc/en-us/articles/4408882153882-Creating-custom-roles-and-assigning-agents)
+
+ #### Available Parameters
+
+ The request takes a data object with the following properties:
+ | Name | Type | Required | Description |
+ | ---------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+ | action | string | true | The action to perform on the attribute values. One of the following: "upsert", "update", "delete" |
+ | attributes | object | true | The attribute values to update. See [Attribute Values](#attribute-values). `agent_skill_priority` is optional. If not provided, it keeps the current priority or defaults to `NORMAL` when adding new attribute values. |
+ | items | array | true | The list of agent ids |
+
+ Action can be one of the following:
+ * upsert: Adds new attribute values to the agents
+ * update: Replaces all the current attribute values of the agents with the new values
+ * delete: Removes specified attribute values from the agents
+
+ This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#show-job-status) endpoint to check for the job's completion.
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BulkSkillBasedRoutingAttributeValuesRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/BulkSkillBasedRoutingAttributeValuesRequestExample'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/BulkSkillBasedRoutingAttributeValuesJobStatusResponseExample'
+ "400":
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributeValuesError'
+ examples:
+ default:
+ $ref: '#/components/examples/BulkSkillBasedRoutingAttributeValuesErrorExample'
+ /api/v2/routing/attributes:
+ get:
+ operationId: ListAccountAttributes
+ tags:
+ - Skill Based Routing
+ summary: List Account Attributes
+ description: |
+ Returns a list of attributes for the account.
+
+ #### Sideloads
+
+ The following sideloads are supported:
+
+ | Name | Will sideload
+ | ---------------- | -------------
+ | attribute_values | The attribute values available on the account
+
+ #### Allowed For
+
+ * Agents and admins
+ parameters:
+ - $ref: '#/components/parameters/RoutingAttributesInclude'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SkillBasedRoutingAttributesResponseExample'
+ post:
+ operationId: CreateAttribute
+ tags:
+ - Skill Based Routing
+ summary: Create Attribute
+ description: |
+ Creates an attribute.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributeResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SkillBasedRoutingAttributeCreateResponseExample'
+ /api/v2/routing/attributes/{attribute_id}:
+ parameters:
+ - $ref: '#/components/parameters/SkillBasedRoutingAttributeId'
+ get:
+ operationId: ShowAttribute
+ tags:
+ - Skill Based Routing
+ summary: Show Attribute
+ description: |
+ Returns an attribute.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributeResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SkillBasedRoutingAttributeResponseExample'
+ put:
+ operationId: UpdateAttribute
+ tags:
+ - Skill Based Routing
+ summary: Update Attribute
+ description: |
+ Updates an attribute.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributeResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SkillBasedRoutingAttributeUpdateResponseExample'
+ delete:
+ operationId: DeleteAttribute
+ tags:
+ - Skill Based Routing
+ summary: Delete Attribute
+ description: |
+ Deletes an attribute.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/routing/attributes/{attribute_id}/values:
+ parameters:
+ - $ref: '#/components/parameters/SkillBasedRoutingAttributeId'
+ get:
+ operationId: ListAttributeValues
+ tags:
+ - Skill Based Routing
+ summary: List Attribute Values for an Attribute
+ description: |
+ Returns a list of attribute values for a provided attribute.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributeValuesWithoutPriorityResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SkillBasedRoutingAttributeValuesWithoutPriorityResponseExample'
+ post:
+ operationId: CreateAttributeValue
+ tags:
+ - Skill Based Routing
+ summary: Create Attribute Value
+ description: |
+ Creates an attribute value.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributeValueResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SkillBasedRoutingAttributeValueCreateResponseExample'
+ /api/v2/routing/attributes/{attribute_id}/values/{attribute_value_id}:
+ parameters:
+ - $ref: '#/components/parameters/SkillBasedRoutingAttributeId'
+ - $ref: '#/components/parameters/SkillBasedRoutingAttributeValueId'
+ get:
+ operationId: ShowAttributeValue
+ tags:
+ - Skill Based Routing
+ summary: Show Attribute Value
+ description: |
+ Returns an attribute value.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributeValueResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SkillBasedRoutingAttributeValueResponseExample'
+ patch:
+ operationId: UpdateAttributeValue
+ tags:
+ - Skill Based Routing
+ summary: Update Attribute Value
+ description: |
+ Updates the name and ticket conditions of a skill. When a ticket is created, the skill is applied to a ticket if the ticket meets the specified condition or conditions. See the [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference/) for more information.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributeValueResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SkillBasedRoutingAttributeValueUpdateResponseExample'
+ delete:
+ operationId: DeleteAttributeValue
+ tags:
+ - Skill Based Routing
+ summary: Delete Attribute Value
+ description: |
+ Deletes an attribute value.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/routing/attributes/definitions:
+ get:
+ operationId: ListRoutingAttributeDefinitions
+ tags:
+ - Skill Based Routing
+ summary: List Routing Attribute Definitions
+ description: |
+ Returns the condition definitions that can be configured to apply attributes to a ticket.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributeDefinitions'
+ examples:
+ default:
+ $ref: '#/components/examples/SkillBasedRoutingAttributeDefinitionsExample'
+ /api/v2/routing/requirements/fulfilled:
+ get:
+ operationId: ListTicketsFullfilledByUser
+ tags:
+ - Skill Based Routing
+ summary: List Tickets Fulfilled by a User
+ description: |
+ Returns a list of ticket ids that contain attributes matching the current user's attributes. Accepts a `ticket_ids` parameter for relevant tickets to check for matching attributes.
+
+ #### Allowed For
+
+ * Agents and admins
+ parameters:
+ - name: ticket_ids
+ in: query
+ description: The IDs of the relevant tickets to check for matching attributes
+ required: true
+ schema:
+ type: integer
+ example: 1
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingTicketFulfilledResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SkillBasedRoutingTicketFulfilledResponseExample'
+ /api/v2/routing/tickets/{ticket_id}/instance_values:
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ get:
+ operationId: ListTicketAttributeValues
+ tags:
+ - Skill Based Routing
+ summary: List Ticket Attribute Values
+ description: |
+ Returns a list of attributes values for the ticket.
+
+ #### Allowed For
+
+ * Agents and admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributeValuesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SkillBasedRoutingTicketAttributesResponseExample'
+ post:
+ operationId: SetTicketAttributeValues
+ tags:
+ - Skill Based Routing
+ summary: Set Ticket Attribute Values
+ description: |
+ Adds the specified attributes if no attributes exists, or replaces all existing attributes with the specified attributes.
+
+ Invalid or deleted attributes are ignored.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributeValuesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SkillBasedRoutingTicketAttributesResponseExample'
+ /api/v2/satisfaction_ratings:
+ get:
+ operationId: ListSatisfactionRatings
+ tags:
+ - Satisfaction Ratings
+ summary: List Satisfaction Ratings
+ description: |
+ #### Allowed For
+ * Admins
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ #### Filters
+
+ | 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](https://www.epochconverter.com/)
+ | end_time | Time of the most recent satisfaction rating, as a [Unix epoch time](https://www.epochconverter.com/)
+
+ If you specify an unqualified score such as `good`, the results include all the records with and without comments.
+
+ Examples:
+
+ * `/api/v2/satisfaction_ratings?score=bad`
+ * `/api/v2/satisfaction_ratings?score=bad&start_time=1498151194`
+ * `/api/v2/satisfaction_ratings?start_time=1340384793&end_time=1371920793`
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SatisfactionRatingsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SatisfactionRatingsResponseExample'
+ /api/v2/satisfaction_ratings/{satisfaction_rating_id}:
+ get:
+ operationId: ShowSatisfactionRating
+ tags:
+ - Satisfaction Ratings
+ summary: Show Satisfaction Rating
+ description: |
+ Returns a specific satisfaction rating. You can get the id from
+ the [List Satisfaction Ratings](#list-satisfaction-ratings) endpoint.
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - name: satisfaction_rating_id
+ in: path
+ description: The id of the satisfaction rating to retrieve
+ required: true
+ schema:
+ type: integer
+ example: 35436
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SatisfactionRatingResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SatisfactionRatingResponseExample'
+ /api/v2/satisfaction_ratings/count:
+ get:
+ operationId: CountSatisfactionRatings
+ tags:
+ - Satisfaction Ratings
+ summary: Count Satisfaction Ratings
+ description: |-
+ 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.
+
+ #### Allowed For
+ * Admins
+ responses:
+ "200":
+ description: Count of satisfaction ratings
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SatisfactionRatingsCountResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SatisfactionRatingsCountResponseExample'
+ /api/v2/satisfaction_reasons:
+ get:
+ operationId: ListSatisfactionRatingReasons
+ tags:
+ - Satisfaction Reasons
+ summary: List Reasons for Satisfaction Rating
+ description: |
+ List all reasons for an account
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SatisfactionReasonsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SatisfactionReasonsResponseExample'
+ /api/v2/satisfaction_reasons/{satisfaction_reason_id}:
+ get:
+ operationId: ShowSatisfactionRatings
+ tags:
+ - Satisfaction Reasons
+ summary: Show Reason for Satisfaction Rating
+ description: |
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - name: satisfaction_reason_id
+ in: path
+ description: The id of the satisfaction rating reason
+ required: true
+ schema:
+ type: integer
+ example: 35121
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SatisfactionReasonResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SatisfactionReasonResponseExample'
+ /api/v2/search:
+ get:
+ operationId: ListSearchResults
+ tags:
+ - Search
+ summary: List Search Results
+ description: |
+ Returns the search results. See [Query syntax](#query-syntax) for details on the `query` parameter.
+
+ Use the ampersand character (&) to append the `sort_by` or `sort_order` parameters to the URL.
+
+ For examples, see [Searching with Zendesk API](/documentation/ticketing/using-the-zendesk-api/searching-with-the-zendesk-api).
+
+ This endpoint has its own rate limit. The rate limit counts towards the global API rate limit. See [Limits](#limits).
+
+ #### Allowed For
+
+ * Agents
+
+ #### Pagination
+
+ * Offset pagination only
+
+ Offset pagination may result in duplicate results when paging. You can also use the
+ [Export Search Results](/api-reference/ticketing/ticket-management/search/#export-search-results) endpoint, which
+ uses cursor-based pagination and doesn't return duplicate results. See
+ [Using cursor pagination](/api-reference/introduction/pagination/#using-cursor-pagination) for more information.
+
+
+ #### Errors JSON Format
+
+ 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 |
+
+ ##### Example Error
+ ```js
+ {
+ "error": "unavailable",
+ "description": "Sorry, we could not complete your search query. Please try again in a moment."
+ }
+ ```
+ parameters:
+ - name: query
+ in: query
+ description: The search query. See [Query basics](#query-basics) above. For details on the query syntax, see the [Zendesk Support search reference](https://support.zendesk.com/hc/en-us/articles/203663226)
+ required: true
+ schema:
+ type: string
+ example: https://subdomain.zendesk.com/api/v2/search?query=type:ticket status:closed&sort_by=status&sort_order=desc
+ - name: sort_by
+ in: query
+ description: One of `updated_at`, `created_at`, `priority`, `status`, or `ticket_type`. Defaults to sorting by relevance
+ schema:
+ type: string
+ - name: sort_order
+ in: query
+ description: One of `asc` or `desc`. Defaults to `desc`
+ schema:
+ type: string
+ - $ref: '#/components/parameters/SearchInclude'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SearchResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SearchResponseExample'
+ /api/v2/search/count:
+ get:
+ operationId: CountSearchResults
+ tags:
+ - Search
+ summary: Show Results Count
+ description: |
+ Returns the number of items matching the query rather than the items. The search string works the same as a regular search.
+
+ #### Allowed For
+
+ - Agents
+ parameters:
+ - name: query
+ in: query
+ description: The search query
+ required: true
+ schema:
+ type: string
+ example: https://subdomain.zendesk.com/api/v2/search?query=type:ticket status:closed
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SearchCountResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SearchCountResponseExample'
+ /api/v2/search/export:
+ get:
+ operationId: ExportSearchResults
+ tags:
+ - Search
+ summary: Export Search Results
+ description: |
+ Exports a set of results. See [Query syntax](#query-syntax) for the syntax of the `query` parameter.
+
+ Use this endpoint 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.
+
+ #### Allowed For
+
+ - Agents
+
+ #### Pagination
+
+ - Cursor pagination
+
+ See [Pagination](/api-reference/introduction/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:
+
+ - [Comparing cursor pagination and offset pagination](/documentation/developer-tools/pagination/comparing-cursor-pagination-and-offset-pagination)
+ - [Paginating through lists using cursor pagination](/documentation/developer-tools/pagination/paginating-through-lists-using-cursor-pagination)
+
+ #### Export Search Results Limits
+
+ This API endpoint is rate-limited to 100 requests per minute per account. The limit also counts towards the global API rate limit.
+
+ #### Response Format
+
+ | 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?`, 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.
+ parameters:
+ - name: query
+ in: query
+ description: The search query. See [Query basics](#query-basics) above. For details on the query syntax, see the [Zendesk Support search reference](https://support.zendesk.com/hc/en-us/articles/203663226)
+ required: true
+ schema:
+ type: string
+ example: https://subdomain.zendesk.com/api/v2/search?query=type:ticket status:closed&sort_by=status&sort_order=desc
+ - name: page[size]
+ in: query
+ description: The number of results shown in a page.
+ schema:
+ type: integer
+ - name: page[after]
+ in: query
+ description: The cursor token for fetching the next page of results.
+ schema:
+ type: string
+ - name: filter[type]
+ in: query
+ description: The object type returned by the export query. Can be `ticket`, `organization`, `user`, or `group`.
+ schema:
+ type: string
+ - $ref: '#/components/parameters/SearchInclude'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SearchExportResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SearchExportResponseExample'
+ /api/v2/security_settings:
+ get:
+ operationId: ShowSecuritySettings
+ tags:
+ - Security Settings
+ summary: Show Security Settings
+ description: |
+ #### Allowed For
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SecuritySettingsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SecuritySettingsResponseExample'
+ /api/v2/sessions:
+ get:
+ operationId: ListSessions
+ tags:
+ - Sessions
+ summary: List Sessions
+ description: |
+ 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.
+
+ #### Pagination
+
+ - Cursor pagination only
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ #### Allowed For
+
+ * Admins, Agents, End users
+ parameters:
+ - $ref: '#/components/parameters/CursorPaginationPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SessionsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SessionsResponseExample'
+ /api/v2/sharing_agreements:
+ get:
+ operationId: ListSharingAgreements
+ tags:
+ - Sharing Agreements
+ summary: List Sharing Agreements
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SharingAgreementsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SharingAgreementsResponseExample'
+ post:
+ operationId: CreateSharingAgreement
+ tags:
+ - Sharing Agreements
+ summary: Create Sharing Agreement
+ description: |
+ #### Allowed For
+
+ * Admins
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SharingAgreementResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SharingAgreementResponseExample'
+ /api/v2/sharing_agreements/{sharing_agreement_id}:
+ parameters:
+ - $ref: '#/components/parameters/SharingAgreementId'
+ get:
+ operationId: ShowSharingAgreement
+ tags:
+ - Sharing Agreements
+ summary: Show a Sharing Agreement
+ description: |
+ Returns a sharing agreement for your account.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SharingAgreementResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SharingAgreementResponseExample'
+ put:
+ operationId: UpdateSharingAgreement
+ tags:
+ - Sharing Agreements
+ summary: Update a Sharing Agreement
+ description: |
+ Returns an updated sharing agreement. Only `status` is allowed to be updated.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SharingAgreementResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SharingAgreementUpdateResponseExample'
+ delete:
+ operationId: DeleteSharingAgreement
+ tags:
+ - Sharing Agreements
+ summary: Delete a Sharing Agreement
+ description: |
+ Deletes a sharing agreement.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/skips:
+ parameters:
+ - $ref: '#/components/parameters/TicketSortOrder'
+ get:
+ operationId: ListSkips
+ tags:
+ - Ticket Skips
+ summary: List All Skips
+ description: |
+ Lists all skips. Archived tickets are not included in the response. See
+ [About archived tickets](https://support.zendesk.com/hc/en-us/articles/203657756) in
+ the Support Help Center.
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/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
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketSkipsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketSkipResponseExample'
+ post:
+ operationId: RecordNewSkip
+ tags:
+ - Ticket Skips
+ summary: Record a New Skip for the Current User
+ description: |
+ Record a new ticket skip for the current user.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "201":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketSkipCreation'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketSkipCreationExample'
+ /api/v2/slas/policies:
+ get:
+ operationId: ListSLAPolicies
+ tags:
+ - SLA Policies
+ summary: List SLA Policies
+ description: |
+ #### Availability
+
+ * Accounts on the Support Professional or Suite Growth plan or above
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SLAPoliciesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SLAPoliciesResponseExample'
+ post:
+ operationId: CreateSLAPolicy
+ tags:
+ - SLA Policies
+ summary: Create SLA Policy
+ description: |
+ #### Availability
+
+ * Accounts on the Support Professional or Suite Growth plan or above
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SLAPolicyResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SLAPolicyCreateResponse'
+ /api/v2/slas/policies/{sla_policy_id}:
+ parameters:
+ - $ref: '#/components/parameters/SLAPolicyId'
+ get:
+ operationId: ShowSLAPolicy
+ tags:
+ - SLA Policies
+ summary: Show SLA Policy
+ description: |
+ #### Availability
+
+ * Accounts on the Support Professional or Suite Growth plan or above
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SLAPolicyResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SLAPolicyResponseExample'
+ put:
+ operationId: UpdateSLAPolicy
+ tags:
+ - SLA Policies
+ summary: Update SLA Policy
+ description: |
+ Updates the specified policy.
+
+ #### Availability
+
+ * Accounts on the Support Professional or Suite Growth plan or above
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SLAPolicyResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SLAPolicyUpdateResponse'
+ delete:
+ operationId: DeleteSLAPolicy
+ tags:
+ - SLA Policies
+ summary: Delete SLA Policy
+ description: |
+ #### Availability
+
+ * Accounts on the Support Professional or Suite Growth plan or above
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/slas/policies/definitions:
+ get:
+ operationId: RetrieveSLAPolicyFilterDefinitionItems
+ tags:
+ - SLA Policies
+ summary: Retrieve Supported Filter Definition Items
+ description: |
+ #### Availability
+
+ * Accounts on the Support Professional or Suite Growth plan or above
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SLAPolicyFilterDefinitionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SLAPolicyFilterDefinitionResponseExample'
+ /api/v2/slas/policies/reorder:
+ put:
+ operationId: ReorderSLAPolicies
+ tags:
+ - SLA Policies
+ summary: Reorder SLA Policies
+ description: |
+ #### Availability
+
+ * Accounts on the Support Professional or Suite Growth plan or above
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - name: sla_policy_ids
+ in: query
+ description: The IDs of the SLA Policies to reorder
+ schema:
+ type: array
+ items:
+ type: integer
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/suspended_tickets:
+ parameters:
+ - $ref: '#/components/parameters/SuspendedTicketsSortBy'
+ - $ref: '#/components/parameters/SuspendedTicketsSortOrder'
+ get:
+ operationId: ListSuspendedTickets
+ tags:
+ - Suspended Tickets
+ summary: List Suspended Tickets
+ description: |
+ #### Allowed For
+
+ * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage suspended tickets on Enterprise plans
+ * Unrestricted agents on all other plans
+
+ #### Sorting
+
+ You can sort the tickets with the `sort_by` and `sort_order` query string parameters.
+
+ #### Pagination
+
+ * Cursor pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SuspendedTicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SuspendedTicketsResponseExample'
+ /api/v2/suspended_tickets/{id}:
+ get:
+ operationId: ShowSuspendedTickets
+ tags:
+ - Suspended Tickets
+ summary: Show Suspended Ticket
+ description: |
+ #### Allowed For
+
+ * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage suspended tickets on Enterprise plans
+ * Unrestricted agents on all other plans
+ parameters:
+ - $ref: '#/components/parameters/SuspendedTicketId'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SuspendedTicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SuspendedTicketsResponseExample'
+ delete:
+ operationId: DeleteSuspendedTicket
+ tags:
+ - Suspended Tickets
+ summary: Delete Suspended Ticket
+ description: |
+ #### Allowed For
+
+ * Unrestricted agents
+ parameters:
+ - $ref: '#/components/parameters/SuspendedTicketId'
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/suspended_tickets/{id}/recover:
+ put:
+ operationId: RecoverSuspendedTicket
+ tags:
+ - Suspended Tickets
+ summary: Recover Suspended Ticket
+ description: |
+ **Note**: During recovery, the API sets the requester to the authenticated agent who called the API, not the original requester. This prevents the ticket from being re-suspended after recovery. To preserve the original requester, use the [Recover Multiple Suspended Tickets](#recover-multiple-suspended-tickets) endpoint with the single ticket.
+
+ This endpoint does not queue an asynchronous job that can be tracked from [Job Statuses](/api-reference/ticketing/ticket-management/job_statuses/). Instead, it processes the request with a synchronous response.
+ - If all recoveries are successful, it returns a 200 with a `tickets` array in the response.
+ - If all recoveries fail, it returns a 422 with a `suspended_tickets` array in the response.
+ - If there is a mixture of successes and failures in a single call, it returns a 422 with a `suspended_tickets` array of the failures in the response.
+
+ #### Allowed For
+
+ * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage suspended tickets on Enterprise plans
+ * Unrestricted agents on all other plans
+ parameters:
+ - $ref: '#/components/parameters/SuspendedTicketId'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RecoverSuspendedTicketResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RecoverSuspendedTicketResponseExample'
+ "422":
+ description: Recovery failed response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RecoverSuspendedTicketUnprocessableContentResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RecoverSuspendedTicketUnprocessableContentResponseExample'
+ /api/v2/suspended_tickets/attachments:
+ post:
+ operationId: SuspendedTicketsAttachments
+ tags:
+ - Suspended Tickets
+ summary: Suspended Ticket Attachments
+ description: |
+ Makes copies of any attachments on a suspended ticket and returns them as [attachment tokens](/api-reference/ticketing/tickets/ticket-attachments/). If the ticket is manually recovered, you can include the attachment tokens on the new ticket.
+
+ #### Allowed For
+
+ * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage suspended tickets on Enterprise plans
+ * Unrestricted agents on all other plans
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SuspendedTicketsAttachmentsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SuspendedTicketsAttachmentsResponseExample'
+ /api/v2/suspended_tickets/destroy_many:
+ parameters:
+ - $ref: '#/components/parameters/SuspendedTicketsDeleteIds'
+ delete:
+ operationId: DeleteSuspendedTickets
+ tags:
+ - Suspended Tickets
+ summary: Delete Multiple Suspended Tickets
+ description: |
+ Accepts up to 100 ids (the auto-generated id, not the ticket id.)
+
+ #### Allowed For
+
+ * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage suspended tickets on Enterprise plans
+ * Unrestricted agents on all other plans
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/suspended_tickets/export:
+ post:
+ operationId: ExportSuspendedTickets
+ tags:
+ - Suspended Tickets
+ summary: Export Suspended Tickets
+ description: |
+ Exports a list of suspended tickets for the Zendesk Support instance. To export the list, the endpoint enqueues a job to create a CSV file with the data. When done, Zendesk sends the requester an email containing a link to the CSV file. In the CSV, tickets are sorted by the update timestamp in ascending order.
+
+ #### Allowed For
+
+ * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage suspended tickets on Enterprise plans
+ * Unrestricted agents on all other plans
+
+ #### Rate limits
+
+ Limited to one request per minute and up to one million records in return. The rate-limiting mechanism behaves identically to the one described in [Usage limits](/api-reference/ticketing/account-configuration/usage_limits/#monitoring-your-request-activity).
+ We recommend using the `Retry-After` header value as described in [Catching errors caused by rate limiting](/documentation/ticketing/using-the-zendesk-api/best-practices-for-avoiding-rate-limiting#catch).
+ responses:
+ "200":
+ description: Ok
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SuspendedTicketsExportResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SuspendedTicketsExportResponseExample'
+ /api/v2/suspended_tickets/recover_many:
+ parameters:
+ - $ref: '#/components/parameters/SuspendedTicketsRecoverIds'
+ put:
+ operationId: RecoverSuspendedTickets
+ tags:
+ - Suspended Tickets
+ summary: Recover Multiple Suspended Tickets
+ description: |
+ Accepts up to 100 ids (the auto-generated id, not the ticket id.) Note that suspended tickets that fail to be recovered are still included in the response.
+
+ #### Allowed For
+
+ * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage suspended tickets on Enterprise plans
+ * Unrestricted agents on all other plans
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RecoverSuspendedTicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RecoverSuspendedTicketsResponseExample'
+ /api/v2/tags:
+ get:
+ operationId: ListTags
+ tags:
+ - Tags
+ summary: List Tags
+ description: |
+ Lists up to the 20,000 most popular tags in the last 60 days, in decreasing popularity.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TagsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TagsResponseExample'
+ /api/v2/tags/count:
+ get:
+ operationId: CountTags
+ tags:
+ - Tags
+ summary: Count Tags
+ description: |
+ Returns an approximate count of tags. If the count exceeds 100,000, it
+ is updated every 24 hours.
+
+ The `refreshed_at` property of the `count` object is a timestamp that indicates when
+ the count was last updated.
+
+ **Note**: When the count exceeds 100,000, the `refreshed_at` property in the `count` object may
+ occasionally be null. This indicates that the count is being
+ updated in the background and the `value` property in the `count` object is limited to
+ 100,000 until the update is complete.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TagCountResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TagCountResponseExample'
+ /api/v2/target_failures:
+ get:
+ operationId: ListTargetFailures
+ tags:
+ - Target Failures
+ summary: List Target Failures
+ description: |
+ Returns the 25 most recent target failures, per target.
+
+ #### Stability
+
+ * Development
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TargetFailuresResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TargetFailuresResponseExample'
+ /api/v2/target_failures/{target_failure_id}:
+ parameters:
+ - $ref: '#/components/parameters/TargetFailureId'
+ get:
+ operationId: ShowTargetFailure
+ tags:
+ - Target Failures
+ summary: Show Target Failure
+ description: |
+ #### Stability
+
+ * Development
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TargetFailureResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TargetFailureResponseExample'
+ /api/v2/targets:
+ get:
+ operationId: ListTargets
+ tags:
+ - Targets
+ summary: List Targets
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TargetsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TargetsResponseExample'
+ post:
+ operationId: CreateTarget
+ tags:
+ - Targets
+ summary: Create Target
+ description: |
+ #### Allowed For
+
+ * Admins
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TargetResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TargetCreateResponseExample'
+ /api/v2/targets/{target_id}:
+ parameters:
+ - $ref: '#/components/parameters/TargetId'
+ get:
+ operationId: ShowTarget
+ tags:
+ - Targets
+ summary: Show Target
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TargetResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TargetResponseExample'
+ put:
+ operationId: UpdateTarget
+ tags:
+ - Targets
+ summary: Update Target
+ description: |
+ #### Allowed For
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TargetResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TargetUpdateResponseExample'
+ delete:
+ operationId: DeleteTarget
+ tags:
+ - Targets
+ summary: Delete Target
+ description: |
+ #### Allowed For
+ * Admins
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/task_list_templates:
+ get:
+ operationId: ListTaskListTemplates
+ tags:
+ - Task List Templates
+ summary: List Task List Templates
+ description: |
+ Lists all task list templates. The template's tasks aren't included in the response.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaskListTemplatesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TaskListTemplatesResponseExample'
+ post:
+ operationId: CreateTaskListTemplate
+ tags:
+ - Task List Templates
+ summary: Create Task List Template
+ description: |-
+ Creates a task list template.
+
+ #### Allowed For
+
+ * Admins
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaskListTemplateCreateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/TaskListTemplateCreateRequestExample'
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaskListTemplateResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TaskListTemplateWithItemsResponseExample'
+ /api/v2/task_list_templates/{task_list_template_id}:
+ parameters:
+ - $ref: '#/components/parameters/TaskListTemplateId'
+ get:
+ operationId: ShowTaskListTemplate
+ tags:
+ - Task List Templates
+ summary: Show Task List Template
+ description: |
+ Returns the task list template with the specified id. The template's tasks aren't included in the response.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaskListTemplateResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TaskListTemplateResponseExample'
+ put:
+ operationId: UpdateTaskListTemplate
+ tags:
+ - Task List Templates
+ summary: Update Task List Template
+ description: |-
+ Creates, modifies, or deletes tasks in a task list template. Only the tasks included in the `task_list_template` object in the request are updated. Tasks that aren't specified in the request are unchanged.
+
+ #### Allowed For
+
+ * Admins
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaskListTemplateUpdateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/TaskListTemplateUpdateRequestExample'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaskListTemplateResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TaskListTemplateWithItemsResponseExample'
+ delete:
+ operationId: DeleteTaskListTemplate
+ tags:
+ - Task List Templates
+ summary: Delete Task List Template
+ description: |-
+ Deletes a task list template with the specified id.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "204":
+ description: No content response
+ /api/v2/task_list_templates/{task_list_template_id}/tasks:
+ parameters:
+ - $ref: '#/components/parameters/TaskListTemplateId'
+ get:
+ operationId: GetTasksByTaskListTemplateId
+ tags:
+ - Task List Templates
+ summary: Get Tasks by Task List Template Id
+ description: |
+ Returns the tasks for the specified task list template.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TasksByTaskListTemplateIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TasksByTaskListTemplateIdResponseExample'
+ /api/v2/ticket_audits:
+ get:
+ operationId: ListTicketAudits
+ tags:
+ - Ticket Audits
+ summary: List All Ticket Audits
+ description: |
+ Returns ticket audits. Archived tickets are not included in the response. Use the [List Audits for a Ticket](#list-audits-for-a-ticket) endpoint to
+ retrieve audit records for an archived ticket. To learn more about archived tickets, see [About archived tickets](https://support.zendesk.com/hc/en-us/articles/203657756).
+
+ This endpoint should not be used for capturing change data. When continually chasing the tail of a cursor, some records will be skipped. For this use case, use the [Incremental Ticket Event Export API](/api-reference/ticketing/ticket-management/incremental_exports/#incremental-ticket-event-export).
+
+ #### Allowed For
+
+ * Admins
+ parameters:
+ - name: page[before]
+ in: query
+ description: |
+ A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) that tells the endpoint which page to start on. It should be a `meta.before_cursor` value from a previous request. Note: `page[before]` and `page[after]` can't be used together in the same request.
+ schema:
+ type: string
+ - name: page[after]
+ in: query
+ description: |
+ A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) that tells the endpoint which page to start on. It should be a `meta.after_cursor` value from a previous request. Note: `page[before]` and `page[after]` can't be used together in the same request.
+ schema:
+ type: string
+ - name: page[size]
+ in: query
+ description: Specifies how many records to be returned in the response. You can specify up to 100 records per page.
+ schema:
+ type: integer
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketAuditsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketAuditsResponseExample'
+ /api/v2/ticket_content_pins:
+ get:
+ operationId: ListTicketContentPins
+ tags:
+ - Ticket Content Pins
+ summary: List Ticket Content Pins
+ description: |
+ Lists the content pins for a specific ticket. Content pins are used to pin related content such as articles to a ticket for quick access. This endpoint returns the content pins associated with the specified ticket id.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - name: ticket_id
+ in: query
+ description: The id of the ticket for which to list content pins
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ count:
+ type: integer
+ description: Total number of content pins for the ticket.
+ ticket_content_pins:
+ type: array
+ items:
+ $ref: '#/components/schemas/TicketContentPin'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketContentPinsExample'
+ post:
+ operationId: CreateTicketContentPin
+ tags:
+ - Ticket Content Pins
+ summary: Create Ticket Content Pin
+ description: |
+ Creates a new content pin for a specific ticket. Content pins allow you to link to articles, community posts, or external content for easy reference.
+
+ #### Allowed For
+
+ * Admins
+ * Agents
+ requestBody:
+ description: |
+ Creates a new content pin for a specific ticket. The content pin can link to articles, topics, or other relevant content.
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ ticket_content_pin:
+ type: object
+ properties:
+ content_id:
+ type: string
+ description: The id of the content to pin
+ content_type:
+ type: string
+ description: The type of content being pinned.
+ locale:
+ type: string
+ description: The locale for the content pin. This is required only for articles.
+ ticket_id:
+ type: string
+ description: The id of the ticket to which the content pin will be added
+ required:
+ - ticket_id
+ - content_id
+ - content_type
+ examples:
+ default:
+ value:
+ ticket_content_pin:
+ content_id: 01HFS51MMTVW7CMVEV5V51NYV5
+ content_type: article
+ locale: en-US
+ ticket_id: "12345"
+ responses:
+ "201":
+ description: Content pin created successfully
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketContentPin'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketContentPinExample'
+ "400":
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: object
+ properties:
+ message:
+ type: string
+ description: Detailed message explaining the error.
+ title:
+ type: string
+ description: Error title indicating the nature of the bad request.
+ examples:
+ default:
+ value:
+ error:
+ message: ticket_id must be a string
+ title: Invalid attribute
+ "409":
+ description: Conflict
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ description:
+ type: string
+ description: Detailed description of the conflict.
+ error:
+ type: string
+ description: Error message indicating a conflict.
+ examples:
+ default:
+ value:
+ description: A conflicting operation is in progress, please try again later
+ error: ContentPinCreationConflict
+ "422":
+ description: Unprocessable Entity
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ description:
+ type: string
+ description: Detailed description of the error.
+ error:
+ type: string
+ description: Error message indicating why the request failed.
+ examples:
+ default:
+ value:
+ description: The content with ID 12345 is already pinned to this ticket.
+ error: ContentAlreadyPinned
+ /api/v2/ticket_content_pins/{content_pin_id}:
+ delete:
+ operationId: DeleteTicketContentPin
+ tags:
+ - Ticket Content Pins
+ summary: Delete Content Pin from Ticket
+ description: |
+ Deletes a specific content pin from a ticket.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - name: content_pin_id
+ in: path
+ description: The id of the content pin to delete
+ required: true
+ schema:
+ type: string
+ example: 01HFS51MMTVW7CMVEV5V51NYV5
+ responses:
+ "200":
+ description: Content pin deleted successfully
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketContentPin'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketContentPinExample'
+ "404":
+ description: Content pin not found
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ description:
+ type: string
+ error:
+ type: string
+ examples:
+ default:
+ value:
+ description: Not found
+ error: RecordNotFound
+ /api/v2/ticket_fields:
+ get:
+ operationId: ListTicketFields
+ tags:
+ - Ticket Fields
+ summary: List Ticket Fields
+ description: |
+ Returns a list of all system and custom ticket fields in your account.
+
+ For end users, only the ticket fields with visible_in_portal set to true are returned.
+
+ Cursor pagination returns a maximum of 100 records per page and fields are returned in the order specified by their id.
+
+ If the results are not paginated, every field is returned in the response and fields are returned in the order specified by the position.
+
+ You can adjust the position of ticket fields by:
+
+ - Using the [Update Ticket Field](/api-reference/ticketing/tickets/ticket_fields/#update-ticket-field) endpoint
+ - Using the [Reorder Ticket Fields](/api-reference/ticketing/tickets/ticket_fields/#reorder-ticket-fields) endpoint
+ - Ticket Fields page in the Admin Center (**Admin Center** > **Manage** > **Ticket** > **Fields** > **Actions** > **Edit order**)
+
+ These adjustments determine the order in which fields are displayed in various locations. For accounts without access to multiple ticket forms, the order will also be used to display field values within tickets. However, for accounts with access to multiple ticket forms, the field order on the ticket page is defined within each form.
+
+ Consider caching this resource to use with the [Tickets](/api-reference/ticketing/tickets/tickets/#json-format) API.
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - No pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ #### Sideloads
+
+ The following sideloads are supported:
+
+ | Name | Will sideload
+ | ---------------- | -------------
+ | users | The user or users that created the ticket field
+
+ #### Allowed For
+
+ * Anyone
+ parameters:
+ - name: locale
+ in: query
+ description: |
+ Forces the `title_in_portal` property to return a dynamic content variant for the specified locale.
+ Only accepts [active locale ids](/api-reference/ticketing/account-configuration/locales/#list-locales).
+ Example: `locale="de"`.
+ schema:
+ type: string
+ - name: creator
+ in: query
+ description: |
+ 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, `creator_app_name` is null
+ schema:
+ type: boolean
+ - $ref: '#/components/parameters/CursorPaginationPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ - $ref: '#/components/parameters/IncludeBoundaryIndicators'
+ - $ref: '#/components/parameters/IncludeItemCursors'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFieldsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFieldsResponseExample'
+ post:
+ operationId: CreateTicketField
+ tags:
+ - Ticket Fields
+ summary: Create Ticket Field
+ description: |
+ Creates any of the following custom field types:
+
+ | Custom field type | Description |
+ |-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
+ | text | Default custom field type when `type` is not specified |
+ | textarea | For multi-line text |
+ | checkbox | To capture a boolean value. Allowed values are true or false. Optionally, you can specify a tag to be added to the ticket when the value is true. |
+ | date | Example: 2021-04-16 |
+ | integer | String composed of numbers. May contain an optional decimal point |
+ | decimal | For numbers containing decimals |
+ | regexp | Matches the Regex pattern found in the custom field settings |
+ | partialcreditcard | A credit card number. Only the last 4 digits are retained |
+ | multiselect | Enables users to choose multiple options from a dropdown menu. It contains one or more tag values belonging to the field's options. |
+ | tagger | Single-select dropdown menu. It contains one or more tag values belonging to the field's options. Example: ( {"id": 21938362, "value": ["hd_3000", "hd_5555"]}) |
+ | lookup | A field to create a relationship (see [lookup relationships](/api-reference/ticketing/lookup_relationships/lookup_relationships/)) to another object such as a user, ticket, or organization |
+
+ **Note**: Tags can't be re-used across custom ticket fields. For example, if you configure a tag for a checkbox field, you can't use that tag value for a dropdown (tagger) field option. The use of tags isn't validated and can prevent editing in the future.
+
+ See [About custom field types](https://support.zendesk.com/hc/en-us/articles/203661866) in the Zendesk Help Center.
+
+ #### Allowed For
+
+ * Admins
+
+ #### Field limits
+
+ We recommend the following best practices for ticket fields limits. Creating more than these amounts can affect performance.
+
+ * 400 ticket fields per account if your account doesn't have ticket forms
+ * 400 ticket fields per ticket form if your account has ticket forms
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFieldResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFieldResponseExample'
+ /api/v2/ticket_fields/{ticket_field_id}:
+ parameters:
+ - $ref: '#/components/parameters/TicketFieldId'
+ - $ref: '#/components/parameters/Creator'
+ get:
+ operationId: ShowTicketfield
+ tags:
+ - Ticket Fields
+ summary: Show Ticket Field
+ description: |
+ #### Allowed for
+
+ * Agents
+
+ #### Sideloads
+
+ The following sideloads are supported:
+
+ | Name | Will sideload
+ | ---------------- | -------------
+ | users | The user or users that created the ticket field
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFieldResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFieldResponseExample'
+ put:
+ operationId: UpdateTicketField
+ tags:
+ - Ticket Fields
+ summary: Update Ticket Field
+ description: |
+ #### 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`, `value` and `allow_solving` property. The properties correspond to the "Title", "Tag" and "Required to solve" boxes in the admin interface. Example request body:
+
+ ```json
+ {"ticket_field": {
+ "custom_field_options": [
+ {"name": "Apple Pie", "value": "apple", "allow_solving": true},
+ {"name": "Pecan Pie", "value": "pecan", "allow_solving": false}
+ ]
+ }
+ }
+ ```
+
+ #### Example Request
+
+ ```bash
+ curl https://{subdomain}.zendesk.com/api/v2/ticket_fields/{id} \
+ -d '{"ticket_field": {"custom_field_options": [{"name": "Apple Pie", "value": "apple", "allow_solving": true}, {"name": "Pecan Pie", "value": "pecan", "allow_solving": false}]}}' \
+ -H "Content-Type: application/json" -X PUT \
+ -v -u {email_address}/token:{api_token}
+ ```
+
+ #### Example Response
+
+ ```http
+ 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,
+ "allow_solving":true
+ },
+ ...
+ ]
+ }
+ }
+ ```
+
+ #### Allowed for
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFieldResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFieldUpdateResponseExample'
+ delete:
+ operationId: DeleteTicketField
+ tags:
+ - Ticket Fields
+ summary: Delete Ticket Field
+ description: |
+ #### Allowed for
+
+ * Admins
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/ticket_fields/{ticket_field_id}/options:
+ parameters:
+ - $ref: '#/components/parameters/TicketFieldId'
+ get:
+ operationId: ListTicketFieldOptions
+ tags:
+ - Ticket Fields
+ summary: List Ticket Field Options
+ description: |
+ 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](/api-reference/introduction/pagination/).
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomFieldOptionsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomTicketFieldOptionsResponseExample'
+ post:
+ operationId: CreateOrUpdateTicketFieldOption
+ tags:
+ - Ticket Fields
+ summary: Create or Update Ticket Field Option
+ description: |
+ 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` if the ticket field option already exists in the database
+ - 201 with `Location: /api/v2/ticket_fields/{ticket_field_id}/options` 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](/api-reference/ticketing/account-configuration/usage_limits/#monitoring-your-request-activity) in the API introduction.
+
+ #### Field Option Limits
+
+ * 2000 options per ticket field
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomFieldOptionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomTicketFieldOptionUpdateResponseExample'
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomFieldOptionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomTicketFieldOptionCreateResponseExample'
+ /api/v2/ticket_fields/{ticket_field_id}/options/{ticket_field_option_id}:
+ parameters:
+ - $ref: '#/components/parameters/TicketFieldId'
+ - $ref: '#/components/parameters/TicketFieldOptionId'
+ get:
+ operationId: ShowTicketFieldOption
+ tags:
+ - Ticket Fields
+ summary: Show Ticket Field Option
+ description: |
+ #### Allowed for
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomFieldOptionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomTicketFieldOptionResponseExample'
+ delete:
+ operationId: DeleteTicketFieldOption
+ tags:
+ - Ticket Fields
+ summary: Delete Ticket Field Option
+ description: |
+ #### Allowed for
+ * Admins
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/ticket_fields/count:
+ get:
+ operationId: CountTicketFields
+ tags:
+ - Ticket Fields
+ summary: Count Ticket Fields
+ description: |-
+ Returns an approximate count of system and custom ticket fields 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.
+
+ #### Allowed For
+ * Agents
+ responses:
+ "200":
+ description: Count of ticket fields
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFieldCountResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFieldCountResponseExample'
+ /api/v2/ticket_fields/reorder:
+ put:
+ operationId: ReorderTicketFields
+ tags:
+ - Ticket Fields
+ summary: Reorder Ticket Fields
+ description: |
+ #### Allowed For
+ * Admins
+
+ #### Request Parameters
+
+ You can pass in the following parameter in the payload:
+
+ | Name | Type | Comment
+ | ------------------- | ------ | --------
+ | ticket_field_ids | array | An array of ticket field ids. Example: "[2, 23, 46, 50]". Not all ticket_field_ids are necessary in the payload; only those provided will be assigned to the first positions. Missing IDs will be assigned incremental positions automatically.
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/ticket_fields/show_many:
+ get:
+ operationId: ShowManyTicketFields
+ tags:
+ - Ticket Fields
+ summary: Show Many Ticket Fields
+ description: |
+ Returns multiple ticket fields in a single request.
+
+ Provide either:
+ - `ids` — a comma-separated list of ticket field IDs, or
+ - `keys` — a comma-separated list of ticket field keys
+
+ Up to 100 values are accepted.
+
+ The response payload matches the List Ticket Fields [response format](/api-reference/ticketing/tickets/ticket_fields/#example-responses).
+
+ #### Sideloads
+
+ The following sideloads are supported:
+
+ | Name | Will sideload |
+ |-------|---------------------------------------|
+ | users | The user or users that created fields |
+
+ #### Allowed For
+
+ * Anyone
+ parameters:
+ - name: ids
+ in: query
+ description: |
+ Comma-separated list of ticket field IDs to retrieve. Up to 100 values accepted.
+
+ Either `ids` or `keys` can be used, but not both.
+ schema:
+ type: string
+ example: 123,456,789
+ - name: keys
+ in: query
+ description: |
+ Comma-separated list of ticket field keys to retrieve. Up to 100 values accepted.
+
+ Use field keys like 'priority', 'status', 'subject' instead of numeric IDs.
+
+ Either `ids` or `keys` can be used, but not both.
+ schema:
+ type: string
+ example: priority,status,subject
+ - name: creator
+ in: query
+ description: |
+ If true, includes creator information in the response.
+ schema:
+ type: boolean
+ - name: exclude_sub_selection_options
+ in: query
+ description: |
+ If true, excludes sub-selection options from dropdown fields in the response.
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFieldsShowManyResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFieldsShowManyResponseExample'
+ /api/v2/ticket_form_statuses:
+ get:
+ operationId: ListTicketFormStatuses
+ tags:
+ - Ticket Form Statuses
+ summary: List Ticket Form Statuses
+ description: |
+ Fetches all of the ticket form statuses for the account.
+
+ Supports filtering by ticket form ID and other criteria using query parameters.
+
+ #### Allowed For
+
+ * Admins
+ * Agents
+ parameters:
+ - name: ticket_form_id
+ in: query
+ description: |
+ Filter by ticket form ID.
+
+ Supports single ID or comma-separated list of IDs.
+ schema:
+ type: string
+ examples:
+ multiple:
+ summary: Multiple form IDs
+ value: 123,456,789
+ single:
+ summary: Single form ID
+ value: "123456"
+ - name: filter
+ in: query
+ description: Additional filter criteria
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ properties:
+ custom_status_id:
+ type: string
+ description: Filter by custom status ID (comma-separated)
+ id:
+ type: string
+ description: Filter by status ID (comma-separated)
+ example:
+ custom_status_id: "789"
+ id: 123,456
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFormStatusesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFormStatusesResponseExample'
+ /api/v2/ticket_form_statuses/show_many:
+ get:
+ operationId: ShowManyTicketFormStatuses
+ tags:
+ - Ticket Form Statuses
+ summary: Show Many Ticket Form Statuses
+ description: |
+ Fetches all of the ticket form statuses specified by a comma separated list of ids.
+
+ #### Allowed For
+
+ * Anyone
+ parameters:
+ - name: ids
+ in: query
+ description: Ticket form status ids to retrieve records for
+ required: true
+ schema:
+ type: string
+ example: abc,def,ghi
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFormStatusesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFormStatusesResponseExample'
+ /api/v2/ticket_forms:
+ get:
+ operationId: ListTicketForms
+ tags:
+ - Ticket Forms
+ summary: List Ticket Forms
+ description: |
+ 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
+ parameters:
+ - name: active
+ in: query
+ description: true returns active ticket forms; false returns inactive ticket forms. If not present, returns both
+ schema:
+ type: boolean
+ - name: end_user_visible
+ in: query
+ description: true returns ticket forms where `end_user_visible`; false returns ticket forms that are not end-user visible. If not present, returns both
+ schema:
+ type: boolean
+ - name: fallback_to_default
+ in: query
+ description: 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
+ schema:
+ type: boolean
+ - name: form_type
+ in: query
+ description: Filter ticket forms by type. Use 'standard' for regular ticket forms, 'service_catalog' for service catalog forms, or 'all' to return all form types
+ schema:
+ type: string
+ enum:
+ - standard
+ - service_catalog
+ - all
+ example: standard
+ - name: associated_to_brand
+ in: query
+ description: true returns the ticket forms of the brand specified by the url's subdomain
+ schema:
+ type: boolean
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ - $ref: '#/components/parameters/IncludeBoundaryIndicators'
+ - $ref: '#/components/parameters/IncludeItemCursors'
+ - name: locale
+ in: query
+ description: Locale to use for the ticket form names. If not specified, the default locale is used.
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFormsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFormsResponseExample'
+ post:
+ operationId: CreateTicketForm
+ tags:
+ - Ticket Forms
+ summary: Create Ticket Form
+ description: |
+ #### Allowed For
+
+ * Admins
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFormResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFormCreateResponseExample'
+ /api/v2/ticket_forms/{ticket_form_id}:
+ parameters:
+ - $ref: '#/components/parameters/TicketFormId'
+ get:
+ operationId: ShowTicketForm
+ tags:
+ - Ticket Forms
+ summary: Show Ticket Form
+ description: |
+ #### Allowed For
+
+ * Admins, Agents, and End Users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFormResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFormResponseExample'
+ put:
+ operationId: UpdateTicketForm
+ tags:
+ - Ticket Forms
+ summary: Update Ticket Form
+ description: |
+ #### Allowed For
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFormResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFormUpdateResponseExample'
+ delete:
+ operationId: DeleteTicketForm
+ tags:
+ - Ticket Forms
+ summary: Delete Ticket Form
+ description: |
+ #### Allowed For
+ * Admins
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/ticket_forms/{ticket_form_id}/clone:
+ parameters:
+ - $ref: '#/components/parameters/TicketFormId'
+ post:
+ operationId: CloneTicketForm
+ tags:
+ - Ticket Forms
+ summary: Clone an Already Existing Ticket Form
+ description: |
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFormResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFormResponseExample'
+ /api/v2/ticket_forms/{ticket_form_id}/ticket_form_statuses:
+ parameters:
+ - $ref: '#/components/parameters/TicketFormId'
+ get:
+ operationId: TicketFormTicketFormStatuses
+ tags:
+ - Ticket Forms
+ - Ticket Form Statuses
+ summary: List Ticket Form Statuses of a Ticket Form
+ description: |
+ Fetches all of the associated ticket form statuses of a ticket form.
+
+ #### Allowed For
+
+ * Anyone
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFormStatusesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFormStatusesResponseExample'
+ post:
+ operationId: CreateTicketFormStatuses
+ tags:
+ - Ticket Forms
+ - Ticket Form Statuses
+ summary: Create Ticket Form Statuses
+ description: |
+ Creates one or many ticket form status associations
+
+ #### Allowed For
+
+ * Admins
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFormStatusesParams'
+ example:
+ ticket_form_status:
+ - custom_status_id: 1234
+ - custom_status_id: 1235
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFormStatusesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFormStatusesResponseExample'
+ put:
+ operationId: UpdateTicketFormStatuses
+ tags:
+ - Ticket Forms
+ - Ticket Form Statuses
+ summary: Bulk Update Ticket Form Statuses of a Ticket Form
+ description: |
+ Updates or deletes ticket form status associations. This is a bulk operation that can both add and remove ticket form status associations for a form in one call.
+
+ #### Allowed For
+
+ * Admins
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateTicketFormStatusesParams'
+ example:
+ ticket_form_status:
+ - _destroy: "1"
+ id: abcdef
+ - custom_status_id: 1
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFormStatusesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFormStatusesResponseExample'
+ delete:
+ operationId: DeleteTicketFormStatuses
+ tags:
+ - Ticket Form Statuses
+ summary: Delete Ticket Form Statuses
+ description: |
+ Deletes all of of the ticket form statuses by id.
+
+ #### Allowed For
+
+ * Admins
+ * Agents
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ id:
+ type: array
+ description: List of ids to delete
+ items:
+ type: string
+ example:
+ id:
+ - abc
+ - def
+ - hij
+ responses:
+ "204":
+ description: Success response
+ /api/v2/ticket_forms/{ticket_form_id}/ticket_form_statuses/{ticket_form_status_id}:
+ parameters:
+ - $ref: '#/components/parameters/TicketFormId'
+ - $ref: '#/components/parameters/TicketFormStatusId'
+ put:
+ operationId: UpdateTicketFormStatusById
+ tags:
+ - Ticket Forms
+ - Ticket Form Statuses
+ summary: Update Ticket Form Status By Id
+ description: |
+ Updates or deletes ticket form status association by id.
+
+ #### Allowed For
+
+ * Admins
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateTicketFormStatusesParams'
+ example:
+ ticket_form_status:
+ - custom_status_id: 1
+ - custom_status_id: 2
+ - custom_status_id: 3
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFormStatusesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFormStatusesResponseExample'
+ delete:
+ operationId: DeleteTicketFormStatusById
+ tags:
+ - Ticket Form Statuses
+ summary: Delete Ticket Form Status By Id
+ description: |
+ Deletes a ticket form status by id.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "204":
+ description: Success response
+ /api/v2/ticket_forms/reorder:
+ put:
+ operationId: ReorderTicketForms
+ tags:
+ - Ticket Forms
+ summary: Reorder Ticket Forms
+ description: |
+ #### 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]"
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFormsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFormsResponseExample'
+ /api/v2/ticket_forms/show_many:
+ get:
+ operationId: ShowManyTicketForms
+ tags:
+ - Ticket Forms
+ summary: Show Many Ticket Forms
+ description: |
+ 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](/documentation/classic-web-widget-sdks/) and the [Web Widget](/api-reference/widget/introduction/).
+
+ #### Allowed For
+
+ * Anyone
+ parameters:
+ - name: ids
+ in: query
+ description: IDs of the ticket forms to be shown
+ required: true
+ schema:
+ type: string
+ example: 1,2,3
+ - $ref: '#/components/parameters/IncludeBoundaryIndicators'
+ - $ref: '#/components/parameters/IncludeItemCursors'
+ - name: active
+ in: query
+ description: true returns active ticket forms; false returns inactive ticket forms. If not present, returns both
+ schema:
+ type: boolean
+ - name: end_user_visible
+ in: query
+ description: true returns ticket forms where `end_user_visible`; false returns ticket forms that are not end-user visible. If not present, returns both
+ schema:
+ type: boolean
+ - name: fallback_to_default
+ in: query
+ description: 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
+ schema:
+ type: boolean
+ - name: associated_to_brand
+ in: query
+ description: true returns the ticket forms of the brand specified by the url's subdomain
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketFormsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketFormsResponseExample'
+ /api/v2/ticket_metrics:
+ get:
+ operationId: ListTicketMetrics
+ tags:
+ - Ticket Metrics
+ summary: List Ticket Metrics
+ description: |
+ 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](https://support.zendesk.com/hc/en-us/articles/203657756) in
+ Zendesk help.
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/CursorPaginationPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketMetricsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketMetricsResponseExample'
+ /api/v2/ticket_metrics/{ticket_metric_id}:
+ get:
+ operationId: ShowTicketMetrics
+ tags:
+ - Ticket Metrics
+ summary: Show Ticket Metrics
+ description: |
+ Returns a specific metric, or the metrics of a specific ticket.
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - name: ticket_metric_id
+ in: path
+ description: The id of the ticket metric to retrieve
+ required: true
+ schema:
+ type: string
+ example: "10001"
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketMetricsByTicketMetricIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketMetricResponseExample'
+ /api/v2/tickets:
+ get:
+ operationId: ListTickets
+ tags:
+ - Tickets
+ summary: List Tickets
+ parameters:
+ - name: external_id
+ in: query
+ description: 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.
+ schema:
+ type: string
+ - $ref: '#/components/parameters/TicketSortBy'
+ - $ref: '#/components/parameters/TicketSortOrder'
+ - $ref: '#/components/parameters/TicketSupportTypeScope'
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ - $ref: '#/components/parameters/TicketsInclude'
+ - name: start_time
+ in: query
+ description: |
+ Unix epoch time to filter tickets. Only tickets created or updated after
+ this time are returned. Example: `?start_time=1332034771`
+ schema:
+ type: integer
+ example: 1332034771
+ responses:
+ "200":
+ description: List tickets
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketsResponseExample'
+ post:
+ operationId: CreateTicket
+ tags:
+ - Tickets
+ summary: Create Ticket
+ parameters:
+ - $ref: '#/components/parameters/TicketsInclude'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketCreateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketCreateRequestExample'
+ responses:
+ "201":
+ description: Create ticket
+ headers:
+ Location:
+ description: The URL of the created ticket
+ schema:
+ type: string
+ format: uri
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketResponseExample'
+ /api/v2/tickets/{ticket_id}:
+ get:
+ operationId: ShowTicket
+ tags:
+ - Tickets
+ summary: Show Ticket
+ description: |-
+ Returns a number of ticket properties, but doesn't include the full comment thread. The initial comment is available in the ticket's [description property](/api-reference/ticketing/tickets/tickets/#json-format). To retrieve all the ticket's comments, use [List Comments](/api-reference/ticketing/tickets/ticket_comments/#list-comments).
+
+ #### Allowed For
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ - $ref: '#/components/parameters/TicketsInclude'
+ - name: reduced_payload_size
+ in: query
+ description: When true, returns a reduced ticket payload (omits null custom fields).
+ schema:
+ type: boolean
+ - name: remove_duplicate_fields
+ in: query
+ description: When true, removes duplicate custom field entries from the response.
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: Ticket
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketResponseExample'
+ put:
+ operationId: UpdateTicket
+ tags:
+ - Tickets
+ summary: Update Ticket
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketUpdateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketUpdateRequestExample'
+ responses:
+ "200":
+ description: Successful request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketUpdateResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketUpdateResponseExample'
+ delete:
+ operationId: DeleteTicket
+ tags:
+ - Tickets
+ summary: Delete Ticket
+ description: |-
+ #### Allowed For
+
+ * Admins
+ * Agents with permission to delete tickets
+
+ Agent delete permissions are set in Support. See
+ [Deleting tickets](https://support.zendesk.com/hc/en-us/articles/203690936)
+ 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](/api-reference/introduction/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](/api-reference/ticketing/tickets/tickets/#bulk-delete-tickets).
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ responses:
+ "204":
+ description: No content
+ /api/v2/tickets/{ticket_id}/audits:
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ get:
+ operationId: ListAuditsForTicket
+ tags:
+ - Ticket Audits
+ summary: List Audits for a Ticket
+ description: |
+ Lists the audits for a specified ticket.
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ **Note**: Audits for [Archived Tickets](https://support.zendesk.com/hc/en-us/articles/4408887617050) do not support pagination for this endpoint.
+
+ #### Allowed for
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ - $ref: '#/components/parameters/IncludeSideloads'
+ - $ref: '#/components/parameters/IncludeBoundaryIndicators'
+ - $ref: '#/components/parameters/IncludeItemCursors'
+ - name: filter_events
+ in: query
+ description: Filter audit events by type. Use the format `filter_events[]=Type1&filter_events[]=Type2`.
+ style: form
+ explode: true
+ schema:
+ type: array
+ items:
+ type: string
+ - $ref: '#/components/parameters/TicketSortOrder'
+ responses:
+ "200":
+ description: OK response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketAuditsResponseNoneCursor'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketAuditsForTicketResponseExample'
+ /api/v2/tickets/{ticket_id}/audits/{ticket_audit_id}:
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ - $ref: '#/components/parameters/TicketAuditId'
+ get:
+ operationId: ShowTicketAudit
+ tags:
+ - Ticket Audits
+ summary: Show Audit
+ description: |
+ #### Allowed for
+
+ * Agents
+ responses:
+ "200":
+ description: OK response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketAuditResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketAuditResponseExample'
+ /api/v2/tickets/{ticket_id}/audits/{ticket_audit_id}/make_private:
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ - $ref: '#/components/parameters/TicketAuditId'
+ put:
+ operationId: MakeTicketCommentPrivateFromAudits
+ tags:
+ - Ticket Audits
+ summary: Change a Comment From Public To Private
+ description: |
+ #### Allowed for
+
+ * Agents
+ responses:
+ "200":
+ description: description
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/tickets/{ticket_id}/audits/count:
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ get:
+ operationId: CountAuditsForTicket
+ tags:
+ - Ticket Audits
+ summary: Count Audits for a Ticket
+ description: |
+ Returns an approximate count of audits for a specified ticket. 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**: If the total number of audits for a ticket exceeds 100,000, this endpoint returns a count of 100,000 with a `count[refreshed_at]` value of null. This value is cached for 24 hours, during which any requests returns the same count and timestamp. After 24 hours, the endpoint temporarily shows the same count again before providing an updated total.
+
+ #### Allowed for
+
+ * Agents
+ responses:
+ "200":
+ description: Count of audits on a ticket
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketAuditsCountResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketAuditsCountResponseExample'
+ /api/v2/tickets/{ticket_id}/collaborators:
+ get:
+ operationId: ListTicketCollaborators
+ tags:
+ - Tickets
+ summary: List Collaborators for a Ticket
+ description: |-
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ListTicketCollaboratorsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ListTicketCollaboratorsResponseExample'
+ /api/v2/tickets/{ticket_id}/comments:
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ get:
+ operationId: ListTicketComments
+ tags:
+ - Ticket Comments
+ summary: List Comments
+ description: |
+ Returns the comments added to the ticket.
+
+ Each comment may include a `content_url` for an attachment or a `recording_url` for a voice comment that points to a file that may be hosted externally. For security reasons, take care not to inadvertently send Zendesk authentication credentials to third parties when attempting to access these files. See [Working with url properties](/documentation/api-basics/best-practices/working-with-url-properties/).
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Sorting
+
+ 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_order` | string | no | One of `asc`, `desc`. Defaults to `asc`
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - name: include_inline_images
+ in: query
+ description: Default is false. When true, inline images are also listed as attachments in the response
+ schema:
+ type: boolean
+ - name: include
+ in: query
+ description: 'Accepts "users". Use this parameter to list email CCs by side-loading users. Example: `?include=users`. **Note**: If the comment source is email, a deleted user will be represented as the CCd email address. If the comment source is anything else, a deleted user will be represented as the user name.'
+ schema:
+ type: string
+ - $ref: '#/components/parameters/PerPage'
+ - name: sort_order
+ in: query
+ description: Sort order. Defaults to "asc"
+ schema:
+ type: string
+ enum:
+ - asc
+ - desc
+ - $ref: '#/components/parameters/CursorPaginationPage'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketCommentsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketCommentsResponseExample'
+ /api/v2/tickets/{ticket_id}/comments/{comment_id}/attachments/{attachment_id}/redact:
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ - $ref: '#/components/parameters/CommentId'
+ - $ref: '#/components/parameters/AttachmentId'
+ put:
+ operationId: RedactCommentAttachment
+ tags:
+ - Attachments
+ summary: Redact Comment Attachment
+ description: |
+ Redaction allows you to permanently remove attachments from an existing comment on a ticket. Once removed from a comment, the attachment is replaced with an empty "redacted.txt" file.
+
+ The redaction is permanent. It is not possible to undo redaction or see what was removed. Once a ticket is closed, redacting its attachments is no longer possible.
+
+ Also, if you want to redact an inline attachment, you can use the `include_inline_images` parameter in the [List Comments](/api-reference/ticketing/tickets/ticket_comments/#list-comments) operation to obtain the inline attachment ID, and use it in the request URL.
+
+ #### Allowed For
+
+ * Admins
+ * Agents when [deleting tickets is enabled for agents on professional accounts](https://support.zendesk.com/hc/en-us/articles/360002128107)
+ * Agents assigned to a custom role with permissions to redact ticket content (Enterprise only)
+ responses:
+ "200":
+ description: OK response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AttachmentResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/AttachmentResponseExample'
+ /api/v2/tickets/{ticket_id}/comments/{ticket_comment_id}/make_private:
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ - $ref: '#/components/parameters/TicketCommentId'
+ put:
+ operationId: MakeTicketCommentPrivate
+ tags:
+ - Ticket Comments
+ summary: Make Comment Private
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: description
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/tickets/{ticket_id}/comments/{ticket_comment_id}/redact:
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ - $ref: '#/components/parameters/TicketCommentId'
+ put:
+ operationId: RedactStringInComment
+ tags:
+ - Ticket Comments
+ summary: Redact String in Comment
+ description: |
+ Permanently removes words or strings from a ticket comment. Specify the string to redact in an object with a `text` property. Example: `'{"text": "987-65-4320"}'`. The characters of the word or string are replaced by the ▇ symbol.
+
+ If the comment was made by email, the endpoint also attempts to redact the string from the original email retained by Zendesk for audit purposes.
+
+ **Note**: If you use the rich text editor, support for redacting formatted text (bold, italics, hyperlinks) is limited.
+
+ Redaction is permanent. You can't undo the redaction or see *what* was removed. Once a ticket is closed, you can no longer redact strings from its comments.
+
+ To use this endpoint, the "Agents can delete tickets" option must be enabled in the Zendesk Support admin interface at **Admin** > **Settings** > **Agents**.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketCommentResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketCommentStringRedactResponseExample'
+ /api/v2/tickets/{ticket_id}/comments/count:
+ get:
+ operationId: CountTicketComments
+ tags:
+ - Ticket Comments
+ summary: Count Ticket Comments
+ description: |-
+ Returns an approximate count of the comments added to the ticket. 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
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ responses:
+ "200":
+ description: Count of ticket comments
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketCommentsCountResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketCommentsCountResponseExample'
+ /api/v2/tickets/{ticket_id}/conversation_log:
+ get:
+ operationId: ListConversationLogForTicket
+ tags:
+ - Conversation Log
+ summary: List Conversation log for Ticket
+ description: |
+ Lists the conversation log events for a specified ticket.
+
+ #### Pagination
+
+ - Cursor pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed for
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ - $ref: '#/components/parameters/CursorPaginationPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ConversationLogResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ConversationLogResponseExample'
+ /api/v2/tickets/{ticket_id}/email_ccs:
+ get:
+ operationId: ListTicketEmailCCs
+ tags:
+ - Tickets
+ summary: List Email CCs for a Ticket
+ description: |-
+ Returns any users cc'd on the ticket.
+
+ #### Availability
+
+ The [CCs and Followers](https://support.zendesk.com/hc/en-us/articles/203690846) 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](/api-reference/ticketing/tickets/tickets/#list-collaborators-for-a-ticket) to list the users cc'ed on the ticket.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ListTicketEmailCCsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ListTicketEmailCCsResponseExample'
+ /api/v2/tickets/{ticket_id}/followers:
+ get:
+ operationId: ListTicketFollowers
+ tags:
+ - Tickets
+ summary: List Followers for a Ticket
+ description: |-
+ Returns any users who follow the ticket.
+
+ #### Availability
+
+ The [CCs and Followers](https://support.zendesk.com/hc/en-us/articles/203690846) feature must be enabled in Zendesk Support.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ListTicketFollowersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ListTicketFollowersResponseExample'
+ /api/v2/tickets/{ticket_id}/incidents:
+ get:
+ operationId: ListTicketIncidents
+ tags:
+ - Tickets
+ summary: List Ticket Incidents
+ description: |-
+ #### Allowed For
+
+ * Agents
+
+ #### Pagination
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ListTicketIncidentsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ListTicketIncidentsResponseExample'
+ /api/v2/tickets/{ticket_id}/macros/{macro_id}/apply:
+ parameters:
+ - $ref: '#/components/parameters/MacroId'
+ - name: ticket_id
+ in: path
+ description: The ID of the ticket
+ required: true
+ schema:
+ type: integer
+ example: 35436
+ get:
+ operationId: ShowTicketAfterChanges
+ tags:
+ - Macros
+ summary: Show Ticket After Changes
+ description: |
+ Returns the full ticket object as it would be after applying the macro to the ticket.
+ It doesn't actually change the ticket.
+
+ To get only the ticket fields that would be changed by the macro,
+ see [Show Changes to Ticket](#show-changes-to-ticket).
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MacroApplyTicketResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/MacroChangesToTicketsResponseExample'
+ /api/v2/tickets/{ticket_id}/mark_as_spam:
+ put:
+ operationId: MarkTicketAsSpamAndSuspendRequester
+ tags:
+ - Tickets
+ summary: Mark Ticket as Spam and Suspend Requester
+ description: |-
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ type: string
+ example: ""
+ example: ""
+ /api/v2/tickets/{ticket_id}/merge:
+ post:
+ operationId: MergeTicketsIntoTargetTicket
+ tags:
+ - Tickets
+ summary: Merge Tickets into Target Ticket
+ description: |-
+ Merges one or more tickets into the ticket with the specified id.
+
+ See [Merging tickets](https://support.zendesk.com/hc/en-us/articles/203690916)
+ 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](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#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)](https://support.zendesk.com/hc/en-us/articles/203662026)
+ 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.
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketMergeInput'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketMergeInputExample'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusResponseExample'
+ /api/v2/tickets/{ticket_id}/metrics:
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ get:
+ operationId: ShowTicketMetricsByTicket
+ tags:
+ - Ticket Metrics
+ - Tickets
+ summary: Show Ticket Metrics By Ticket
+ description: |
+ Returns the metrics for a specific ticket.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketMetricsByTicketMetricIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketMetricResponseExample'
+ /api/v2/tickets/{ticket_id}/related:
+ get:
+ operationId: TicketRelatedInformation
+ tags:
+ - Tickets
+ summary: Ticket Related Information
+ description: |-
+ The request returns a data object with the following properties:
+
+ | Name | Type | Comment
+ | ------------------- | ------- | -------
+ | topic_id | string | Related topic in the Web portal (deprecated feature)
+ | jira_issue_ids | array | Array of associated jira issues
+ | 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
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketRelatedInformation'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketRelatedInformationExample'
+ /api/v2/tickets/{ticket_id}/satisfaction_rating:
+ parameters:
+ - name: ticket_id
+ in: path
+ description: The id of the ticket
+ required: true
+ schema:
+ type: integer
+ example: 35436
+ post:
+ operationId: CreateTicketSatisfactionRating
+ tags:
+ - Satisfaction Ratings
+ summary: Create a Satisfaction Rating
+ description: |
+ 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.
+
+ Only "good" and "bad" are valid values for the score when creating a rating. Other states, like "offered", are not valid and will result in a 422 error.
+
+ #### Allowed For
+
+ * End user who requested the ticket
+
+ The end user must be a verified user.
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SatisfactionRatingResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SatisfactionRatingResponseExample'
+ /api/v2/tickets/{ticket_id}/skips:
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ - $ref: '#/components/parameters/TicketSortOrder'
+ get:
+ operationId: ListTicketSkipsByTicket
+ tags:
+ - Ticket Skips
+ - Tickets
+ summary: List Ticket Skips By Ticket
+ description: |
+ Returns the skips for a specific ticket.
+
+ Archived tickets are not included in the response. See
+ [About archived tickets](https://support.zendesk.com/hc/en-us/articles/203657756) in
+ the Support Help Center.
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/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
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketSkipsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketSkipResponseExample'
+ /api/v2/tickets/{ticket_id}/tags:
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ get:
+ operationId: ListResourceTags
+ tags:
+ - Tags
+ summary: List Resource Tags
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TagsByObjectIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TagsByObjectIdResponse'
+ post:
+ operationId: SetTagsTicket
+ tags:
+ - Tags
+ summary: Set Tags
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TagsByObjectIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TagsByObjectIdResponse'
+ put:
+ operationId: PutTagsTicket
+ tags:
+ - Tags
+ summary: Add Tags
+ description: |
+ You can also add tags to multiple tickets with the [Update Many
+ Tickets](/api-reference/ticketing/tickets/tickets/#update-many-tickets) endpoint.
+
+ #### Safe Update
+
+ If the same ticket is updated by multiple API requests at
+ the same time, some tags could be lost because of ticket
+ update collisions. Include `updated_stamp` and `safe_update`
+ properties in the request body to make a safe update.
+
+ For `updated_stamp`, retrieve and specify the ticket's
+ latest `updated_at` timestamp. The tag update only occurs
+ if the `updated_stamp` timestamp matches the ticket's
+ actual `updated_at` timestamp at the time of the request.
+ If the timestamps don't match (in other words, if the
+ ticket was updated since you retrieved the ticket's
+ last `updated_at` timestamp), the request returns a
+ 409 Conflict error.
+
+ #### Example
+
+ ```js
+ {
+ "tags": ["customer"],
+ "updated_stamp":"2019-09-12T21:45:16Z",
+ "safe_update":"true"
+ }
+ ```
+
+ For details, see [Protecting against ticket update collisions](/api-reference/ticketing/tickets/tickets/#protecting-against-ticket-update-collisions).
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TagsByObjectIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TagsByObjectIdResponse'
+ delete:
+ operationId: DeleteTagsTicket
+ tags:
+ - Tags
+ summary: Remove Tags
+ description: |
+ You can also delete tags from multiple tickets with the
+ [Update Many Tickets](/api-reference/ticketing/tickets/tickets/#update-many-tickets) endpoint.
+
+ This endpoint supports safe updates. See [Safe Update](/api-reference/ticketing/ticket-management/tags/#safe-update).
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - name: tags
+ in: query
+ description: Comma-separated list of tags to remove from the ticket.
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TagsByObjectIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TagsRemoveResponseExample'
+ /api/v2/tickets/{ticket_id}/task_lists:
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ get:
+ operationId: ShowTaskList
+ tags:
+ - Task Lists
+ summary: Show Task List
+ description: |
+ Returns the task list attached to the specified ticket. If the ticket doesn't have a task list, an empty array is returned.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaskListByTicketIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TaskListByTicketIdResponseExample'
+ post:
+ operationId: CreateTaskList
+ tags:
+ - Task Lists
+ summary: Create Task List
+ description: |-
+ Adds a task list to the specified ticket.
+
+ #### Allowed For
+
+ * Agents
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaskListCreateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/TaskListCreateRequestExample'
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaskListByTicketIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TaskListByTicketIdResponseExample'
+ /api/v2/tickets/count:
+ get:
+ operationId: CountTickets
+ tags:
+ - Tickets
+ summary: Count Tickets
+ description: |-
+ 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
+ responses:
+ "200":
+ description: Count of tickets
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ count:
+ type: object
+ properties:
+ refreshed_at:
+ type: string
+ format: date-time
+ value:
+ type: integer
+ examples:
+ default:
+ value:
+ count:
+ refreshed_at: "2020-04-06T02:18:17Z"
+ value: 102
+ /api/v2/tickets/create_many:
+ post:
+ operationId: TicketsCreateMany
+ tags:
+ - Tickets
+ summary: Create Many Tickets
+ description: |-
+ 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](/api-reference/ticketing/tickets/ticket_import/#ticket-bulk-import) endpoint.
+
+ This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
+
+ #### Allowed For
+ * Agents
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketsCreateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketsCreateRequestExample'
+ responses:
+ "200":
+ description: Create many tickets
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusResponseExample'
+ /api/v2/tickets/destroy_many:
+ delete:
+ operationId: BulkDeleteTickets
+ tags:
+ - Tickets
+ summary: Bulk Delete Tickets
+ description: |-
+ 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](https://support.zendesk.com/hc/en-us/articles/203690936)
+ in the Support Help Center.
+
+ This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
+ parameters:
+ - $ref: '#/components/parameters/TicketIds'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusResponseExample'
+ /api/v2/tickets/mark_many_as_spam:
+ put:
+ operationId: MarkManyTicketsAsSpam
+ tags:
+ - Tickets
+ summary: Bulk Mark Tickets as Spam
+ description: |-
+ Accepts a comma-separated list of up to 100 ticket ids.
+
+ This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/TicketIds'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusResponseExample'
+ /api/v2/tickets/recent:
+ get:
+ operationId: ListRecentTickets
+ tags:
+ - Tickets
+ summary: List Recent Tickets
+ description: |-
+ Lists tickets that the requesting agent recently viewed in the agent interface, not recently created or updated tickets.
+
+ #### Allowed For
+ * Agents
+ responses:
+ "200":
+ description: List recently viewed tickets
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketsResponseExample'
+ /api/v2/tickets/show_many:
+ get:
+ operationId: TicketsShowMany
+ tags:
+ - Tickets
+ summary: Show Multiple Tickets
+ description: |-
+ Accepts a comma-separated list of ticket ids to return.
+
+ This endpoint will return up to 100 tickets records.
+
+ #### Allowed For
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/TicketIds'
+ - name: include
+ in: query
+ description: |
+ A comma-separated list of sideloads to include.
+ schema:
+ type: string
+ responses:
+ "200":
+ description: List tickets
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketsResponseExample'
+ /api/v2/tickets/update_many:
+ put:
+ operationId: TicketsUpdateMany
+ tags:
+ - Tickets
+ summary: Update Many Tickets
+ description: Accepts an array of up to 100 ticket objects, or a comma-separated list of up to 100 ticket ids.
+ parameters:
+ - name: ids
+ in: query
+ description: Comma-separated list of ticket ids
+ schema:
+ type: string
+ example: 35436,35437
+ requestBody:
+ description: Ticket object for bulk updates (with ids query parameter) or array of ticket objects for batch updates
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketsUpdateRequest'
+ examples:
+ batch_update:
+ $ref: '#/components/examples/TicketsUpdateRequestBatchUpdateExample'
+ bulk_update_tags:
+ $ref: '#/components/examples/TicketsUpdateRequestBulkUpdateTagsExample'
+ default:
+ $ref: '#/components/examples/TicketsUpdateRequestDefaultExample'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusResponseExample'
+ /api/v2/trigger_categories:
+ get:
+ operationId: ListTriggerCategories
+ tags:
+ - Trigger Categories
+ summary: List Ticket Trigger Categories
+ description: |
+ Returns all the ticket trigger categories in the account.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+ parameters:
+ - name: page
+ in: query
+ description: Pagination parameters
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ properties:
+ after:
+ type: string
+ before:
+ type: string
+ size:
+ type: integer
+ example:
+ after: eyJvIjoiLXNjb3JlLGlkIiwidiI6ImFRSUFBQUFBQUFBQWFRMHBJUUVBQUFBQSJ9
+ before: eyJvIjoiLXNjb3JlLGlkIiwidiI6ImFRSUFBQUFBQUFBQWFRMHBJUUVBQUFBQSJ9
+ size: 50
+ - name: sort
+ in: query
+ description: Sort parameters
+ schema:
+ type: string
+ enum:
+ - position
+ - -position
+ - name
+ - -name
+ - created_at
+ - -created_at
+ - updated_at
+ - -updated_at
+ - name: include
+ in: query
+ description: Allowed sideloads
+ schema:
+ type: string
+ enum:
+ - rule_counts
+ responses:
+ "200":
+ description: A paged array of ticket trigger categories
+ content:
+ application/json:
+ schema:
+ allOf:
+ - $ref: '#/components/schemas/TriggerCategoriesResponse'
+ - $ref: '#/components/schemas/Pagination'
+ example:
+ links:
+ next: https://{subdomain}.zendesk.com/api/v2/trigger_categories?include=rule_counts&page[after]=eyJvIjoiLXNjb3JlLGlkIiwidiI6ImFRSUFBQUFBQUFBQWFRMHBJUUVBQUFBQSJ9&page[size]=2&sort=position
+ prev: https://{subdomain}.zendesk.com/api/v2/trigger_categories?include=rule_counts&page[before]=eyJvIjoiLXNjb3JlLGlkIiwidiI6ImFRSUFBQUFBQUFBQWFRMHBJUUVBQUFBQSJ9&page[size]=2&sort=position
+ meta:
+ after_cursor: eyJvIjoiLXNjb3JlLGlkIiwidiI6ImFRSUFBQUFBQUFBQWFRMHBJUUVBQUFBQSJ9
+ before_cursor: eyJvIjoiLXNjb3JlLGlkIiwidiI6ImFRSUFBQUFBQUFBQWFRMHBJUUVBQUFBQSJ9
+ has_more: true
+ trigger_categories:
+ - created_at: "2020-07-17T01:30:07Z"
+ id: "10001"
+ name: Email Triggers
+ position: 0
+ updated_at: "2020-07-17T01:30:07Z"
+ - created_at: "2020-07-17T01:30:07Z"
+ id: "10002"
+ name: SMS Triggers
+ position: 1
+ updated_at: "2020-07-17T01:30:07Z"
+ "400":
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Errors'
+ example:
+ errors:
+ - code: InvalidPaginationParameter
+ title: page[after] is not valid
+ "403":
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Errors'
+ example:
+ errors:
+ - code: TriggerCategoriesNotEnabled
+ title: Ticket trigger categories are not enabled for your account
+ post:
+ operationId: CreateTriggerCategory
+ tags:
+ - Trigger Categories
+ summary: Create Ticket Trigger Category
+ description: Creates a ticket trigger category.
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ trigger_category:
+ type: object
+ properties:
+ name:
+ type: string
+ position:
+ type: integer
+ format: int64
+ required:
+ - name
+ example:
+ trigger_category:
+ name: All Notification Triggers
+ position: 0
+ responses:
+ "200":
+ description: The created ticket trigger category
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggerCategoryResponse'
+ example:
+ trigger_category:
+ created_at: "2020-07-17T01:30:07Z"
+ id: "10001"
+ name: All Notification Triggers
+ position: 0
+ updated_at: "2020-07-17T01:30:07Z"
+ "400":
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Errors'
+ example:
+ errors:
+ - code: InvalidTriggerCategory
+ title: Name cannot be blank
+ "403":
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Errors'
+ example:
+ errors:
+ - code: TriggerCategoriesNotEnabled
+ title: Ticket trigger categories are not enabled for your account
+ - code: ProductLimitExceeded
+ title: Your account has reached the limit of 500 ticket trigger categories.
+ /api/v2/trigger_categories/{trigger_category_id}:
+ get:
+ operationId: ShowTriggerCategoryById
+ tags:
+ - Trigger Categories
+ summary: Show Ticket Trigger Category
+ description: Returns the ticket trigger category with the specified ID.
+ parameters:
+ - name: trigger_category_id
+ in: path
+ description: The id of the ticket trigger category to retrieve
+ required: true
+ schema:
+ type: string
+ example: "10001"
+ responses:
+ "200":
+ description: The requested ticket trigger category
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggerCategoryResponse'
+ example:
+ trigger_category:
+ created_at: "2020-07-17T01:30:07Z"
+ id: "10001"
+ name: All Notification Triggers
+ position: 0
+ updated_at: "2020-07-17T01:30:07Z"
+ "404":
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Errors'
+ example:
+ errors:
+ - code: TriggerCategoryNotFound
+ title: Category can’t be found. Check the ID and try again.
+ patch:
+ operationId: UpdateTriggerCategory
+ tags:
+ - Trigger Categories
+ summary: Update Ticket Trigger Category
+ description: Updates the ticket trigger category with the specified ID.
+ parameters:
+ - name: trigger_category_id
+ in: path
+ description: The id of the ticket trigger category to update
+ required: true
+ schema:
+ type: string
+ example: "10001"
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ trigger_category:
+ $ref: '#/components/schemas/TriggerCategoryRequest'
+ example:
+ trigger_category:
+ name: All Notification Triggers Updated
+ position: 10
+ responses:
+ "200":
+ description: The updated trigger category
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggerCategoryResponse'
+ example:
+ trigger_category:
+ created_at: "2020-07-17T01:30:07Z"
+ id: "10001"
+ name: All Notification Triggers Updated
+ position: 10
+ updated_at: "2020-07-18T05:23:32Z"
+ "400":
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Errors'
+ example:
+ errors:
+ - code: InvalidTriggerCategory
+ title: Name cannot be blank
+ "404":
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Errors'
+ example:
+ errors:
+ - code: TriggerCategoryNotFound
+ title: Category can’t be found. Check the ID and try again.
+ delete:
+ operationId: DeleteTriggerCategory
+ tags:
+ - Trigger Categories
+ summary: Delete Ticket Trigger Category
+ description: Deletes the ticket trigger category with the specified ID.
+ parameters:
+ - name: trigger_category_id
+ in: path
+ description: The id of the ticket trigger category to delete
+ required: true
+ schema:
+ type: string
+ example: "10001"
+ responses:
+ "204":
+ description: No content
+ "400":
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Errors'
+ example:
+ errors:
+ - code: TriggerCategoryNotEmpty
+ title: A category with active ticket triggers cannot be deleted.
+ "404":
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Errors'
+ example:
+ errors:
+ - code: TriggerCategoryNotFound
+ title: Category can’t be found. Check the ID and try again.
+ /api/v2/trigger_categories/jobs:
+ post:
+ operationId: BatchOperateTriggerCategories
+ tags:
+ - Trigger Categories
+ summary: Create Batch Job for Ticket Trigger Categories
+ description: Creates a job that performs a batch operation for the given ticket trigger categories.
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BatchJobRequest'
+ example:
+ job:
+ action: patch
+ items:
+ trigger_categories:
+ - id: "10001"
+ position: 0
+ - id: "10002"
+ position: 1
+ triggers:
+ - active: false
+ category_id: "10001"
+ id: "10011"
+ position: 10
+ - active: true
+ category_id: "10002"
+ id: "10012"
+ position: 1
+ responses:
+ "200":
+ description: The response to the batch job
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BatchJobResponse'
+ example:
+ results:
+ trigger_categories:
+ - created_at: "2020-07-18T01:24:53Z"
+ id: "10001"
+ name: Notifications
+ position: 0
+ updated_at: "2020-07-20T01:30:07Z"
+ - created_at: "2020-07-17T06:31:12Z"
+ id: "10002"
+ name: Apply Tags
+ position: 1
+ updated_at: "2020-07-20T01:30:07Z"
+ triggers:
+ - actions:
+ - { }
+ active: true
+ conditions: { }
+ created_at: "2012-09-25T22:50:26Z"
+ description: Notify external target
+ id: 10012
+ position: 1
+ raw_title: Notify target
+ title: Notify Target
+ updated_at: "2020-07-20T01:30:07Z"
+ url: http://{subdomain}.zendesk.com/api/v2/triggers/10012
+ - actions:
+ - { }
+ active: false
+ conditions: { }
+ created_at: "2012-09-25T22:50:26Z"
+ description: Close and save a ticket
+ id: 10011
+ position: 10
+ raw_title: Close and Save
+ title: Close and Save
+ updated_at: "2020-07-20T01:30:07Z"
+ url: http://{subdomain}.zendesk.com/api/v2/triggers/10011
+ status: complete
+ "400":
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BatchJobResponse'
+ example:
+ errors:
+ - code: InvalidTrigger
+ title: category_id is not valid
+ trigger_id: "10001"
+ status: failed
+ /api/v2/triggers:
+ get:
+ operationId: ListTriggers
+ tags:
+ - Triggers
+ summary: List Ticket Triggers
+ description: |
+ Lists all ticket triggers for the current account.
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Agents
+
+ #### Sideloads
+
+ The following sideloads are supported. The usage sideloads are only supported on the Support Professional or Suite Growth plan or above.
+
+ | Name | Will sideload
+ | ---------------- | -------------
+ | app_installation | The app installation that requires each trigger, if present
+ | permissions | The permissions for each trigger
+ | usage_1h | The number of times each trigger has been used in the past hour
+ | usage_24h | The number of times each trigger has been used in the past day
+ | usage_7d | The number of times each trigger has been used in the past week
+ | usage_30d | The number of times each trigger has been used in the past thirty days
+ parameters:
+ - $ref: '#/components/parameters/TriggerActive'
+ - $ref: '#/components/parameters/TriggerSort'
+ - $ref: '#/components/parameters/TriggerSortBy'
+ - $ref: '#/components/parameters/TriggerSortOrder'
+ - $ref: '#/components/parameters/TriggerCategoryId'
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/TriggerInclude'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TriggersResponseExample'
+ post:
+ operationId: CreateTrigger
+ tags:
+ - Triggers
+ summary: Create Trigger
+ description: |
+ #### Allowed For
+
+ * Agents
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggerWithCategoryRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/TriggerWithCategoryRequestExample'
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggerResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TriggerResponseExample'
+ /api/v2/triggers/{trigger_id}:
+ parameters:
+ - $ref: '#/components/parameters/TriggerId'
+ get:
+ operationId: GetTrigger
+ tags:
+ - Triggers
+ summary: Show Ticket Trigger
+ description: |
+ #### Allowed For
+
+ * Agents
+
+ The Via Type value is a number instead of a text string. See [Via types reference](/documentation/ticketing/reference-guides/via-types/) for the keys.
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggerResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TriggerResponseExample'
+ put:
+ operationId: UpdateTrigger
+ tags:
+ - Triggers
+ summary: Update Ticket Trigger
+ description: |
+ #### Allowed For
+
+ * Agents
+
+ #### Note
+
+ Updating a condition or action updates both the conditions and actions arrays,
+ clearing all existing values of both arrays. Include all your conditions
+ and actions when updating any condition or action.
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggerWithCategoryRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/TriggerWithCategoryRequestExample'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggerResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TriggerResponseExample'
+ delete:
+ operationId: DeleteTrigger
+ tags:
+ - Triggers
+ summary: Delete Ticket Trigger
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/triggers/{trigger_id}/revisions:
+ parameters:
+ - $ref: '#/components/parameters/TriggerId'
+ get:
+ operationId: ListTriggerRevisions
+ tags:
+ - Triggers
+ summary: List Ticket Trigger Revisions
+ description: |
+ List the revisions associated with a ticket trigger. Ticket trigger revision history is only available on Enterprise plans.
+
+ #### Allowed For
+
+ * Agents
+
+ #### Sideloads
+
+ The following sideloads are supported:
+
+ | Name | Will sideload
+ | ----- | -------------
+ | users | The user that authored each revision
+
+ #### Pagination
+
+ This endpoint uses cursor-based pagination. The records are ordered in
+ descending order by the `created_at` timestamp, then by `id` on duplicate
+ `created_at` values.
+
+ The `cursor` parameter is a non-human-readable argument you can use to move
+ forward or backward in time.
+
+ Each JSON response will contain the following attributes to help you get
+ more results:
+
+ - `after_url` requests more recent results
+ - `before_url` requests older results
+ - `after_cursor` is the cursor to build the request yourself
+ - `before_cursor` is the cursor to build the request yourself
+
+ The properties are null if no more records are available.
+
+ You can request a maximum of 1000 records using the `limit` parameter. If
+ no `limit` parameter is supplied, it will default to 1,000.
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggerRevisionsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TriggerRevisionsResponseExample'
+ /api/v2/triggers/{trigger_id}/revisions/{trigger_revision_id}:
+ parameters:
+ - $ref: '#/components/parameters/TriggerId'
+ - $ref: '#/components/parameters/TriggerRevisionId'
+ get:
+ operationId: TriggerRevision
+ tags:
+ - Triggers
+ summary: Show Ticket Trigger Revision
+ description: |
+ Fetches a revision associated with a ticket trigger. Ticket trigger revision history is only available on Enterprise plans.
+
+ #### Allowed For
+
+ * Agents
+
+ #### Sideloads
+
+ The following sideloads are supported:
+
+ | Name | Will sideload
+ | ----- | -------------
+ | users | The user that authored each revision
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggerRevisionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TriggerRevisionResponseExample'
+ /api/v2/triggers/active:
+ parameters:
+ - $ref: '#/components/parameters/TriggerSort'
+ - $ref: '#/components/parameters/TriggerSortBy'
+ - $ref: '#/components/parameters/TriggerSortOrder'
+ - $ref: '#/components/parameters/TriggerCategoryId'
+ get:
+ operationId: ListActiveTriggers
+ tags:
+ - Triggers
+ summary: List Active Ticket Triggers
+ description: |
+ Lists all active ticket triggers.
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+ #### Allowed For
+
+ * Agents
+
+ #### Sideloads
+
+ The following sideloads are supported:
+
+ | Name | Will sideload
+ | ---------------- | -------------
+ | app_installation | The app installation that requires each ticket trigger, if present
+ | permissions | The permissions for each trigger
+ | usage_1h | The number of times each ticket trigger has been used in the past hour
+ | usage_24h | The number of times each ticket trigger has been used in the past day
+ | usage_7d | The number of times each ticket trigger has been used in the past week
+ | usage_30d | The number of times each ticket trigger has been used in the past thirty days
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TriggersActiveResponseExample'
+ /api/v2/triggers/definitions:
+ get:
+ operationId: ListTriggerActionConditionDefinitions
+ tags:
+ - Triggers
+ summary: List Ticket Trigger Action and Condition Definitions
+ description: |
+ Returns the definitions of the actions a ticket trigger can perform and the
+ definitions of the conditions under which a ticket trigger can execute. The
+ definition of the action includes a title ("Status"), a type ("list"), and
+ possible values. The definition of the condition includes the same fields
+ as well as the possible operators.
+
+ For a list of supported actions, see the [Actions reference](/documentation/ticketing/reference-guides/actions-reference)
+ For a list of supported conditions, see the [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference)
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggerDefinitionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TriggerDefinitionResponseExample'
+ /api/v2/triggers/destroy_many:
+ parameters:
+ - $ref: '#/components/parameters/TriggerIds'
+ delete:
+ operationId: DeleteManyTriggers
+ tags:
+ - Triggers
+ summary: Bulk Delete Ticket Triggers
+ description: |
+ Deletes the ticket triggers corresponding to the provided comma-separated list of IDs.
+
+ #### Allowed For
+
+ * Agents
+
+ #### Request Parameters
+
+ The DELETE request takes one parameter, an `ids` object that lists the
+ ticket triggers to delete.
+
+ | Name | Description
+ | ---- | -----------
+ | ids | The IDs of the triggers to delete
+
+ #### Example request
+
+ ```js
+ {
+ "ids": "25,23,27,22"
+ }
+ ```
+ responses:
+ "204":
+ description: No content response
+ /api/v2/triggers/reorder:
+ put:
+ operationId: ReorderTriggers
+ tags:
+ - Triggers
+ summary: Reorder Ticket Triggers
+ description: |
+ Alters the firing order of ticket triggers in the account. See
+ [Reordering and sorting triggers](https://support.zendesk.com/hc/en-us/articles/115015696088)
+ in the Zendesk Help Center. The firing order is set in a `trigger_ids` array in the request body.
+
+ You must include every ticket trigger id in your account to reorder the ticket triggers. If not, the endpoint will return 404 Forbidden.
+
+ Reordering ticket triggers via the API is not permitted if you have more than one ticket trigger category. If there is more than one
+ ticket trigger category, the endpoint will return a `LimitOneCategory` error.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggerResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TriggerResponseExample'
+ /api/v2/triggers/search:
+ parameters:
+ - $ref: '#/components/parameters/TriggerSearchQuery'
+ - $ref: '#/components/parameters/TriggerSearchFilter'
+ - $ref: '#/components/parameters/TriggerActive'
+ - $ref: '#/components/parameters/TriggerSort'
+ - $ref: '#/components/parameters/TriggerSortBy'
+ - $ref: '#/components/parameters/TriggerSortOrder'
+ - $ref: '#/components/parameters/TriggerInclude'
+ get:
+ operationId: SearchTriggers
+ tags:
+ - Triggers
+ summary: Search Ticket Triggers
+ description: |
+ #### Pagination
+
+ * Offset pagination only
+
+ See [Using Offset Pagination](/api-reference/introduction/pagination/#using-offset-pagination).
+
+ #### Allowed For
+
+ * Agents
+
+ #### Sideloads
+
+ The following sideloads are supported. For more information, see [Side-loading](/documentation/ticketing/using-the-zendesk-api/side_loading/).
+
+ | Name | Will sideload
+ | ---------------- | -------------
+ | app_installation | The app installation that requires each ticket trigger, if present
+ | permissions | The permissions for each ticket trigger
+ | usage_1h | The number of times each ticket trigger has been used in the past hour
+ | usage_24h | The number of times each ticket trigger has been used in the past day
+ | usage_7d | The number of times each ticket trigger has been used in the past week
+ | usage_30d | The number of times each ticket trigger has been used in the past thirty days
+
+ #### Filter
+
+ Use the `filter` query parameter to filter a ticket trigger search by one or more attributes. For example, the following `filter` argument filters ticket triggers by the `description` attribute:
+
+ ```json
+ {
+ "json": {
+ "description": "Close a ticket"
+ }
+ }
+ ```
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TriggersSearchResponseExample'
+ /api/v2/triggers/update_many:
+ put:
+ operationId: UpdateManyTriggers
+ tags:
+ - Triggers
+ summary: Update Many Ticket Triggers
+ description: |
+ Updates the position or the active status of multiple ticket triggers. Any additional properties are ignored.
+
+ #### Allowed For
+
+ * Agents
+
+ #### Request Parameters
+
+ The PUT request expects a `triggers` object that lists the ticket triggers to update.
+
+ Each ticket trigger may have the following properties:
+
+ | Name | Mandatory | Description
+ | -------- | --------- | -----------
+ | id | yes | The ID of the ticket trigger to update
+ | position | no | The new position of the ticket trigger
+ | active | no | The active status of the ticket trigger (true or false)
+ | category_id | no | The ID of the new category the ticket trigger is to be moved to
+
+ #### Example Request
+
+ ```js
+ {
+ "triggers": [
+ {"id": 25, "position": 3},
+ {"id": 23, "position": 5},
+ {"id": 27, "position": 9},
+ {"id": 22, "position": 7}
+ ]
+ }
+ ```
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggerBulkUpdateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/TriggerBulkUpdateRequestExample'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TriggersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TriggersResponseExample'
+ /api/v2/uploads:
+ post:
+ operationId: UploadFiles
+ tags:
+ - Attachments
+ summary: Upload Files
+ description: |
+ Uploads a file that can be attached to a ticket comment. It doesn't attach the file to the comment. For details and examples, see [Attaching ticket comments with the API](/documentation/ticketing/managing-tickets/adding-ticket-attachments-with-the-api/).
+
+ The endpoint has a required `filename` query parameter. The parameter specifies what the file will be named when attached to the ticket comment (to give the agent more context about the file). The parameter does not specify the file on the local system to be uploaded. While the two names can be different, their file extensions must be the same. If they don't match, the agent's browser or file reader could give an error when attempting to open the attachment.
+
+ The `Content-Type` header must contain a recognized MIME type that correctly describes the type of the uploaded file. Failing to send a recognized, correct type may cause undesired behavior. For example, in-browser audio playback may be interrupted by the browser's security mechanisms for MP3s uploaded with an incorrect type.
+
+ Adding multiple files to the same upload is handled by splitting requests and passing the API token received from the first request to each subsequent request. The token is valid for 60 minutes.
+
+ **Note**: Even if [private attachments](https://support.zendesk.com/hc/en-us/articles/204265396) are enabled in the Zendesk Support instance, uploaded files are visible to any authenticated user at the `content_URL` specified in the [JSON response](#json-format) until the upload token is consumed. Once a file is associated with a ticket or post, visibility is restricted to users with access to the ticket or post with the attachment.
+
+ #### Allowed For
+
+ * End users
+ parameters:
+ - name: filename
+ in: query
+ description: The name to assign to the uploaded file
+ required: true
+ schema:
+ type: string
+ example: my_document.pdf
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AttachmentUploadResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/AttachmentUploadResponseExample'
+ /api/v2/uploads/{token}:
+ delete:
+ operationId: DeleteUpload
+ tags:
+ - Attachments
+ summary: Delete Upload
+ description: |
+ #### Allowed for
+
+ * End Users
+ parameters:
+ - name: token
+ in: path
+ description: The token of the uploaded attachment
+ required: true
+ schema:
+ type: string
+ example: 6bk3gql82em5nmf
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/user_fields:
+ get:
+ operationId: ListUserFields
+ tags:
+ - User Fields
+ summary: List User Fields
+ description: |
+ Returns a list of custom user fields in your account. Fields are returned in the order that you specify in your user fields configuration in Zendesk Support. Clients should cache this resource for the duration of their API usage and map the key for each User Field to the values returned under the `user_fields` attribute on the [User](/api-reference/ticketing/users/users/) resource.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/CursorPaginationPage'
+ - name: resolve_dc
+ in: query
+ description: If true, resolves dynamic content placeholders.
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserFieldsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserFieldsResponseExample'
+ post:
+ operationId: CreateUserField
+ tags:
+ - User Fields
+ summary: Create User Field
+ description: |
+ Creates any of the following custom field types:
+
+ * text (default when no "type" is specified)
+ * textarea
+ * checkbox
+ * date
+ * integer
+ * decimal
+ * regexp
+ * dropdown
+ * lookup
+ * multiselect
+
+ See [About custom field types](https://support.zendesk.com/hc/en-us/articles/203661866) in Zendesk help.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserFieldResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserFieldCreateResponseExample'
+ /api/v2/user_fields/{user_field_id}:
+ parameters:
+ - $ref: '#/components/parameters/UserFieldId'
+ get:
+ operationId: ShowUserField
+ tags:
+ - User Fields
+ summary: Show User Field
+ description: |
+ #### Allowed for
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserFieldResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserFieldResponseExample'
+ put:
+ operationId: UpdateUserField
+ tags:
+ - User Fields
+ summary: Update User Field
+ description: |
+ #### Updating a Dropdown (Tagger) or Multiselect Field
+
+ Dropdown and multiselect fields return an array of `custom_field_options` which specify the name, value, and order of the list of dropdown or multiselect options.
+ Understand the following behavior when updating a dropdown or multiselect field:
+
+ - All options must be passed on update. Options that are not passed will be removed. As a result, these values will be removed from any organizations.
+ - To create a new option, pass a null `id` along with `name` and `value`.
+ - To update an existing option, pass its `id` along with `name` and `value`.
+ - To re-order an option, reposition it in the `custom_field_options` array relative to the other options.
+ - To remove an option, omit it from the list of options upon update.
+
+ #### Example Request
+
+ ```bash
+ curl https://{subdomain}.zendesk.com/api/v2/user_fields/{user_field_id} \
+ -H "Content-Type: application/json" -X PUT \
+ -d '{"user_field": {"custom_field_options": [{"id": 124, "name": "Option 2", "value": "option_2"}, {"id": 123, "name": "Option 1", "value": "option_1"}, {"id": 125, "name": "Option 2", "value": "option_3"}]}}' \
+ -v -u {email_address}/token:{api_token}
+ ```
+ #### Allowed for
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserFieldResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserFieldUpdateResponseExample'
+ delete:
+ operationId: DeleteUserField
+ tags:
+ - User Fields
+ summary: Delete User Field
+ description: |
+ #### Allowed for
+
+ * Admins
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/user_fields/{user_field_id}/options:
+ parameters:
+ - $ref: '#/components/parameters/UserFieldId'
+ get:
+ operationId: ListUserFieldOptions
+ tags:
+ - User Fields
+ summary: List User Field Options
+ description: |
+ Returns a list of custom user field options for the given dropdown user field.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomFieldOptionsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomUserFieldOptionsResponseExample'
+ post:
+ operationId: CreateOrUpdateUserFieldOption
+ tags:
+ - User Fields
+ summary: Create or Update a User Field Option
+ description: |
+ Creates a new option or updates an existing option for the given drop-down user 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/user_fields/{user_field_id}/options` if the user field option already exists in the database
+ - 201 with `Location: /api/v2/user_fields/{user_field_id}/options` if the user field option is new
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomFieldOptionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomUserFieldOptionUpdateResponseExample'
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomFieldOptionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomUserFieldOptionCreateResponseExample'
+ /api/v2/user_fields/{user_field_id}/options/{user_field_option_id}:
+ parameters:
+ - $ref: '#/components/parameters/UserFieldId'
+ - $ref: '#/components/parameters/UserFieldOptionId'
+ get:
+ operationId: ShowUserFieldOption
+ tags:
+ - User Fields
+ summary: Show a User Field Option
+ description: |
+ #### Allowed for
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomFieldOptionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CustomUserFieldOptionResponseExample'
+ delete:
+ operationId: DeleteUserFieldOption
+ tags:
+ - User Fields
+ summary: Delete User Field Option
+ description: |
+ #### Allowed for
+ * Admins
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/user_fields/reorder:
+ put:
+ operationId: ReorderUserField
+ tags:
+ - User Fields
+ summary: Reorder User Field
+ description: |
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/user_fields/show_many:
+ get:
+ operationId: ShowManyUserFields
+ tags:
+ - User Fields
+ summary: Show Many User Fields
+ description: |
+ Returns multiple user fields by their keys.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - name: keys
+ in: query
+ description: |
+ Comma-separated list of user field keys to retrieve.
+ schema:
+ type: string
+ example: my_field_1,my_field_2
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserFieldsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserFieldsResponseExample'
+ /api/v2/users:
+ get:
+ operationId: ListUsers
+ tags:
+ - Users
+ summary: List Users
+ description: |
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Admins, Agents and Light Agents
+ parameters:
+ - $ref: '#/components/parameters/UserRoleFilter'
+ - $ref: '#/components/parameters/UserRolesFilter'
+ - $ref: '#/components/parameters/UserPermissionSetFilter'
+ - $ref: '#/components/parameters/UserExternalIdFilter'
+ - $ref: '#/components/parameters/UsersInclude'
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ - $ref: '#/components/parameters/IncludeBoundaryIndicators'
+ - $ref: '#/components/parameters/IncludeItemCursors'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UsersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UsersResponseExample'
+ post:
+ operationId: CreateUser
+ tags:
+ - Users
+ summary: Create User
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/UserRequestExample'
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserCreateResponseExample'
+ /api/v2/users/{user_id}:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ShowUser
+ tags:
+ - Users
+ summary: Show User
+ description: |
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/UsersInclude'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserResponseExample'
+ put:
+ operationId: UpdateUser
+ tags:
+ - Users
+ summary: Update User
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserUpdateRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/UpdateUserRequestExample'
+ multipart/form-data:
+ schema:
+ type: object
+ description: Form data for file uploads (e.g., user photo)
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UpdateUserResponseExample'
+ delete:
+ operationId: DeleteUser
+ tags:
+ - Users
+ summary: Delete User
+ description: |
+ 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](/api-reference/ticketing/users/users/#permanently-delete-user).
+
+ #### Allowed For
+
+ * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage end users or team members
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/DeleteUserResponseExample'
+ /api/v2/users/{user_id}/brand_agents:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ListUserBrandAgents
+ tags:
+ - Brand Agents
+ - Users
+ summary: List Brand Agent Memberships By User
+ description: |
+ Returns a list of all brand agent memberships for a specific user.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For:
+
+ * Admins
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BrandAgentsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/BrandAgentsResponseExample'
+ /api/v2/users/{user_id}/brand_agents/{brand_agent_id}:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ - $ref: '#/components/parameters/BrandAgentId'
+ get:
+ operationId: ShowUserBrandAgentById
+ tags:
+ - Brand Agents
+ - Users
+ summary: Show Brand Agent Membership By User
+ description: |
+ Returns a specific brand agent membership for a user.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BrandAgentResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/BrandAgentResponseExample'
+ /api/v2/users/{user_id}/compliance_deletion_statuses:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ShowUserComplianceDeletionStatuses
+ tags:
+ - Users
+ summary: Show Compliance Deletion Statuses
+ description: |
+ 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.
+
+ ```http
+ Status: 404
+ {
+ "error":"RecordNotFound",
+ "description":"Not found"
+ }
+ ```
+
+ #### Allowed For
+
+ * Agents, with restrictions
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+ parameters:
+ - name: application
+ in: query
+ description: Area of compliance
+ schema:
+ type: string
+ example: chat
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ComplianceDeletionStatusesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ComplianceDeletionStatusesResponseExample'
+ /api/v2/users/{user_id}/entitlements/full:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: GetUserEntitlementsFull
+ tags:
+ - Users
+ summary: Get Full User Entitlements
+ description: |
+ Returns the full entitlements for all Zendesk products (Explore, Voice, Knowledge, Live Chat) for the specified user. This includes the role name and active status for each product.
+
+ An entitlement is only considered active if both of the following conditions apply: the user has access and the product is active on the account.
+
+ #### Allowed For
+
+ * Agents
+
+ #### OAuth Scopes
+
+ Requires one of the following OAuth scopes: `users:read` or `read`
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserEntitlementsFullResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserEntitlementsFullResponseExample'
+ "404":
+ description: User not found
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ example:
+ error: RecordNotFound
+ "503":
+ description: Service unavailable - Too many requests
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ example:
+ error: ServiceUnavailable
+ /api/v2/users/{user_id}/group_memberships:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ListUserGroupMemberships
+ tags:
+ - Group Memberships
+ summary: List Group Memberships by User
+ description: |
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For:
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/GroupMembershipsInclude'
+ - $ref: '#/components/parameters/PerPage'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupMembershipsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupMembershipsResponseExample'
+ post:
+ operationId: CreateUserGroupMembership
+ tags:
+ - Group Memberships
+ - Users
+ summary: Create Group Membership for User
+ description: |
+ Assigns an agent to a given group.
+
+ #### Allowed For
+
+ * Admins
+ * Agents assigned to a custom role with permissions to manage group memberships (Enterprise only)
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupMembershipResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupMembershipResponseExample'
+ /api/v2/users/{user_id}/group_memberships/{group_membership_id}:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ - $ref: '#/components/parameters/GroupMembershipId'
+ get:
+ operationId: ShowUserGroupMembershipById
+ tags:
+ - Group Memberships
+ - Users
+ summary: Show User's Group Membership
+ description: |
+ Returns a specific group membership for a user.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupMembershipResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupMembershipResponseExample'
+ delete:
+ operationId: DeleteUserGroupMembership
+ tags:
+ - Group Memberships
+ - Users
+ summary: Delete User's Group Membership
+ description: |
+ Immediately removes a user from a group and schedules a job to unassign all working tickets that are assigned to the given user and group combination.
+
+ #### Allowed For
+
+ * Admins
+ * Agents assigned to a custom role with permissions to manage group memberships (Enterprise only)
+ responses:
+ "204":
+ description: No content response
+ /api/v2/users/{user_id}/group_memberships/{group_membership_id}/make_default:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ - $ref: '#/components/parameters/GroupMembershipId'
+ put:
+ operationId: GroupMembershipSetDefault
+ tags:
+ - Group Memberships
+ summary: Set Membership as Default
+ description: |
+ #### Allowed For:
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupMembershipsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupMembershipsResponseExample'
+ /api/v2/users/{user_id}/groups:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ - $ref: '#/components/parameters/ExcludeDeleted'
+ get:
+ operationId: ListUserGroups
+ tags:
+ - Groups
+ summary: List User Groups
+ description: |
+ Returns a list of groups for the specified user.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Admins
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ - $ref: '#/components/parameters/IncludeBoundaryIndicators'
+ - $ref: '#/components/parameters/IncludeItemCursors'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupsResponseExample'
+ /api/v2/users/{user_id}/groups/count:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: CountUserGroups
+ tags:
+ - Groups
+ summary: Count User Groups
+ description: |
+ Returns an approximate count of groups for the specified user. If the count exceeds 100,000, it is updated every 24 hours.
+
+ The `refreshed_at` property of the `count` object is a timestamp that indicates when the count was last updated.
+
+ **Note**: When the count exceeds 100,000, `refreshed_at` may occasionally be null. This indicates that the count is being updated in the background, and the `value` property of the `count` object is limited to 100,000 until the update is complete.
+
+ #### Allowed For
+
+ * Admins
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GroupsCountObject'
+ examples:
+ default:
+ $ref: '#/components/examples/GroupsCountResponseExample'
+ /api/v2/users/{user_id}/identities:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ListUserIdentities
+ tags:
+ - User Identities
+ summary: List Identities
+ description: |
+ Returns a list of identities for the given user.
+
+ Use the first endpoint if authenticating as an agent. Use the second if authenticating as an end user. End users can only list email and phone number identities.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page for cursor pagination.
+
+ #### Allowed For
+
+ * Agents
+ * Verified end users
+ parameters:
+ - name: type
+ in: query
+ description: Filters results by one or more identity types using the format `?type[]={type}&type[]={type}`
+ style: form
+ explode: true
+ schema:
+ type: array
+ items:
+ type: string
+ enum:
+ - agent_forwarding
+ - any_channel
+ - email
+ - facebook
+ - foreign
+ - messaging
+ - microsoft
+ - phone_number
+ - sdk
+ - twitter
+ - $ref: '#/components/parameters/CursorPaginationPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ - $ref: '#/components/parameters/IncludeBoundaryIndicators'
+ - $ref: '#/components/parameters/IncludeItemCursors'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserIdentitiesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserIdentitiesResponseExample'
+ post:
+ operationId: CreateUserIdentity
+ tags:
+ - User Identities
+ summary: Create Identity
+ description: |
+ Adds an identity to a user's profile. An agent can add an identity to any user profile.
+
+ Supported identity types:
+
+ | Type | Example |
+ | ---------------- | ------- |
+ | email | `{ "type" : "email", "value" : "someone@example.com" }` |
+ | twitter | `{ "type" : "twitter", "value" : "screen_name" }` |
+ | facebook | `{ "type" : "facebook", "value" : "855769377321" }` |
+ | google | `{ "type" : "google", "value" : "example@gmail.com" }` |
+ | agent_forwarding | `{ "type" : "agent_forwarding", "value" : "+1 555-123-4567" }` |
+ | phone_number | `{ "type" : "phone_number", "value" : "+1 555-123-4567" }` |
+
+ To create an identity without sending out a verification email, include a `"skip_verify_email": true` property. The `"skip_verify_email": true` property does not apply when updating your own agent profile. A welcome or verification email will be sent regardless of this setting.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserIdentityResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserIdentityCreateResponseExample'
+ /api/v2/users/{user_id}/identities/{user_identity_id}:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ - $ref: '#/components/parameters/UserIdentityId'
+ get:
+ operationId: ShowUserIdentity
+ tags:
+ - User Identities
+ summary: Show Identity
+ description: |
+ Shows the identity with the given id for a given user.
+
+ Use the first endpoint if authenticating as an agent. Use the second if authenticating as an end user. End users can only view email or phone number identity.
+
+ #### Allowed For
+
+ * Agents
+ * Verified end users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserIdentityResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserIdentityResponseExample'
+ put:
+ operationId: UpdateUserIdentity
+ tags:
+ - User Identities
+ summary: Update Identity
+ description: |
+ This endpoint allows you to:
+
+ * Set the specified identity as verified (by setting `verified` to "true" or `verification_method` to "low")
+ * Unverify a verified identity (by setting `verified` to "false" or `verification_method` to "none")
+ * Update the `value` property of the specified identity
+
+ You can't change an identity's `primary` attribute with this endpoint. You must use the [Make Identity Primary](#make-identity-primary) endpoint instead.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserIdentityResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserIdentityUpdateResponseExample'
+ delete:
+ operationId: DeleteUserIdentity
+ tags:
+ - User Identities
+ summary: Delete Identity
+ description: |
+ Deletes the identity for a given user.
+ In certain cases, a phone number associated with an identity is still visible on the user profile after the identity has been deleted via API. You can remove the phone number from the user profile by updating the `phone` attribute of the user to an empty string. See [Update User via API](/api-reference/ticketing/users/users/#update-user) for details and examples.
+
+ Deleting identities with type `messaging` could break messaging functionality. For example, an agent may stop being able to send messages via the messaging channel.
+
+ #### Allowed For
+ * Agents
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/users/{user_id}/identities/{user_identity_id}/make_primary:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ - $ref: '#/components/parameters/UserIdentityId'
+ put:
+ operationId: MakeUserIdentityPrimary
+ tags:
+ - User Identities
+ summary: Make Identity Primary
+ description: |
+ Sets the specified identity as primary. To change other attributes, use the [Update Identity](#update-identity) endpoint. This is a collection-level operation and the correct behavior for an API client is to subsequently reload the entire collection.
+
+ The first endpoint is the preferred option if authenticating as an agent. If authenticating as an end user, you can only use the second endpoint. In addition, an end user can only make an email identity primary if the email is verified.
+
+ #### Allowed For
+
+ * Agents
+ * Verified end users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserIdentitiesResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserIdentitiesResponseExample'
+ /api/v2/users/{user_id}/identities/{user_identity_id}/request_verification:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ - $ref: '#/components/parameters/UserIdentityId'
+ put:
+ operationId: RequestUserVerfication
+ tags:
+ - User Identities
+ summary: Request User Verification
+ description: |
+ Sends the user a verification email with a link to verify ownership of the email address.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success description
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/users/{user_id}/identities/{user_identity_id}/verify:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ - $ref: '#/components/parameters/UserIdentityId'
+ put:
+ operationId: VerifyUserIdentity
+ tags:
+ - User Identities
+ summary: Verify Identity
+ description: |
+ Sets the specified identity as verified.
+
+ For security reasons, you can't use this endpoint to update the email identity of the account owner. To verify the person's identity, send a verification email. See [Verifying the account owner's email address](https://support.zendesk.com/hc/en-us/articles/4408828975130) in Zendesk help.
+
+ If [automatic mapping of users to organizations using the email domain](https://support.zendesk.com/hc/en-us/articles/4408882246298-Creating-organizations#topic_nxl_vdt_bc) is enabled and the user is not already a member of an organization, they will be automatically added to the organization associated with the email domain once the email identity is verified.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserIdentityResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserIdentityResponseExample'
+ /api/v2/users/{user_id}/merge:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ put:
+ operationId: MergeEndUsers
+ tags:
+ - Users
+ summary: Merge End Users
+ description: |
+ 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.
+
+ To be eligible for merging, the user in the path parameter must be a requester on 10,000 or fewer tickets. Otherwise, the merge will be blocked.
+
+ Agents, admins, and users with more than 10,000 requested tickets cannot be merged.
+
+ For more information about how user data is merged, see [Merging a user's duplicate account](https://support.zendesk.com/hc/en-us/articles/4408887695898) in Zendesk help.
+
+ #### Allowed For
+
+ * Admins or agents with permission to edit end users
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/MergeEndUsersRequestExample'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserResponseExample'
+ /api/v2/users/{user_id}/organization_memberships:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ListUserOrganizationMemberships
+ tags:
+ - Organization Memberships
+ summary: List Organization Memberships by User
+ description: |
+ Returns a list of organization memberships for the account, user or organization in question.
+
+ **Note**: When returning organization memberships for a user, organization memberships are sorted with the default organization first, and then by organization name.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ - Agents
+ - End users
+ parameters:
+ - $ref: '#/components/parameters/OrganizationMembershipsInclude'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationMembershipsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationMembershipsResponseExample'
+ post:
+ operationId: CreateUserOrganizationMembership
+ tags:
+ - Organization Memberships
+ - Users
+ summary: Create Organization Membership for User
+ description: |
+ Assigns a user to a given organization. Returns an error with status 422 if the user is already assigned to the organization.
+
+ #### Allowed For
+
+ * Admins
+ * Agents when creating a new organization membership for an end user
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationMembershipResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationMembershipCreateResponseExample'
+ /api/v2/users/{user_id}/organization_memberships/{organization_membership_id}:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ - $ref: '#/components/parameters/OrganizationMembershipId'
+ get:
+ operationId: ShowOrganizationMembershipByUserId
+ tags:
+ - Organization Memberships
+ summary: Show Organization Membership by User
+ description: |
+ #### Allowed for
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationMembershipResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationMembershipResponseExample'
+ delete:
+ operationId: DeleteUserOrganizationMembership
+ tags:
+ - Organization Memberships
+ - Users
+ summary: Delete Organization Membership for User
+ description: |
+ Immediately removes a user from an organization and schedules a job to unassign all working tickets currently assigned to the user and organization combination. The `organization_id` of the unassigned tickets is set to null.
+
+ #### Allowed for
+
+ * Admins
+ * Agents when deleting an organization membership for an end user
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/users/{user_id}/organization_memberships/{organization_membership_id}/make_default:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ - $ref: '#/components/parameters/OrganizationMembershipId'
+ put:
+ operationId: SetOrganizationMembershipAsDefault
+ tags:
+ - Organization Memberships
+ summary: Set Membership as Default
+ description: |
+ Sets the default organization membership of a given user.
+
+ #### Allowed for
+
+ * Admins
+ * Agents when setting the default organization membership for an end user
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationMembershipsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationMembershipsResponseExample'
+ /api/v2/users/{user_id}/organization_subscriptions:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ListUserOrganizationSubscriptions
+ tags:
+ - Organization Subscriptions
+ - Users
+ summary: List User's Organization Subscriptions
+ description: |-
+ Returns a list of organization subscriptions for a specific user.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For:
+
+ * Agents
+ * End users
+
+ For end users, the response will only list the subscriptions created by the requesting end user.
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationSubscriptionsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationSubscriptionsResponseExample'
+ /api/v2/users/{user_id}/organizations:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ListUserOrganizations
+ tags:
+ - Organizations
+ summary: List User Organizations
+ description: |
+ Returns a list of organizations associated with the specified user.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Agents, with certain restrictions
+
+ If the agent has a custom agent role that restricts their access to only users in their own organization, a 403 Forbidden error is returned. See [Creating custom agent roles](https://support.zendesk.com/hc/en-us/articles/203662026-Creating-custom-roles-and-assigning-agents#topic_cxn_hig_bd) in Zendesk help.
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/CursorPaginationSort'
+ - $ref: '#/components/parameters/IncludeBoundaryIndicators'
+ - $ref: '#/components/parameters/IncludeItemCursors'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationsResponseExample'
+ "403":
+ description: Forbidden - Agent has restricted access
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ example:
+ error: Forbidden
+ "404":
+ description: User not found
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ example:
+ error: RecordNotFound
+ /api/v2/users/{user_id}/organizations/{organization_id}:
+ parameters:
+ - $ref: '#/components/parameters/OrganizationId'
+ - $ref: '#/components/parameters/UserId'
+ delete:
+ operationId: UnassignOrganization
+ tags:
+ - Organization Memberships
+ summary: Unassign Organization
+ description: |
+ Immediately removes a user from an organization and schedules a job to unassign all working tickets currently assigned to the user and organization combination. The `organization_id` of the unassigned tickets is set to null.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/users/{user_id}/organizations/{organization_id}/make_default:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ - $ref: '#/components/parameters/OrganizationId'
+ put:
+ operationId: SetOrganizationAsDefault
+ tags:
+ - Organization Memberships
+ summary: Set Organization as Default
+ description: |
+ Sets the default organization membership of a given user.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrganizationMembershipResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OrganizationMembershipResponseExample'
+ /api/v2/users/{user_id}/organizations/count:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: CountUserOrganizations
+ tags:
+ - Organizations
+ - Users
+ summary: Count User's Organizations
+ description: |
+ Returns an approximate count of organizations for a specific user. If the count exceeds
+ 100,000, it is updated every 24 hours.
+
+ The `refreshed_at` property of the `count` object is a timestamp that indicates
+ when the count was last updated.
+
+ When the count exceeds 100,000, the `refreshed_at` property may
+ occasionally be null. This indicates that the count is being
+ updated in the background and the `value` property of the `count` object is limited to
+ 100,000 until the update is complete.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CountOrganizationResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CountOrganizationsResponseExample'
+ /api/v2/users/{user_id}/password:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ post:
+ operationId: SetUserPassword
+ tags:
+ - User Passwords
+ summary: Set a User's Password
+ description: |
+ An admin can set a user's password only if the setting is enabled in Zendesk Support under **Settings** > **Security** > **Global**. The setting is off by default. Only the account owner can access and change this setting.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success description
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ put:
+ operationId: ChangeOwnPassword
+ tags:
+ - User Passwords
+ summary: Change Your Password
+ description: |
+ You can only change your own password. Nobody can change the password of another user because it requires knowing the user's existing password. However, an admin can set a new password for another user without knowing the existing password. See [Set a User's Password](#set-a-users-password) above.
+
+ #### Allowed For
+
+ * Agents
+ * End Users
+ responses:
+ "200":
+ description: Success description
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/users/{user_id}/password/requirements:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: GetUserPasswordRequirements
+ tags:
+ - User Passwords
+ summary: List password requirements
+ description: |
+ #### Allowed For
+
+ * Agents
+ * End Users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserPasswordRequirementsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserPasswordRequirementsResponseExample'
+ /api/v2/users/{user_id}/related:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ShowUserRelated
+ tags:
+ - Users
+ summary: Show User Related Information
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserRelatedResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserRelatedResponseExample'
+ /api/v2/users/{user_id}/requests:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ListUserRequests
+ tags:
+ - Requests
+ summary: List User Requests
+ description: |
+ Lists requests for the specified user.
+
+ #### Allowed for
+
+ * End Users
+ parameters:
+ - name: sort_by
+ in: query
+ description: Possible values are "updated_at", "created_at"
+ schema:
+ type: string
+ - name: sort_order
+ in: query
+ description: One of "asc", "desc". Defaults to "asc"
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RequestsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RequestsResponseExample'
+ /api/v2/users/{user_id}/sessions:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ListUserSessions
+ tags:
+ - Sessions
+ - Users
+ summary: List Sessions for User
+ description: |
+ Lists all sessions for a specific user.
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ #### Allowed For
+
+ * Admins, Agents, End users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SessionsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SessionsResponseExample'
+ delete:
+ operationId: BulkDeleteSessionsByUserId
+ tags:
+ - Sessions
+ summary: Bulk Delete Sessions
+ description: |
+ Deletes all the sessions for a user.
+
+ #### Allowed For
+
+ * Admins, Agents, End users
+ responses:
+ "204":
+ description: No Content
+ /api/v2/users/{user_id}/sessions/{session_id}:
+ parameters:
+ - $ref: '#/components/parameters/SessionId'
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ShowSession
+ tags:
+ - Sessions
+ summary: Show Session
+ description: |
+ #### Allowed For
+
+ * Admins, Agents, End users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SessionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SessionResponseExample'
+ delete:
+ operationId: DeleteSession
+ tags:
+ - Sessions
+ summary: Delete Session
+ description: |
+ #### Allowed For
+
+ * Admins, Agents, End users
+ responses:
+ "204":
+ description: No Content
+ /api/v2/users/{user_id}/skips:
+ parameters:
+ - $ref: '#/components/parameters/SkipTicketUserId'
+ - $ref: '#/components/parameters/TicketSortOrder'
+ get:
+ operationId: ListTicketSkips
+ tags:
+ - Ticket Skips
+ summary: List Ticket Skips
+ description: |
+ Archived tickets are not included in the response. See
+ [About archived tickets](https://support.zendesk.com/hc/en-us/articles/203657756) in
+ the Support Help Center.
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/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
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketSkipsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketSkipResponseExample'
+ /api/v2/users/{user_id}/tags:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ListUserTags
+ tags:
+ - Tags
+ summary: List User Tags
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TagsByObjectIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TagsByObjectIdResponse'
+ post:
+ operationId: SetUserTags
+ tags:
+ - Tags
+ summary: Set User Tags
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TagsByObjectIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TagsByObjectIdResponse'
+ put:
+ operationId: PutUserTags
+ tags:
+ - Tags
+ summary: Add User Tags
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TagsByObjectIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TagsByObjectIdResponse'
+ delete:
+ operationId: DeleteUserTags
+ tags:
+ - Tags
+ summary: Remove User Tags
+ description: |
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TagsByObjectIdResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TagsRemoveResponseExample'
+ /api/v2/users/{user_id}/tickets/assigned:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ListUserAssignedTickets
+ tags:
+ - Tickets
+ summary: List User Assigned Tickets
+ description: Lists tickets assigned to the specified user.
+ responses:
+ "200":
+ description: List tickets assigned to the user
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketsResponseExample'
+ /api/v2/users/{user_id}/tickets/assigned/count:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: CountUserAssignedTickets
+ tags:
+ - Tickets
+ summary: Count User Assigned Tickets
+ description: |-
+ Returns an approximate count of tickets assigned to the specified user. If the count exceeds 100,000, it is updated 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
+ responses:
+ "200":
+ description: Count of tickets
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ count:
+ type: object
+ properties:
+ refreshed_at:
+ type: string
+ format: date-time
+ value:
+ type: integer
+ examples:
+ default:
+ value:
+ count:
+ refreshed_at: "2020-04-06T02:18:17Z"
+ value: 102
+ /api/v2/users/{user_id}/tickets/ccd:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ListUserCCDTickets
+ tags:
+ - Tickets
+ summary: List User CCD Tickets
+ description: Lists tickets where the specified user is CC'd.
+ responses:
+ "200":
+ description: List tickets where the user is CC'd
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketsResponseExample'
+ /api/v2/users/{user_id}/tickets/ccd/count:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: CountUserCCDTickets
+ tags:
+ - Tickets
+ summary: Count User CCD Tickets
+ description: |-
+ Returns an approximate count of tickets where the specified user is CC'd. If the count exceeds 100,000, it is updated 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
+ responses:
+ "200":
+ description: Count of tickets
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ count:
+ type: object
+ properties:
+ refreshed_at:
+ type: string
+ format: date-time
+ value:
+ type: integer
+ examples:
+ default:
+ value:
+ count:
+ refreshed_at: "2020-04-06T02:18:17Z"
+ value: 102
+ /api/v2/users/{user_id}/tickets/followed:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ListUserFollowedTickets
+ tags:
+ - Tickets
+ summary: List User Followed Tickets
+ description: Lists tickets the specified user is following.
+ parameters:
+ - $ref: '#/components/parameters/TicketSortBy'
+ - $ref: '#/components/parameters/TicketSortOrder'
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - name: exclude_archived
+ in: query
+ description: |
+ If true, excludes archived tickets from the results.
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: List tickets followed by the user
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketsResponseExample'
+ /api/v2/users/{user_id}/tickets/requested:
+ parameters:
+ - $ref: '#/components/parameters/UserId'
+ get:
+ operationId: ListUserRequestedTickets
+ tags:
+ - Tickets
+ summary: List User Requested Tickets
+ parameters:
+ - $ref: '#/components/parameters/TicketSortBy'
+ - $ref: '#/components/parameters/TicketSortOrder'
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/TicketsInclude'
+ - name: exclude_archived
+ in: query
+ description: |
+ If true, excludes archived tickets from the results.
+ schema:
+ type: boolean
+ - name: exclude_count
+ in: query
+ description: |
+ If true, excludes the total count from the results.
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: List tickets requested by the user
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/TicketsResponseExample'
+ /api/v2/users/autocomplete:
+ get:
+ operationId: AutocompleteUsers
+ tags:
+ - Users
+ summary: Autocomplete Users
+ description: |
+ Returns an array of users whose name starts with the value specified in the `name` parameter.
+ It only returns users with no foreign identities.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - name: name
+ in: query
+ description: |
+ The name to search for the user. You must specify either `name` or `phone`.
+ schema:
+ type: string
+ example: gil
+ - name: phone
+ in: query
+ description: |
+ The phone number to search for the user. You must specify either `name` or `phone`.
+ schema:
+ type: string
+ - name: filter
+ in: query
+ description: |
+ Filter to apply to autocomplete results. Accepted values: `assignable`, `requester`.
+ schema:
+ type: string
+ enum:
+ - assignable
+ - requester
+ - $ref: '#/components/parameters/LookupRelationshipAutocompleteFieldIdFragment'
+ - $ref: '#/components/parameters/LookupRelationshipAutocompleteSourceFragment'
+ - $ref: '#/components/parameters/UsersInclude'
+ - name: per_page
+ in: query
+ description: Number of results to return.
+ schema:
+ type: integer
+ minimum: 1
+ maximum: 100
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UsersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SearchUsersResponseExample'
+ post:
+ operationId: AutocompleteUsersPost
+ tags:
+ - Users
+ summary: Autocomplete Users by Request Body
+ description: |
+ Returns an array of users whose name starts with the value specified in the `name` property in the request body.
+ It only returns users with no foreign identities.
+
+ This endpoint accepts the same parameters as the [GET method](#autocomplete-users-by-query-string) but they are specified in the request body instead of the query string.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/UsersInclude'
+ - name: filter
+ in: query
+ description: |
+ Filter to apply to autocomplete results. Common values: `assignable`, `requester`.
+ schema:
+ type: string
+ - name: per_page
+ in: query
+ description: Number of results to return.
+ schema:
+ type: integer
+ minimum: 1
+ maximum: 100
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ field_id:
+ type: integer
+ description: Field ID for lookup relationship autocomplete
+ filter:
+ description: Filter to apply (assignable, requester, or dynamic_values)
+ oneOf:
+ - type: string
+ enum:
+ - assignable
+ - requester
+ - type: object
+ properties:
+ dynamic_values:
+ type: object
+ name:
+ type: string
+ description: The name to search for the user
+ example: gil
+ phone:
+ type: string
+ description: The phone number to search for the user
+ source:
+ type: string
+ description: Source for lookup relationship autocomplete
+ example:
+ name: gil
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UsersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SearchUsersResponseExample'
+ "400":
+ description: Bad request - Invalid filter value or query error
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ description:
+ type: string
+ error:
+ type: string
+ example:
+ description: Invalid query syntax
+ error: Query Error
+ "500":
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ description:
+ type: string
+ error:
+ type: string
+ example:
+ description: Service temporarily unavailable
+ error: Unavailable
+ /api/v2/users/count:
+ get:
+ operationId: CountUsers
+ tags:
+ - Users
+ summary: Count Users
+ description: |
+ Returns an approximate count of users. If the count exceeds 100,000, it is updated every 24 hours.
+
+ The response includes a `refreshed_at` property in a `count` object that contains a timestamp indicating when the count was last updated.
+
+ **Note**: When the count exceeds 100,000, the `refreshed_at` property may occasionally be null.
+ This indicates that the count is being updated in the background. The `count` object's `value` property is limited to 100,000 until the update is complete.
+
+ #### Allowed For
+
+ * Admins, Agents and Light Agents
+ parameters:
+ - $ref: '#/components/parameters/UserRoleFilter'
+ - $ref: '#/components/parameters/UserRolesFilter'
+ - $ref: '#/components/parameters/UserPermissionSetFilter'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CountResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserCountResponseExample'
+ /api/v2/users/create_many:
+ post:
+ operationId: CreateManyUsers
+ tags:
+ - Users
+ summary: Create Many Users
+ description: |
+ Accepts an array of up to 100 user objects.
+
+ **Note**: To protect the data in your Zendesk account, bulk user imports are not enabled by default in Zendesk accounts. The account owner must contact [Zendesk Customer Support](https://support.zendesk.com/hc/en-us/articles/4408843597850) to enable the imports. A 403 Forbidden
+ error is returned if data imports are not enabled.
+
+ #### Allowed For
+
+ * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage end users or team members
+
+ #### Specifying an organization
+
+ You can assign a user to an existing organization by setting an
+ `organization_id` property in the user object.
+
+ #### Response
+
+ This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UsersRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/UsersCreateManyRequestExample'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusResponseExample'
+ /api/v2/users/create_or_update:
+ post:
+ operationId: CreateOrUpdateUser
+ tags:
+ - Users
+ summary: Create Or Update User
+ description: |
+ Creates a user if the user does not already exist, or updates an existing user
+ identified by e-mail address or external ID.
+
+ If you don't specify a role parameter, the new user is assigned the role of end user.
+
+ If you need to create users without sending out a verification email, include a `"skip_verify_email": true` property in the body.
+
+ #### External ID Case Sensitivity
+
+ When providing an external id to identify an existing user to update, the search for the user record is not case sensitive.
+
+ However, if an existing user is found, the system will update the user's external id to match the case of the external id used to find the user.
+
+ #### Response Status Code
+
+ - If the user already exists in Zendesk, a successful request returns a 200 OK status code.
+ - If the user does not exist in Zendesk and is created, the request returns a 201 Created status code.
+ - In both cases, the API responds with a JSON body containing the full user object, which includes the user's id and the fully-resolved URL to the user resource.
+
+ Example response:
+ ```json
+ {
+ "user": {
+ "id": 8929981612030,
+ "url": "https://{subdomain}.zendesk.com/api/v2/users/8929981612030",
+ ...
+ }
+ }
+ ```
+
+ #### Allowed For
+
+ * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage end users or team members
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/UserRequestExample'
+ responses:
+ "200":
+ description: Successful response, when user exits
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserCreateResponseExample'
+ "201":
+ description: Created response, when user is new
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserCreateResponseExample'
+ /api/v2/users/create_or_update_many:
+ post:
+ operationId: CreateOrUpdateManyUsers
+ tags:
+ - Users
+ summary: Create Or Update Many Users
+ description: |
+ Accepts an array of up to 100 user objects. For each user, the user is created if it does not
+ already exist, or the existing user is updated.
+
+ **Note**: To protect the data in your Zendesk account, bulk user imports are not enabled by default in Zendesk accounts. The account owner must contact [Zendesk Customer Support](https://support.zendesk.com/hc/en-us/articles/4408843597850) to enable the imports. A 403 Forbidden
+ error is returned if data imports are not enabled.
+
+ Each individual user object can identify an existing user by `email` or by `external_id`.
+
+ This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
+
+ #### Allowed For
+
+ * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage end users or team members
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UsersRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/UsersRequestExample'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusResponseExample'
+ /api/v2/users/destroy_many:
+ delete:
+ operationId: DestroyManyUsers
+ tags:
+ - Users
+ summary: Bulk Delete Users
+ description: |
+ Accepts a comma-separated list of up to 100 user ids.
+
+ The request takes an `ids` or an `external_ids` query parameter.
+
+ #### Allowed for
+
+ * Admins
+
+ #### Response
+
+ This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
+ parameters:
+ - name: ids
+ in: query
+ description: Id of the users to delete. Comma separated
+ schema:
+ type: string
+ example: 1,2,3
+ - name: external_ids
+ in: query
+ description: External Id of the users to delete. Comma separated
+ schema:
+ type: string
+ example: abc,def,ghi
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusBulkDeleteResponseExample'
+ /api/v2/users/logout_many:
+ post:
+ operationId: LogoutManyUsers
+ tags:
+ - Users
+ summary: Logout many users
+ description: |
+ Accepts a comma-separated list of up to 100 user ids.
+
+ #### Allowed For:
+
+ * Admins
+ parameters:
+ - name: ids
+ in: query
+ description: |
+ Accepts a comma-separated list of up to 100 user ids.
+ schema:
+ type: string
+ example: 1,2
+ responses:
+ "202":
+ description: Accepted response
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/users/me:
+ get:
+ operationId: ShowCurrentUser
+ tags:
+ - Users
+ summary: Show Self
+ description: |
+ The endpoint returns [user information](/api-reference/ticketing/users/users/) and an `authenticity_token`.
+
+ #### Allowed For
+
+ * Anonymous users
+
+ #### Authenticity Token
+
+ Zendesk API calls made by end users from a Zendesk help center must include `authenticity_token` in the `X-CSRF-Token` HTTP header. This helps prevent [cross-site request forgery (CSRF)](https://en.wikipedia.org/wiki/Cross-site_request_forgery) attacks.
+
+ For an example using an authenticity token, see the AJAX request in the [Upgrading from Templating API v1](https://developer.zendesk.com/documentation/help_center/help-center-templates/v1#jquery) documentation.
+ parameters:
+ - $ref: '#/components/parameters/UsersInclude'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CurrentUserResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/CurrentUserResponseExample'
+ /api/v2/users/me/logout:
+ delete:
+ operationId: DeleteAuthenticatedSession
+ tags:
+ - Sessions
+ summary: Delete the Authenticated Session
+ description: |
+ 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.
+
+ #### Allowed For
+
+ * Admins, Agents, End users
+ responses:
+ "204":
+ description: No Content
+ /api/v2/users/me/oauth/clients:
+ get:
+ operationId: ListCurrentUserOAuthClients
+ tags:
+ - OAuth Clients
+ summary: List Current User's Clients
+ description: |
+ Returns the OAuth clients owned by the current user.
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Admins
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OAuthClientsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/OAuthClientsResponseExample'
+ /api/v2/users/me/session:
+ get:
+ operationId: ShowCurrentlyAuthenticatedSession
+ tags:
+ - Sessions
+ summary: Show the Currently Authenticated Session
+ description: |
+ #### Allowed For
+
+ * Admins, Agents, End users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SessionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SessionResponseExample'
+ /api/v2/users/me/session/renew:
+ get:
+ operationId: RenewCurrentSession
+ tags:
+ - Sessions
+ summary: Renew the current session
+ description: |
+ #### Allowed For
+
+ * Admins, Agents, End users
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RenewSessionResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/RenewSessionResponseExample'
+ /api/v2/users/me/settings:
+ get:
+ operationId: ShowCurrentUserSettings
+ tags:
+ - Users
+ summary: Show Current User Settings
+ description: |
+ Returns the settings for the currently authenticated user. This includes UI preferences for onboarding, tooltips, keyboard shortcuts, theme preferences, and other feature toggles.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response - Returns current settings
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserSettingsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserSettingsResponseExample'
+ put:
+ operationId: UpdateCurrentUserSettings
+ tags:
+ - Users
+ summary: Update Current User Settings
+ description: |
+ Updates the settings for the currently authenticated user. This includes UI preferences for onboarding, tooltips, keyboard shortcuts, theme preferences, and other feature toggles.
+
+ Settings are grouped into:
+ - **Support**: Support UI preferences (onboarding, tooltips, shortcuts, theme)
+ - **admin_center**: Admin Center UI preferences (navigation, onboarding)
+ - **shared_views_order**: Optional array of view IDs for custom ordering
+
+ Only the specified settings will be updated. Other settings will remain unchanged.
+
+ #### Allowed For
+
+ * Agents
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserSettingsUpdateRequest'
+ example:
+ settings:
+ admin_center:
+ has_admin_center_side_nav_open: true
+ lotus:
+ agent_workspace_theme_preference: "1"
+ keyboard_shortcuts_enabled: true
+ show_onboarding_tooltips: false
+ responses:
+ "200":
+ description: Success response - Returns updated settings
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserSettingsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/UserSettingsResponseExample'
+ "400":
+ description: Bad request - No settings provided
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ example:
+ error: BadRequest
+ "401":
+ description: Unauthorized - Not an agent
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ example:
+ error: Unauthorized
+ /api/v2/users/request_create:
+ post:
+ operationId: RequestUserCreate
+ tags:
+ - Users
+ summary: Request User Create
+ description: |
+ Sends the owner a reminder email to update their subscription so more agents can be created.
+
+ #### Allowed For
+
+ * Agents
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserRequest'
+ examples:
+ default:
+ $ref: '#/components/examples/RequestUserCreateRequestExample'
+ responses:
+ "200":
+ description: description
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/users/search:
+ get:
+ operationId: SearchUsers
+ tags:
+ - Users
+ summary: Search Users
+ description: |
+ Returns an array of users who meet the search criteria.
+
+ Returns up to 100 records per page to a maximum of 10,000 records per query. See [Using offset pagination](/api-reference/introduction/pagination/#using-offset-pagination).
+
+ #### Pagination
+
+ * Offset pagination only
+
+ See [Using Offset Pagination](/api-reference/introduction/pagination/#using-offset-pagination).
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/Page'
+ - $ref: '#/components/parameters/PerPage'
+ - name: query
+ in: query
+ description: |
+ 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](/api-reference/ticketing/ticket-management/search/).
+ schema:
+ type: string
+ example: jdoe
+ - name: external_id
+ in: query
+ description: |
+ The `external_id` parameter does not support the search syntax. It only accepts ids.
+ schema:
+ type: string
+ example: abc124
+ - $ref: '#/components/parameters/IncludeSideloads'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UsersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/SearchUsersResponseExample'
+ /api/v2/users/show_many:
+ get:
+ operationId: ShowManyUsers
+ tags:
+ - Users
+ summary: Show Many Users
+ description: |
+ Accepts a comma-separated list of up to 100 user ids or external ids.
+
+ #### Allowed For:
+
+ * Agents
+ parameters:
+ - name: ids
+ in: query
+ description: |
+ Accepts a comma-separated list of up to 100 user ids.
+ schema:
+ type: string
+ example: 1,2
+ - name: external_ids
+ in: query
+ description: |
+ Accepts a comma-separated list of up to 100 external ids.
+ schema:
+ type: string
+ example: abc,def
+ - name: include_deleted
+ in: query
+ description: |
+ If true, returns inactive or deleted users.
+ schema:
+ type: boolean
+ - $ref: '#/components/parameters/UsersInclude'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UsersResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ShowManyUsersResponseExample'
+ /api/v2/users/update_many:
+ put:
+ operationId: UpdateManyUsers
+ tags:
+ - Users
+ summary: Update Many Users
+ parameters:
+ - name: ids
+ in: query
+ description: Id of the users to update. Comma separated
+ schema:
+ type: string
+ example: 1,2,3
+ - name: external_ids
+ in: query
+ description: External Id of the users to update. Comma separated
+ schema:
+ type: string
+ example: abc,def,ghi
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/UserUpdateRequest'
+ - $ref: '#/components/schemas/UsersRequest'
+ additionalProperties: true
+ examples:
+ default:
+ $ref: '#/components/examples/UpdateManyUsersRequestExample'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/JobStatusResponseExample'
+ /api/v2/views:
+ get:
+ operationId: ListViews
+ tags:
+ - Views
+ summary: List Views
+ description: |
+ 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)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - name: access
+ in: query
+ description: Only views with given access. May be "personal", "shared", or "account"
+ schema:
+ type: string
+ - name: active
+ in: query
+ description: Only active views if true, inactive views if false
+ schema:
+ type: boolean
+ - name: group_id
+ in: query
+ description: Only views belonging to given group
+ schema:
+ type: integer
+ - name: sort
+ in: query
+ description: The sort parameter used with cursor pagination. Defaults to "created_at". Prefix with '-' for descending order
+ schema:
+ type: string
+ - name: sort_by
+ in: query
+ description: The sort_by parameter used with offset pagination. Possible values are "alphabetical", "created_at", or "updated_at". Defaults to "position"
+ schema:
+ type: string
+ - name: sort_order
+ in: query
+ description: The sort_order parameter used with offset pagination. One of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others
+ schema:
+ type: string
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewsResponseExample'
+ post:
+ operationId: CreateView
+ tags:
+ - Views
+ summary: Create View
+ description: |
+ #### 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](/documentation/ticketing/reference-guides/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](/documentation/ticketing/reference-guides/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](#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
+
+ ```js
+ {
+ "view": {
+ "title": "Kelly's tickets",
+ "raw_title": "{{dc.tickets_assigned_to_kelly}}",
+ "description": "Tickets that are assigned to Kelly",
+ "active": true,
+ "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](#view-columns) table. The `description`, `submitter` and `custom_status_id` columns are not supported
+ | `group_order`, `sort_order` | Either "asc" or "desc"
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewCreateResponseExample'
+ /api/v2/views/{view_id}:
+ parameters:
+ - $ref: '#/components/parameters/ViewId'
+ get:
+ operationId: ShowView
+ tags:
+ - Views
+ summary: Show View
+ description: |
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/IncludeSideloads'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewResponseExample'
+ put:
+ operationId: UpdateView
+ tags:
+ - Views
+ summary: Update View
+ description: |
+ #### 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](/documentation/ticketing/reference-guides/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](/documentation/ticketing/reference-guides/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](#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](#view-sorting) in Create View.
+
+ #### Example Request Body
+
+ ```js
+ {
+ "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"]
+ }
+ }
+ }
+ ```
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewUpdateResponseExample'
+ delete:
+ operationId: DeleteView
+ tags:
+ - Views
+ summary: Delete View
+ description: |
+ #### Allowed For
+ * Agents
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/views/{view_id}/count:
+ parameters:
+ - $ref: '#/components/parameters/ViewId'
+ get:
+ operationId: GetViewCount
+ tags:
+ - Views
+ summary: Count Tickets in View
+ description: |
+ 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](#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
+ ```js
+ {
+ "view_count": {
+ "view_id": 25,
+ "url": "https://company.zendesk.com/api/v2/views/25/count",
+ "value": 719,
+ "pretty": "~700",
+ "fresh": true
+ }
+ }
+ ```
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewCountResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewCountResponseExample'
+ /api/v2/views/{view_id}/execute:
+ parameters:
+ - $ref: '#/components/parameters/ViewId'
+ get:
+ operationId: ExecuteView
+ tags:
+ - Views
+ summary: Execute View
+ description: |
+ 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](#list-tickets-from-a-view).
+
+ This endpoint is rate limited to 5 requests per minute, per view, per agent. This rate limit includes activity in Zendesk Support. An API script is more likely to encounter rate limit errors if the authenticating agent or admin is concurrently active in Zendesk Support.
+
+ 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](/api-reference/ticketing/ticket-management/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](#preview-views).
+
+ #### Allowed For
+
+ * Agents
+
+ #### Pagination
+
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - name: sort_by
+ in: query
+ description: The ticket field used for sorting. This will either be a title or a custom field id.
+ schema:
+ type: string
+ - name: sort_order
+ in: query
+ description: The direction the tickets are sorted. May be one of 'asc' or 'desc'
+ schema:
+ type: string
+ - $ref: '#/components/parameters/IncludeSideloads'
+ - $ref: '#/components/parameters/ExcludeSideloads'
+ - name: group_by
+ in: query
+ description: The ticket field used for grouping. This will either be a title or a custom field id.
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewExecuteResponseExample'
+ /api/v2/views/{view_id}/export:
+ parameters:
+ - $ref: '#/components/parameters/ViewId'
+ get:
+ operationId: ExportView
+ tags:
+ - Views
+ summary: Export View
+ description: |
+ Returns the csv attachment of the specified view if possible. Enqueues a job to produce the csv if necessary.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewExportResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewExportResponseExample'
+ /api/v2/views/{view_id}/tickets:
+ parameters:
+ - $ref: '#/components/parameters/ViewId'
+ get:
+ operationId: ListTicketsFromView
+ tags:
+ - Views
+ summary: List Tickets From a View
+ description: |
+ #### Allowed For
+
+ * Agents
+
+ #### Pagination
+ * Cursor pagination (recommended)
+ * Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+ parameters:
+ - name: sort_by
+ in: query
+ description: Sort or group the tickets by a column in the [View columns](#view-columns) table. The `subject` and `submitter` columns are not supported
+ schema:
+ type: string
+ - name: sort_order
+ in: query
+ description: One of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewListTicketsResponseEXample'
+ /api/v2/views/active:
+ get:
+ operationId: ListActiveViews
+ tags:
+ - Views
+ summary: List Active Views
+ description: |
+ 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](/api-reference/introduction/pagination/).
+
+ Returns a maximum of 100 records per page.
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - name: access
+ in: query
+ description: Only views with given access. May be "personal", "shared", or "account"
+ schema:
+ type: string
+ - name: group_id
+ in: query
+ description: Only views belonging to given group
+ schema:
+ type: integer
+ - name: sort_by
+ in: query
+ description: Possible values are "alphabetical", "created_at", or "updated_at". Defaults to "position"
+ schema:
+ type: string
+ - name: sort_order
+ in: query
+ description: One of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewsActiveResponseExample'
+ /api/v2/views/compact:
+ get:
+ operationId: ListCompactViews
+ tags:
+ - Views
+ summary: List Views - Compact
+ description: |
+ 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
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewsResponseExample'
+ /api/v2/views/count:
+ get:
+ operationId: CountViews
+ tags:
+ - Views
+ summary: Count Views
+ description: |-
+ 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
+ responses:
+ "200":
+ description: Count of views
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewsCountResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewsCountResponseExample'
+ /api/v2/views/count_many:
+ get:
+ operationId: GetViewCounts
+ tags:
+ - Views
+ summary: Count Tickets in Views
+ description: "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](#count-tickets-in-view).\n\nOnly returns values for personal and shared views accessible to the user performing the request.\n\n***Note:***\nDue to the asynchronous operation of computing the counts for the requested views, some of the views' counts could be null. This means that the system is still computing the count for that view.\nPeriodically issue another request until all of the views' counts in the response are integers greater than zero. \n\n#### Rate limiting\n\nThis endpoint is rate limited to 6 requests every 1 minute.\n\n#### Allowed For\n\n* Agents\n"
+ parameters:
+ - name: ids
+ in: query
+ description: List of view's ids separated by commas.
+ required: true
+ schema:
+ type: string
+ example: 1,2,3
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewCountsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewCountsResponseExample'
+ "429":
+ description: Too Many Requests
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Errors'
+ examples:
+ default:
+ value:
+ errors:
+ - code: TooManyRequests
+ title: Too many requests to update
+ /api/v2/views/definitions:
+ get:
+ operationId: ListViewDefinitions
+ tags:
+ - Views
+ summary: List View Filter Definitions
+ description: |
+ Returns the definitions of the conditions and actions a view can perform.
+ The definitions include conditions, output columns, groupable fields, and
+ sortable fields.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ definitions:
+ type: object
+ properties:
+ conditions_all:
+ type: array
+ items:
+ type: object
+ additionalProperties: true
+ conditions_any:
+ type: array
+ items:
+ type: object
+ additionalProperties: true
+ groupables:
+ type: array
+ items:
+ type: object
+ additionalProperties: true
+ output:
+ type: array
+ items:
+ type: object
+ additionalProperties: true
+ sortables:
+ type: array
+ items:
+ type: object
+ additionalProperties: true
+ examples:
+ default:
+ value:
+ definitions:
+ conditions_all:
+ - group: ticket
+ nullable: false
+ operators:
+ - terminal: false
+ title: Is
+ value: is
+ - terminal: false
+ title: Is not
+ value: is_not
+ repeatable: false
+ subject: status
+ title: Status
+ type: list
+ values:
+ - enabled: true
+ title: New
+ value: new
+ - enabled: true
+ title: Open
+ value: open
+ conditions_any:
+ - group: ticket
+ nullable: false
+ operators:
+ - terminal: false
+ title: Is
+ value: is
+ repeatable: false
+ subject: status
+ title: Status
+ type: list
+ values:
+ - enabled: true
+ title: New
+ value: new
+ groupables:
+ - group: ticket
+ title: Status
+ type: list
+ value: status
+ output:
+ - group: ticket
+ title: ID
+ type: tagger
+ value: nice_id
+ sortables:
+ - group: ticket
+ title: ID
+ type: number
+ value: nice_id
+ /api/v2/views/destroy_many:
+ delete:
+ operationId: BulkDeleteViews
+ tags:
+ - Views
+ summary: Bulk Delete Views
+ description: |
+ Deletes the views corresponding to the provided list of IDs.
+
+ #### Allowed For
+ * Agents
+ parameters:
+ - name: ids
+ in: query
+ description: The IDs of the views to delete
+ required: true
+ schema:
+ type: string
+ example: 1,2,3
+ responses:
+ "204":
+ description: No Content response
+ /api/v2/views/preview:
+ post:
+ operationId: PreviewViews
+ tags:
+ - Views
+ summary: Preview Views
+ description: |
+ You can preview views by constructing the conditions in the proper format and nesting them under the `view` property. See [Conditions reference](/documentation/ticketing/reference-guides/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](#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.
+
+ #### Pagination
+
+ - Cursor pagination (recommended)
+ - Offset pagination
+
+ See [Pagination](/api-reference/introduction/pagination/).
+
+ #### Allowed For
+
+ * Agents
+ parameters:
+ - $ref: '#/components/parameters/DualPaginationPage'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/IncludeSideloads'
+ - $ref: '#/components/parameters/ExcludeSideloads'
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewPreviewResponseExample'
+ /api/v2/views/preview/count:
+ post:
+ operationId: PreviewCount
+ tags:
+ - Views
+ summary: Preview Ticket Count
+ description: |
+ Returns the ticket count for a single preview.
+
+ #### Allowed For
+
+ * Agents
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewCountResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewCountResponseExample'
+ /api/v2/views/search:
+ get:
+ operationId: SearchViews
+ tags:
+ - Views
+ summary: Search Views
+ description: |
+ #### Pagination
+
+ * Offset pagination only
+
+ See [Using Offset Pagination](/api-reference/introduction/pagination/#using-offset-pagination).
+
+ #### Allowed For
+
+ * Agents
+
+ #### Sideloads
+
+ The following sideloads are supported. For more information, see [Side-loading](/documentation/ticketing/using-the-zendesk-api/side_loading/).
+
+ | Name | Will sideload
+ | ---------------- | -------------
+ | app_installation | The app installation that requires each view, if present
+ | permissions | The permissions for each view
+ parameters:
+ - name: query
+ in: query
+ description: Query string used to find all views with matching title
+ required: true
+ schema:
+ type: string
+ example: sales&group_id=25789188
+ - name: access
+ in: query
+ description: Filter views by access. May be "personal", "shared", or "account"
+ schema:
+ type: string
+ - name: active
+ in: query
+ description: Filter by active views if true or inactive views if false
+ schema:
+ type: boolean
+ - name: group_id
+ in: query
+ description: Filter views by group
+ schema:
+ type: integer
+ - name: sort_by
+ in: query
+ description: Possible values are "alphabetical", "created_at", "updated_at", and "position". If unspecified, the views are sorted by relevance
+ schema:
+ type: string
+ - name: sort_order
+ in: query
+ description: One of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others
+ schema:
+ type: string
+ - name: include
+ in: query
+ description: A sideload to include in the response. See [Sideloads](#sideloads-3)
+ schema:
+ type: string
+ example: permissions
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewsResponseExample'
+ /api/v2/views/show_many:
+ get:
+ operationId: ListViewsById
+ tags:
+ - Views
+ summary: List Views By ID
+ description: |
+ #### 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
+ parameters:
+ - name: ids
+ in: query
+ description: List of view's ids separated by commas.
+ required: true
+ schema:
+ type: string
+ example: 1,2,3
+ - name: active
+ in: query
+ description: Only active views if true, inactive views if false
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewsResponseExample'
+ /api/v2/views/update_many:
+ put:
+ operationId: UpdateManyViews
+ tags:
+ - Views
+ summary: Update Many Views
+ description: |
+ #### 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
+
+ ```js
+ {
+ "views": [
+ {"id": 25, "position": 3},
+ {"id": 23, "position": 5},
+ {"id": 27, "position": 9},
+ {"id": 22, "position": 7}
+ ]
+ }
+ ```
+ responses:
+ "200":
+ description: Success response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ViewsResponse'
+ examples:
+ default:
+ $ref: '#/components/examples/ViewsUpdateManyResponseExample'
+ /api/v2/workspaces:
+ get:
+ operationId: ListWorkspaces
+ tags:
+ - Workspaces
+ summary: List Workspaces
+ description: |
+ #### Allowed For
+
+ * Admins, Agents
+ responses:
+ "200":
+ description: Success Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/WorkspaceResponse'
+ examples:
+ default:
+ value:
+ count: 1
+ next_page: null
+ previous_page: null
+ workspaces:
+ - activated: true
+ apps:
+ - expand: false
+ id: 360000080413
+ position: 1
+ conditions:
+ all:
+ - field: ticket_form_id
+ operator: is
+ value: "360000014173"
+ any: [ ]
+ created_at: "2018-11-13T19:08:13Z"
+ description: Test rules
+ id: 3133
+ macro_ids:
+ - 360005374974
+ position: 1
+ prefer_workspace_app_order: true
+ selected_macros:
+ - actions:
+ - field: status
+ value: solved
+ active: true
+ created_at: "2018-02-08T23:45:30Z"
+ description: null
+ id: 360005374974
+ position: 9999
+ restriction:
+ id: 360002226093
+ ids:
+ - 360002226093
+ type: Group
+ title: Close and redirect to topics
+ updated_at: "2018-11-08T22:27:00Z"
+ url: https://{subdomain}.zendesk.com/api/v2/macros/360005374974
+ usage_7d: 0
+ ticket_form_id: 360000014173
+ title: Test Workspace 1
+ updated_at: "2018-12-17T22:37:40Z"
+ url: https://{subdomain}.zendesk.com/api/v2/workspaces
+ post:
+ operationId: CreateWorkspace
+ tags:
+ - Workspaces
+ summary: Create Workspace
+ description: |
+ #### Allowed For
+
+ * Admins
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ workspace:
+ $ref: '#/components/schemas/WorkspaceInput'
+ examples:
+ default:
+ value:
+ workspace:
+ conditions:
+ all:
+ - field: ticket_form_id
+ operator: is
+ value: "360000014173"
+ any: [ ]
+ description: Test rules
+ macros:
+ - 360005374974
+ ticket_form_id: 360000014173
+ title: Test Workspace 1
+ responses:
+ "201":
+ description: Created workspace
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ workspace:
+ $ref: '#/components/schemas/WorkspaceObject'
+ examples:
+ default:
+ value:
+ workspace:
+ activated: true
+ apps: [ ]
+ conditions:
+ all:
+ - field: ticket_form_id
+ operator: is
+ value: "360000014173"
+ any: [ ]
+ created_at: "2018-11-13T19:08:13Z"
+ description: Test rules
+ id: 3133
+ macro_ids:
+ - 360005374974
+ position: 1
+ prefer_workspace_app_order: true
+ selected_macros:
+ - actions:
+ - field: status
+ value: solved
+ active: true
+ created_at: "2018-02-08T23:45:30Z"
+ description: null
+ id: 360005374974
+ position: 9999
+ restriction:
+ id: 360002226093
+ ids:
+ - 360002226093
+ type: Group
+ title: Close and redirect to topics
+ updated_at: "2018-11-08T22:27:00Z"
+ url: https://{subdomain}.zendesk.com/api/v2/macros/360005374974
+ usage_7d: 0
+ ticket_form_id: 360000014173
+ title: Test Workspace 1
+ updated_at: "2018-12-17T22:37:40Z"
+ url: https://{subdomain}.zendesk.com/api/v2/workspaces
+ /api/v2/workspaces/{workspace_id}:
+ parameters:
+ - $ref: '#/components/parameters/WorkspaceId'
+ get:
+ operationId: ShowWorkspace
+ tags:
+ - Workspaces
+ summary: Show Workspace
+ description: |
+ #### Allowed For
+ * Admins
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ workspace:
+ $ref: '#/components/schemas/WorkspaceObject'
+ examples:
+ default:
+ value:
+ workspace:
+ activated: true
+ apps: [ ]
+ conditions:
+ all:
+ - field: ticket_form_id
+ operator: is
+ value: "360000014173"
+ any: [ ]
+ created_at: "2018-11-13T19:08:13Z"
+ description: Test rules
+ id: 3133
+ macro_ids:
+ - 360005374974
+ position: 1
+ prefer_workspace_app_order: true
+ selected_macros:
+ - actions:
+ - field: status
+ value: solved
+ active: true
+ created_at: "2018-02-08T23:45:30Z"
+ description: null
+ id: 360005374974
+ position: 9999
+ restriction:
+ id: 360002226093
+ ids:
+ - 360002226093
+ type: Group
+ title: Close and redirect to topics
+ updated_at: "2018-11-08T22:27:00Z"
+ url: https://{subdomain}.zendesk.com/api/v2/macros/360005374974
+ usage_7d: 0
+ ticket_form_id: 360000014173
+ title: Test Workspace 1
+ updated_at: "2018-12-17T22:37:40Z"
+ url: https://{subdomain}.zendesk.com/api/v2/workspaces
+ put:
+ operationId: UpdateWorkspace
+ tags:
+ - Workspaces
+ summary: Update Workspace
+ description: |-
+ #### Allowed For
+ * Admins
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ workspace:
+ $ref: '#/components/schemas/WorkspaceInput'
+ examples:
+ default:
+ value:
+ workspace:
+ conditions:
+ all:
+ - field: ticket_form_id
+ operator: is
+ value: "360000014173"
+ any: [ ]
+ description: Test rules
+ macros:
+ - 360005374974
+ ticket_form_id: 360000014173
+ title: Test Workspace 1
+ responses:
+ "200":
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ workspace:
+ $ref: '#/components/schemas/WorkspaceObject'
+ examples:
+ default:
+ value:
+ workspace:
+ activated: true
+ apps: [ ]
+ conditions:
+ all:
+ - field: ticket_form_id
+ operator: is
+ value: "360000014173"
+ any: [ ]
+ created_at: "2018-11-13T19:08:13Z"
+ description: Test rules
+ id: 3133
+ macro_ids:
+ - 360005374974
+ position: 1
+ prefer_workspace_app_order: true
+ selected_macros:
+ - actions:
+ - field: status
+ value: solved
+ active: true
+ created_at: "2018-02-08T23:45:30Z"
+ description: null
+ id: 360005374974
+ position: 9999
+ restriction:
+ id: 360002226093
+ ids:
+ - 360002226093
+ type: Group
+ title: Close and redirect to topics
+ updated_at: "2018-11-08T22:27:00Z"
+ url: https://{subdomain}.zendesk.com/api/v2/macros/360005374974
+ usage_7d: 0
+ ticket_form_id: 360000014173
+ title: Test Workspace 1
+ updated_at: "2018-12-17T22:37:40Z"
+ url: https://{subdomain}.zendesk.com/api/v2/workspaces
+ delete:
+ operationId: DeleteWorkspace
+ tags:
+ - Workspaces
+ summary: Delete Workspace
+ description: |
+ #### Allowed For
+ * Admins
+ responses:
+ "204":
+ description: No Content
+ /api/v2/workspaces/destroy_many:
+ delete:
+ operationId: DestroyManyWorkspaces
+ tags:
+ - Workspaces
+ summary: Bulk Delete Workspaces
+ description: |
+ #### Allowed For
+ * Admins
+ parameters:
+ - name: ids
+ in: query
+ description: The ids of the workspaces to delete
+ required: true
+ schema:
+ type: array
+ items:
+ type: integer
+ example:
+ - 1
+ - 2
+ - 3
+ responses:
+ "200":
+ description: Succesful response
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /api/v2/workspaces/reorder:
+ put:
+ operationId: ReorderWorkspaces
+ tags:
+ - Workspaces
+ summary: Reorder Workspaces
+ description: |
+ #### Allowed For
+ * Admins
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ ids:
+ type: array
+ items:
+ type: number
+ examples:
+ default:
+ value:
+ ids:
+ - 12
+ - 32
+ - 48
+ - 60
+ responses:
+ "200":
+ description: Succesful response
+ content:
+ application/json:
+ schema:
+ type: string
+ description: Empty response
+ example: ""
+ example: ""
+ /oauth/tokens:
+ post:
+ operationId: CreateTokenForGrantType
+ tags:
+ - Grant Type Tokens
+ summary: Create Token for Grant Type
+ description: |
+ Returns an OAuth access token in exchange for one of the following:
+
+ - an [authorization code](https://support.zendesk.com/hc/en-us/articles/4408845965210#topic_pvr_ncl_1l)
+ - a [refresh token](https://support.zendesk.com/hc/en-us/articles/4408845965210#topic_p1c_xjf_52c)
+ - a [client secret](https://support.zendesk.com/hc/en-us/articles/4408845965210#topic_s21_lfs_qk)
+
+ **Note**: The password grant type flow, which used a Zendesk username and password to get an access token, has been deprecated and is highly discouraged.
+
+ To revoke an access token, see [Revoke Token](/api-reference/ticketing/oauth/oauth_tokens/#revoke-token).
+
+ #### Request parameters
+
+ The POST request takes the following parameters, which must be formatted as JSON:
+
+ | Name | Description
+ | ------------- | --------------------------------------------------
+ | grant_type | "authorization_code", "refresh_token", or "client_credentials"
+ | code | Authorization grant flow only. The authorization code you received from Zendesk after the user granted access. The code is valid for only 120 seconds. See [Handle the user's authorization decision](https://support.zendesk.com/hc/en-us/articles/4408845965210#topic_ykc_dcm_dcc) in Zendesk help
+ | client_id | The **Identifier** value specified in an OAuth client in the Zendesk Admin Center (**Apps and integrations** > **APIs** > **OAuth clients**). See [Registering your application with Zendesk](https://support.zendesk.com/hc/en-us/articles/4408845965210#topic_s21_lfs_qk)
+ | client_secret | The **Secret** value specified in an OAuth client in the Admin Center (**Apps and integrations** > **APIs** > **OAuth clients**). See [Registering your application with Zendesk](https://support.zendesk.com/hc/en-us/articles/4408845965210#topic_s21_lfs_qk)
+ | redirect_uri | Authorization grant flow only. The redirect URL you specified when you sent the user to the Zendesk authorization page. For ID purposes only. See [Send the user to the Zendesk authorization page](https://support.zendesk.com/hc/en-us/articles/4408845965210#topic_mkc_dcm_dcc)
+ | scope | Valid scope for this token. A string of space-separated values. See [Scope](#scope) below
+ | expires_in | Number of seconds the access token is valid. Must be more than 300 seconds (5 minutes) and less than 172,800 seconds (2 days), or less than `refresh_token_expires_in`, whichever is the shorter. Defaults to null
+ | refresh_token_expires_in | Number of seconds the refresh token is valid. Must be more than 604,800 seconds (7 days) or `expires_in` (if given), and less than 7,776,000 seconds (90 days). Defaults to 2,592,000 seconds (30 days)
+ | refresh_token | A valid refresh token. See [Replacing expired access tokens](https://support.zendesk.com/hc/en-us/articles/4408845965210#topic_p1c_xjf_52c)
+
+ **Authorization code example**
+
+ ```javascript
+ const tokenResponse = await axios.post(
+ "https://{subdomain}.zendesk.com/oauth/tokens",
+ {
+ grant_type: "authorization_code",
+ code: AUTHORIZATION_CODE,
+ client_id: ZENDESK_CLIENT_ID,
+ redirect_uri: REDIRECT_URI_PKCE,
+ scope: "read write",
+ code_verifier: CODE_VERIFIER,
+ expires_in: 86400,
+ refresh_token_expires_in: 604800,
+ },
+ { headers: { "Content-Type": "application/json" } }
+ );
+ ```
+
+ **Refresh token example**
+
+ ```javascript
+ const tokenResponse = await axios.post(
+ "https://{subdomain}.zendesk.com/oauth/tokens",
+ {
+ grant_type: "refresh_token",
+ refresh_token: REFRESH_TOKEN,
+ client_id: ZENDESK_CLIENT_ID,
+ client_secret: ZENDESK_CLIENT_SECRET,
+ scope: "tickets:write",
+ expires_in: 86400,
+ refresh_token_expires_in: 604800,
+ },
+ { headers: { "Content-Type": "application/json" } }
+ );
+ ```
+
+ **Client credentials example**
+
+ ```javascript
+ const tokenResponse = await axios.post(
+ "https://{subdomain}.zendesk.com/oauth/tokens",
+ {
+ grant_type: "client_credentials",
+ client_id: ZENDESK_CLIENT_ID,
+ client_secret: ZENDESK_CLIENT_SECRET,
+ scope: "tickets:write",
+ expires_in: 86400
+ },
+ { headers: { "Content-Type": "application/json" } }
+ );
+ ```
+
+ #### Scope
+
+ You must specify a scope to control the app's access to Zendesk resources. The "read" scope gives access to GET endpoints. It includes permission to sideload related resources. The "write" scope gives access to POST, PUT, and DELETE endpoints for creating, updating, and deleting resources.
+
+ **Note**: Don't confuse the **scope** parameter (singular) with the **scopes** parameter (plural) for non-grant-type tokens described in [OAuth Tokens](/api-reference/ticketing/oauth/oauth_tokens).
+
+ The "impersonate" scope allows a Zendesk admin to make requests on behalf of end users. See [Making API requests on behalf of end users](/documentation/ticketing/using-the-zendesk-api/making-api-requests-on-behalf-of-end-users/).
+
+ **Broad scopes**
+
+ The following parameter gives read access to all resources:
+
+ `"scope": "read"`
+
+ The following parameter gives read and write access to all resources:
+
+ `"scope": "read write"`
+
+ **Resource-specific scopes**
+
+ You can fine-tune the scope of the following resources:
+
+ - [tickets](/api-reference/ticketing/tickets/tickets/)
+ - [users](/api-reference/ticketing/users/users/)
+ - [audit logs (read only)](/api-reference/ticketing/account-configuration/audit_logs/)
+ - [organizations](/api-reference/ticketing/organizations/organizations/)
+ - [help center resources](/api-reference/help_center/help-center-api/introduction/)
+ - [apps](/api-reference/apps/introduction/)
+ - [triggers](/api-reference/ticketing/business-rules/triggers/)
+ - [automations](/api-reference/ticketing/business-rules/automations/)
+ - [targets](/api-reference/ticketing/targets/targets/)
+ - [webhooks](/api-reference/webhooks/introduction/)
+
+ The syntax is as follows:
+
+ `"scope": "resource:scope"`
+
+ For example, the following parameter restricts the scope to only reading tickets:
+
+ `"scope": "tickets:read"`
+
+ To give read and write access to a resource, specify both scopes:
+
+ `"scope": "users:read users:write"`
+
+ To give write access only to one resource, such as organizations, and read access to everything else:
+
+ `"scope": "organizations:write read"`
+
+ **Restrictions and limitations**
+
+ A "Forbidden" error can occur either because the token is missing required scopes for an endpoint, or because the requested scopes were provided in an invalid format.
+
+ - The resources defined in the scope must align with the resources accessed by the API endpoint. If the token lacks the required scope for an endpoint, the request will fail with a "Forbidden" error.
+ - The endpoint can return an access token even if you specify an invalid scope such as `"scope": ["read", "write"]`. Any request you make with the token will return a "Forbidden" error.
+
+ #### Tokens for Implicit Grant Type
+
+ The implicit grant flow has been deprecated. It's considered insecure and its use is highly discouraged.
+ responses:
+ "201":
+ description: Created response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OAuthTokenForGrantTypesObject'
+ examples:
+ default:
+ $ref: '#/components/examples/OAuthTokenForGrantTypesResponseExample'
+components:
+ schemas:
+ AccessRule:
+ type: object
+ properties:
+ conditions:
+ type: object
+ description: The conditions that define when this rule applies
+ properties:
+ all:
+ type: array
+ description: All conditions must be true (AND logic)
+ items:
+ $ref: '#/components/schemas/AccessRuleCondition'
+ any:
+ type: array
+ description: Any condition can be true (OR logic)
+ items:
+ $ref: '#/components/schemas/AccessRuleCondition'
+ created_at:
+ type: string
+ format: date-time
+ description: When the access rule was created
+ example: "2025-09-17T10:15:30Z"
+ description:
+ type: string
+ description: A description of what this access rule does
+ example: Access rule that limits access to orders created by the current user
+ id:
+ type: integer
+ description: The access rule ID
+ example: 6862342718335
+ title:
+ type: string
+ description: The title of the access rule
+ example: Orders Created by Current User
+ updated_at:
+ type: string
+ format: date-time
+ description: When the access rule was last updated
+ example: "2025-09-17T14:30:45Z"
+ AccessRuleCondition:
+ type: object
+ properties:
+ field:
+ type: string
+ description: The field to evaluate in the condition
+ example: created_by_user
+ operator:
+ type: string
+ description: The comparison operator to use. Not all field types support all operators.
+ enum:
+ - is
+ - is_not
+ - greater_than
+ - less_than
+ - greater_than_equal
+ - less_than_equal
+ - includes
+ - not_includes
+ - matches
+ - present
+ example: matches
+ value:
+ description: The value to compare against. Can be null for terminal operators like 'present' and 'not_present'
+ oneOf:
+ - type: string
+ - type: integer
+ - type: number
+ - type: boolean
+ - type: "null"
+ example: current_user
+ AccessRuleCreateRequest:
+ type: object
+ properties:
+ access_rule:
+ type: object
+ properties:
+ conditions:
+ type: object
+ description: The conditions that define when this rule applies
+ properties:
+ all:
+ type: array
+ description: All conditions must be true (AND logic)
+ items:
+ $ref: '#/components/schemas/AccessRuleCondition'
+ any:
+ type: array
+ description: Any condition can be true (OR logic)
+ items:
+ $ref: '#/components/schemas/AccessRuleCondition'
+ description:
+ type: string
+ description: A description of what this access rule does
+ example: Access rule that limits access to orders created by the current user
+ title:
+ type: string
+ description: The title of the access rule
+ example: Orders Created by Current User
+ AccessRuleDefinitionsResponse:
+ type: object
+ properties:
+ definitions:
+ type: object
+ properties:
+ conditions_all:
+ type: array
+ description: Available field definitions for 'all' conditions (AND logic)
+ items:
+ $ref: '#/components/schemas/AccessRuleFieldDefinition'
+ conditions_any:
+ type: array
+ description: Available field definitions for 'any' conditions (OR logic)
+ items:
+ $ref: '#/components/schemas/AccessRuleFieldDefinition'
+ AccessRuleFieldDefinition:
+ type: object
+ properties:
+ group:
+ type: string
+ metadata:
+ type: object
+ properties:
+ collection_key:
+ type: string
+ field_id:
+ type: integer
+ nullable: true
+ item_key:
+ type: string
+ source:
+ type: string
+ nullable: true
+ url:
+ type: string
+ nullable:
+ type: boolean
+ operators:
+ type: array
+ items:
+ type: object
+ properties:
+ format:
+ type: string
+ terminal:
+ type: boolean
+ title:
+ type: string
+ value:
+ type: string
+ repeatable:
+ type: boolean
+ subject:
+ type: string
+ title:
+ type: string
+ type:
+ type: string
+ values:
+ type: array
+ items:
+ type: object
+ properties:
+ dynamic:
+ type: boolean
+ enabled:
+ type: boolean
+ title:
+ type: string
+ value:
+ type: string
+ AccessRuleResponse:
+ type: object
+ properties:
+ access_rule:
+ $ref: '#/components/schemas/AccessRule'
+ AccessRuleUpdateRequest:
+ type: object
+ properties:
+ access_rule:
+ type: object
+ properties:
+ conditions:
+ type: object
+ description: The conditions that define when this rule applies
+ properties:
+ all:
+ type: array
+ description: All conditions must be true (AND logic)
+ items:
+ $ref: '#/components/schemas/AccessRuleCondition'
+ any:
+ type: array
+ description: Any condition can be true (OR logic)
+ items:
+ $ref: '#/components/schemas/AccessRuleCondition'
+ description:
+ type: string
+ description: A description of what this access rule does
+ example: Access rule for orders above a certain value
+ title:
+ type: string
+ description: The title of the access rule
+ example: High Value Orders
+ AccessRulesResponse:
+ type: object
+ properties:
+ access_rules:
+ type: array
+ items:
+ $ref: '#/components/schemas/AccessRule'
+ AccountSettingsActiveFeaturesObject:
+ type: object
+ description: The active features for an account. See [Active Features](#active-features)
+ properties:
+ agent_forwarding:
+ type: boolean
+ allow_ccs:
+ type: boolean
+ allow_email_template_customization:
+ type: boolean
+ automatic_answers:
+ type: boolean
+ bcc_archiving:
+ type: boolean
+ benchmark_opt_out:
+ type: boolean
+ business_hours:
+ type: boolean
+ chat:
+ type: boolean
+ chat_about_my_ticket:
+ type: boolean
+ csat_reason_code:
+ type: boolean
+ custom_dkim_domain:
+ type: boolean
+ customer_context_as_default:
+ type: boolean
+ customer_satisfaction:
+ type: boolean
+ dynamic_contents:
+ type: boolean
+ explore:
+ type: boolean
+ explore_on_support_ent_plan:
+ type: boolean
+ explore_on_support_pro_plan:
+ type: boolean
+ facebook:
+ type: boolean
+ facebook_login:
+ type: boolean
+ fallback_composer:
+ type: boolean
+ forum_analytics:
+ type: boolean
+ good_data_and_explore:
+ type: boolean
+ google_login:
+ type: boolean
+ is_abusive:
+ type: boolean
+ light_agents:
+ type: boolean
+ markdown:
+ type: boolean
+ on_hold_status:
+ type: boolean
+ organization_access_enabled:
+ type: boolean
+ rich_content_in_emails:
+ type: boolean
+ sandbox:
+ type: boolean
+ satisfaction_prediction:
+ type: boolean
+ suspended_ticket_notification:
+ type: boolean
+ ticket_forms:
+ type: boolean
+ ticket_tagging:
+ type: boolean
+ topic_suggestion:
+ type: boolean
+ twitter:
+ type: boolean
+ twitter_login:
+ type: boolean
+ user_org_fields:
+ type: boolean
+ user_tagging:
+ type: boolean
+ voice:
+ type: boolean
+ AccountSettingsAgentObject:
+ type: object
+ description: Configuration for the agent workspace. See [Agents](#agents)
+ properties:
+ agent_home:
+ type: boolean
+ agent_workspace:
+ type: boolean
+ aw_self_serve_migration_enabled:
+ type: boolean
+ focus_mode:
+ type: boolean
+ idle_timeout_enabled:
+ type: boolean
+ unified_agent_statuses:
+ type: boolean
+ AccountSettingsApiObject:
+ type: object
+ description: API configuration options. See [API](#api)
+ properties:
+ accepted_api_agreement:
+ type: boolean
+ api_password_access_end_users:
+ type: boolean
+ api_token_access:
+ type: string
+ AccountSettingsAppsObject:
+ type: object
+ description: Apps configuration options. See [Apps](#apps)
+ properties:
+ create_private:
+ type: boolean
+ create_public:
+ type: boolean
+ use:
+ type: boolean
+ AccountSettingsBillingObject:
+ type: object
+ description: Billing configuration options. See [Billing](#billing)
+ properties:
+ backend:
+ type: string
+ AccountSettingsBrandingObject:
+ type: object
+ description: Branding settings. See [Branding](#branding)
+ properties:
+ favicon_url:
+ type: string
+ nullable: true
+ header_color:
+ type: string
+ header_logo_url:
+ type: string
+ nullable: true
+ page_background_color:
+ type: string
+ tab_background_color:
+ type: string
+ text_color:
+ type: string
+ AccountSettingsBrandsObject:
+ type: object
+ description: Brand settings. See [Brands](#brands)
+ properties:
+ default_brand_id:
+ type: integer
+ end_user_across_brand_requests:
+ type: boolean
+ require_brand_on_new_tickets:
+ type: boolean
+ AccountSettingsCdnObject:
+ type: object
+ description: CDN settings
+ properties:
+ cdn_provider:
+ type: string
+ fallback_cdn_provider:
+ type: string
+ hosts:
+ type: array
+ items:
+ type: object
+ properties:
+ name:
+ type: string
+ url:
+ type: string
+ AccountSettingsChatObject:
+ type: object
+ description: Zendesk Chat settings. See [Chat](#chat)
+ properties:
+ available:
+ type: boolean
+ enabled:
+ type: boolean
+ integrated:
+ type: boolean
+ maximum_request_count:
+ type: integer
+ welcome_message:
+ type: string
+ AccountSettingsCrossSellObject:
+ type: object
+ description: Cross Sell settings
+ properties:
+ show_chat_tooltip:
+ type: boolean
+ xsell_source:
+ type: string
+ nullable: true
+ AccountSettingsDeviceObject:
+ type: object
+ description: End user device settings. See [Device Metadata](#device-metadata)
+ properties:
+ enabled:
+ type: boolean
+ hide_ip:
+ type: boolean
+ hide_location:
+ type: boolean
+ AccountSettingsEmailObject:
+ type: object
+ description: Email settings
+ properties:
+ accept_wildcard_emails:
+ type: boolean
+ custom_dkim_domain:
+ type: boolean
+ email_sender_authentication:
+ type: boolean
+ description: Whether incoming email is subjected to sender authentication checks (SPF, DKIM)
+ email_sender_authentication_profile:
+ type: string
+ description: The sender authentication profile in use.
+ enum:
+ - default
+ - enhanced
+ email_status:
+ type: boolean
+ description: Whether email status and delivery information is shown in the Agent Workspace
+ email_template_photos:
+ type: boolean
+ email_template_selection:
+ type: boolean
+ gmail_actions:
+ type: boolean
+ html_mail_template:
+ type: string
+ mail_delimiter:
+ type: string
+ modern_email_template:
+ type: boolean
+ no_mail_delimiter:
+ type: boolean
+ personalized_replies:
+ type: boolean
+ rich_content_in_emails:
+ type: boolean
+ send_gmail_messages_via_gmail:
+ type: boolean
+ text_mail_template:
+ type: string
+ AccountSettingsGoogleAppsObject:
+ type: object
+ description: Google Apps configuration. See [G Suite](#g-suite)
+ properties:
+ has_google_apps:
+ type: boolean
+ has_google_apps_admin:
+ type: boolean
+ AccountSettingsGroupObject:
+ type: object
+ description: Group configuration
+ properties:
+ check_group_name_uniqueness:
+ type: boolean
+ AccountSettingsKnowledgeObject:
+ type: object
+ description: Account's knowledge management and search capabilities. See [Knowledge](#knowledge)
+ properties:
+ default_search_filters_brands:
+ type: string
+ default_search_filters_categories:
+ type: string
+ default_search_filters_external_content_sources:
+ type: string
+ default_search_filters_locales:
+ type: string
+ default_search_filters_sections:
+ type: string
+ generative_answers:
+ type: boolean
+ require_article_templates:
+ type: boolean
+ search_articles:
+ type: boolean
+ search_community_posts:
+ type: boolean
+ search_external_content:
+ type: boolean
+ AccountSettingsLimitsObject:
+ type: object
+ description: Account limits configuration. See [Limits](#limits)
+ properties:
+ attachment_size:
+ type: integer
+ AccountSettingsLocalizationObject:
+ type: object
+ description: Internationalization configuration settings. See [Localization](#localization)
+ properties:
+ locale_ids:
+ type: array
+ items:
+ type: integer
+ AccountSettingsLotusObject:
+ type: object
+ description: Support UI settings. See [Lotus](#lotus)
+ properties:
+ pod_id:
+ type: integer
+ prefer_lotus:
+ type: boolean
+ reporting:
+ type: boolean
+ AccountSettingsMessageInactivityObject:
+ type: object
+ description: Auto-release capacity settings. See [Messaging inactivity](#messaging-inactivity)
+ properties:
+ default_localized_messages:
+ type: object
+ properties:
+ pre_solved_message_1:
+ type: string
+ description: The first pre-solved message
+ readOnly: true
+ pre_solved_message_2:
+ type: string
+ description: The second pre-solved message
+ readOnly: true
+ solved_message:
+ type: string
+ description: The solved message
+ readOnly: true
+ readOnly: true
+ enabled:
+ type: boolean
+ description: Whether the messaging inactivity feature is enabled
+ end_session:
+ type: boolean
+ description: Whether messaging session should end with the final reminder
+ reminders:
+ type: array
+ items:
+ type: object
+ properties:
+ message:
+ type: string
+ description: Mandatory message for the reminder
+ tags:
+ type: array
+ description: Array of strings, tags added to ticket with each reminder. Can be empty
+ items:
+ type: string
+ ticket_status_id:
+ type: integer
+ description: Ticket status id, available and mandatory for the 2nd and 3rd reminders, if the reminder is configured. The field can be null to indicate no status change
+ nullable: true
+ timeout:
+ type: integer
+ description: Reminder timeout in seconds, available and mandatory for the 2nd and 3rd reminders, if the reminder is configured
+ nullable: true
+ required:
+ - message
+ ticket_status_id:
+ type: integer
+ description: Ticket status id to apply on the ticket when it is marked as inactive
+ timeout:
+ type: integer
+ description: Timeout in minutes after which the ticket will be marked as inactive
+ AccountSettingsMetricsObject:
+ type: object
+ description: Account metrics settings. See [Metrics](#metrics)
+ properties:
+ account_size:
+ type: string
+ AccountSettingsObject:
+ type: object
+ properties:
+ active_features:
+ $ref: '#/components/schemas/AccountSettingsActiveFeaturesObject'
+ agents:
+ $ref: '#/components/schemas/AccountSettingsAgentObject'
+ api:
+ $ref: '#/components/schemas/AccountSettingsApiObject'
+ apps:
+ $ref: '#/components/schemas/AccountSettingsAppsObject'
+ billing:
+ $ref: '#/components/schemas/AccountSettingsBillingObject'
+ branding:
+ $ref: '#/components/schemas/AccountSettingsBrandingObject'
+ brands:
+ $ref: '#/components/schemas/AccountSettingsBrandsObject'
+ cdn:
+ $ref: '#/components/schemas/AccountSettingsCdnObject'
+ chat:
+ $ref: '#/components/schemas/AccountSettingsChatObject'
+ cross_sell:
+ $ref: '#/components/schemas/AccountSettingsCrossSellObject'
+ device_metadata:
+ $ref: '#/components/schemas/AccountSettingsDeviceObject'
+ email:
+ $ref: '#/components/schemas/AccountSettingsEmailObject'
+ google_apps:
+ $ref: '#/components/schemas/AccountSettingsGoogleAppsObject'
+ groups:
+ $ref: '#/components/schemas/AccountSettingsGroupObject'
+ knowledge:
+ $ref: '#/components/schemas/AccountSettingsKnowledgeObject'
+ limits:
+ $ref: '#/components/schemas/AccountSettingsLimitsObject'
+ localization:
+ $ref: '#/components/schemas/AccountSettingsLocalizationObject'
+ lotus:
+ $ref: '#/components/schemas/AccountSettingsLotusObject'
+ messaging_inactivity:
+ $ref: '#/components/schemas/AccountSettingsMessageInactivityObject'
+ metrics:
+ $ref: '#/components/schemas/AccountSettingsMetricsObject'
+ onboarding:
+ $ref: '#/components/schemas/AccountSettingsOnboardingObject'
+ routing:
+ $ref: '#/components/schemas/AccountSettingsRoutingObject'
+ rule:
+ $ref: '#/components/schemas/AccountSettingsRuleObject'
+ side_conversations:
+ $ref: '#/components/schemas/AccountSettingsSideConversationsObject'
+ statistics:
+ $ref: '#/components/schemas/AccountSettingsStatisticsObject'
+ ticket_form:
+ $ref: '#/components/schemas/AccountSettingsTicketFormObject'
+ tickets:
+ $ref: '#/components/schemas/AccountSettingsTicketObject'
+ twitter:
+ $ref: '#/components/schemas/AccountSettingsTwitterObject'
+ user:
+ $ref: '#/components/schemas/AccountSettingsUserObject'
+ voice:
+ $ref: '#/components/schemas/AccountSettingsVoiceObject'
+ example:
+ active_features:
+ agent_forwarding: false
+ allow_ccs: true
+ allow_email_template_customization: true
+ automatic_answers: false
+ bcc_archiving: false
+ benchmark_opt_out: false
+ business_hours: false
+ chat: false
+ chat_about_my_ticket: false
+ csat_reason_code: false
+ custom_dkim_domain: true
+ customer_context_as_default: false
+ customer_satisfaction: false
+ dynamic_contents: false
+ explore: true
+ explore_on_support_ent_plan: false
+ explore_on_support_pro_plan: false
+ facebook: false
+ facebook_login: false
+ fallback_composer: false
+ forum_analytics: true
+ good_data_and_explore: false
+ google_login: false
+ is_abusive: false
+ light_agents: false
+ markdown: false
+ on_hold_status: false
+ organization_access_enabled: true
+ rich_content_in_emails: true
+ sandbox: false
+ satisfaction_prediction: false
+ suspended_ticket_notification: false
+ ticket_forms: true
+ ticket_tagging: true
+ topic_suggestion: false
+ twitter: true
+ twitter_login: false
+ user_org_fields: true
+ user_tagging: true
+ voice: true
+ agents:
+ agent_home: false
+ agent_workspace: false
+ aw_self_serve_migration_enabled: true
+ focus_mode: false
+ idle_timeout_enabled: false
+ unified_agent_statuses: false
+ api:
+ accepted_api_agreement: true
+ api_password_access_end_users: true
+ api_token_access: "true"
+ apps:
+ create_private: true
+ create_public: false
+ use: true
+ billing:
+ backend: zuora
+ branding:
+ favicon_url: null
+ header_color: 78A300
+ header_logo_url: null
+ page_background_color: "333333"
+ tab_background_color: 7FA239
+ text_color: FFFFFF
+ brands:
+ default_brand_id: 1873
+ end_user_across_brand_requests: false
+ require_brand_on_new_tickets: false
+ cdn:
+ cdn_provider: default
+ fallback_cdn_provider: secondary
+ hosts:
+ - name: default
+ url: https://static.zdassets.com
+ - name: secondary
+ url: https://static-fallback.zdassets.com
+ chat:
+ available: true
+ enabled: false
+ integrated: true
+ maximum_request_count: 1
+ welcome_message: Hi there. How can I help today?
+ cross_sell:
+ show_chat_tooltip: true
+ xsell_source: null
+ device_metadata:
+ enabled: true
+ hide_ip: true
+ hide_location: true
+ email:
+ accept_wildcard_emails: false
+ custom_dkim_domain: false
+ email_sender_authentication: true
+ email_sender_authentication_profile: enhanced
+ email_status: true
+ email_template_photos: true
+ email_template_selection: false
+ gmail_actions: true
+ html_mail_template: "\r\n\r\n\r\n \r\n \r\n\r\n\r\n
\r\n
\r\n {{quoted_content}}\r\n\r\n\r\n"
+ mail_delimiter: '{{txt.email.delimiter}}'
+ modern_email_template: true
+ no_mail_delimiter: true
+ personalized_replies: true
+ rich_content_in_emails: true
+ send_gmail_messages_via_gmail: true
+ text_mail_template: "{{content}}\r\n\r\n{{footer}}\r\n\r\n{{quoted_content}}"
+ google_apps:
+ has_google_apps: false
+ has_google_apps_admin: false
+ groups:
+ check_group_name_uniqueness: true
+ knowledge:
+ default_search_filters_brands: _TICKET
+ default_search_filters_categories: ""
+ default_search_filters_external_content_sources: ""
+ default_search_filters_locales: _TICKET
+ default_search_filters_sections: ""
+ generative_answers: true
+ require_article_templates: false
+ search_articles: true
+ search_community_posts: true
+ search_external_content: true
+ limits:
+ attachment_size: 52428800
+ localization:
+ locale_ids:
+ - 1042
+ lotus:
+ pod_id: 999
+ prefer_lotus: true
+ reporting: true
+ messaging_inactivity:
+ default_localized_messages:
+ pre_solved_message_1: Waiting on your response. If we don't hear from you within a few minutes, this ticket will be marked as solved.
+ pre_solved_message_2: This ticket will be marked as solved soon. We hope to hear from you.
+ solved_message: As we haven't heard from you in a while, we'll be marking this ticket as solved.
+ enabled: true
+ reminders:
+ - message: Waiting on your response. If we don't hear from you within a few minutes, this ticket will be marked as solved.
+ - message: This ticket will be marked as solved soon. We hope to hear from you.
+ ticket_status_id: null
+ timeout: 300
+ - message: As we haven't heard from you in a while, we'll be marking this ticket as solved.
+ ticket_status_id: 8678123367037
+ timeout: 60
+ ticket_status_id: 8001424138749
+ timeout: 5
+ metrics:
+ account_size: 100-399
+ onboarding:
+ checklist_onboarding_version: 2
+ onboarding_segments: null
+ product_sign_up: null
+ routing:
+ autorouting_tag: ""
+ enabled: false
+ max_email_capacity: 0
+ max_messaging_capacity: 0
+ reassignment_messaging_enabled: true
+ reassignment_messaging_timeout: 30
+ reassignment_talk_timeout: 30
+ rule:
+ macro_most_used: true
+ macro_order: alphabetical
+ skill_based_filtered_views: [ ]
+ using_skill_based_routing: false
+ side_conversations:
+ email_channel: false
+ msteams_channel: false
+ show_in_context_panel: false
+ slack_channel: false
+ tickets_channel: false
+ statistics:
+ forum: true
+ rule_usage: true
+ search: true
+ ticket_form:
+ raw_ticket_forms_instructions: Please choose your issue below
+ ticket_forms_instructions: Please choose your issue below
+ tickets:
+ accepted_new_collaboration_tos: false
+ agent_collision: true
+ agent_invitation_enabled: true
+ agent_ticket_deletion: false
+ allow_group_reset: true
+ assign_default_organization: true
+ assign_tickets_upon_solve: true
+ auto_translation_enabled: false
+ auto_updated_ccs_followers_rules: false
+ chat_sla_enablement: false
+ collaboration: true
+ comments_public_by_default: true
+ default_solved_ticket_reassignment_strategy: legacy
+ default_to_draft_mode: false
+ email_attachments: false
+ emoji_autocompletion: true
+ follower_and_email_cc_collaborations: false
+ has_color_text: true
+ is_first_comment_private_enabled: true
+ light_agent_email_ccs_allowed: false
+ list_empty_views: true
+ list_newest_comments_first: true
+ markdown_ticket_comments: false
+ maximum_personal_views_to_list: 8
+ modern_ticket_reassignment: false
+ private_attachments: false
+ rich_text_comments: true
+ show_modern_ticket_reassignment: false
+ status_hold: false
+ tagging: true
+ using_skill_based_routing: false
+ twitter:
+ shorten_url: optional
+ user:
+ agent_created_welcome_emails: true
+ end_user_phone_number_validation: false
+ have_gravatars_enabled: true
+ language_selection: true
+ multiple_organizations: false
+ tagging: true
+ time_zone_selection: true
+ voice:
+ agent_confirmation_when_forwarding: true
+ agent_wrap_up_after_calls: true
+ enabled: true
+ logging: true
+ maximum_queue_size: 5
+ maximum_queue_wait_time: 1
+ only_during_business_hours: false
+ outbound_enabled: true
+ recordings_public: true
+ uk_mobile_forwarding: true
+ AccountSettingsOnboardingObject:
+ type: object
+ description: Onboarding settings
+ properties:
+ checklist_onboarding_version:
+ type: integer
+ onboarding_segments:
+ type: string
+ nullable: true
+ product_sign_up:
+ type: string
+ nullable: true
+ AccountSettingsResponse:
+ type: object
+ properties:
+ settings:
+ $ref: '#/components/schemas/AccountSettingsObject'
+ example:
+ settings:
+ active_features:
+ agent_forwarding: false
+ allow_ccs: true
+ allow_email_template_customization: true
+ automatic_answers: false
+ bcc_archiving: false
+ benchmark_opt_out: false
+ business_hours: false
+ chat: false
+ chat_about_my_ticket: false
+ csat_reason_code: false
+ custom_dkim_domain: true
+ customer_context_as_default: false
+ customer_satisfaction: false
+ dynamic_contents: false
+ explore: true
+ explore_on_support_ent_plan: false
+ explore_on_support_pro_plan: false
+ facebook: false
+ facebook_login: false
+ fallback_composer: false
+ forum_analytics: true
+ good_data_and_explore: false
+ google_login: false
+ is_abusive: false
+ light_agents: false
+ markdown: false
+ on_hold_status: false
+ organization_access_enabled: true
+ rich_content_in_emails: true
+ sandbox: false
+ satisfaction_prediction: false
+ suspended_ticket_notification: false
+ ticket_forms: true
+ ticket_tagging: true
+ topic_suggestion: false
+ twitter: true
+ twitter_login: false
+ user_org_fields: true
+ user_tagging: true
+ voice: true
+ agents:
+ agent_home: false
+ agent_workspace: false
+ aw_self_serve_migration_enabled: true
+ focus_mode: false
+ idle_timeout_enabled: false
+ unified_agent_statuses: false
+ api:
+ accepted_api_agreement: true
+ api_password_access_end_users: true
+ api_token_access: "true"
+ apps:
+ create_private: true
+ create_public: false
+ use: true
+ billing:
+ backend: zuora
+ branding:
+ favicon_url: null
+ header_color: 78A300
+ header_logo_url: null
+ page_background_color: "333333"
+ tab_background_color: 7FA239
+ text_color: FFFFFF
+ brands:
+ default_brand_id: 1873
+ end_user_across_brand_requests: false
+ require_brand_on_new_tickets: false
+ cdn:
+ cdn_provider: default
+ fallback_cdn_provider: secondary
+ hosts:
+ - name: default
+ url: https://static.zdassets.com
+ - name: secondary
+ url: https://static-fallback.zdassets.com
+ chat:
+ available: true
+ enabled: false
+ integrated: true
+ maximum_request_count: 1
+ welcome_message: Hi there. How can I help today?
+ cross_sell:
+ show_chat_tooltip: true
+ xsell_source: null
+ email:
+ accept_wildcard_emails: false
+ custom_dkim_domain: false
+ email_sender_authentication: true
+ email_sender_authentication_profile: enhanced
+ email_status: true
+ email_template_photos: true
+ email_template_selection: false
+ gmail_actions: true
+ html_mail_template: "\r\n\r\n\r\n \r\n \r\n\r\n\r\n
\r\n
\r\n {{quoted_content}}\r\n\r\n\r\n"
+ mail_delimiter: '{{txt.email.delimiter}}'
+ modern_email_template: true
+ no_mail_delimiter: true
+ personalized_replies: true
+ rich_content_in_emails: true
+ send_gmail_messages_via_gmail: true
+ text_mail_template: "{{content}}\r\n\r\n{{footer}}\r\n\r\n{{quoted_content}}"
+ google_apps:
+ has_google_apps: false
+ has_google_apps_admin: false
+ groups:
+ check_group_name_uniqueness: true
+ limits:
+ attachment_size: 52428800
+ localization:
+ locale_ids:
+ - 1042
+ lotus:
+ pod_id: 999
+ prefer_lotus: true
+ reporting: true
+ messaging_inactivity:
+ default_localized_messages:
+ pre_solved_message_1: Waiting on your response. If we don't hear from you within a few minutes, this ticket will be marked as solved.
+ pre_solved_message_2: This ticket will be marked as solved soon. We hope to hear from you.
+ solved_message: As we haven't heard from you in a while, we'll be marking this ticket as solved.
+ enabled: true
+ reminders:
+ - message: Waiting on your response. If we don't hear from you within a few minutes, this ticket will be marked as solved.
+ - message: This ticket will be marked as solved soon. We hope to hear from you.
+ ticket_status_id: null
+ timeout: 300
+ - message: As we haven't heard from you in a while, we'll be marking this ticket as solved.
+ ticket_status_id: 8678123367037
+ timeout: 60
+ ticket_status_id: 8001424138749
+ timeout: 5
+ metrics:
+ account_size: 100-399
+ onboarding:
+ checklist_onboarding_version: 2
+ onboarding_segments: null
+ product_sign_up: null
+ routing:
+ autorouting_tag: ""
+ enabled: false
+ max_email_capacity: 0
+ max_messaging_capacity: 0
+ rule:
+ macro_most_used: true
+ macro_order: alphabetical
+ skill_based_filtered_views: [ ]
+ using_skill_based_routing: false
+ side_conversations:
+ email_channel: false
+ msteams_channel: false
+ show_in_context_panel: false
+ slack_channel: false
+ tickets_channel: false
+ statistics:
+ forum: true
+ rule_usage: true
+ search: true
+ ticket_form:
+ raw_ticket_forms_instructions: Please choose your issue below
+ ticket_forms_instructions: Please choose your issue below
+ tickets:
+ accepted_new_collaboration_tos: false
+ agent_collision: true
+ agent_invitation_enabled: true
+ agent_ticket_deletion: false
+ allow_group_reset: true
+ assign_default_organization: true
+ assign_tickets_upon_solve: true
+ auto_translation_enabled: false
+ auto_updated_ccs_followers_rules: false
+ chat_sla_enablement: false
+ collaboration: true
+ comments_public_by_default: true
+ default_solved_ticket_reassignment_strategy: legacy
+ default_to_draft_mode: false
+ email_attachments: false
+ emoji_autocompletion: true
+ follower_and_email_cc_collaborations: false
+ has_color_text: true
+ is_first_comment_private_enabled: true
+ light_agent_email_ccs_allowed: false
+ list_empty_views: true
+ list_newest_comments_first: true
+ markdown_ticket_comments: false
+ maximum_personal_views_to_list: 8
+ modern_ticket_reassignment: false
+ private_attachments: false
+ rich_text_comments: true
+ show_modern_ticket_reassignment: false
+ status_hold: false
+ tagging: true
+ using_skill_based_routing: false
+ twitter:
+ shorten_url: optional
+ user:
+ agent_created_welcome_emails: true
+ end_user_phone_number_validation: false
+ have_gravatars_enabled: true
+ language_selection: true
+ multiple_organizations: false
+ tagging: true
+ time_zone_selection: true
+ voice:
+ agent_confirmation_when_forwarding: true
+ agent_wrap_up_after_calls: true
+ enabled: true
+ logging: true
+ maximum_queue_size: 5
+ maximum_queue_wait_time: 1
+ only_during_business_hours: false
+ outbound_enabled: true
+ recordings_public: true
+ uk_mobile_forwarding: true
+ AccountSettingsRoutingObject:
+ type: object
+ description: Configuration for routing. See [Routing](#routing)
+ properties:
+ autorouting_tag:
+ type: string
+ enabled:
+ type: boolean
+ max_email_capacity:
+ type: integer
+ max_messaging_capacity:
+ type: integer
+ reassignment_messaging_enabled:
+ type: boolean
+ reassignment_messaging_timeout:
+ type: integer
+ reassignment_talk_timeout:
+ type: integer
+ AccountSettingsRuleObject:
+ type: object
+ description: Rules settings for triggers, macros, views, and automations. See [Rules](#rules)
+ properties:
+ macro_most_used:
+ type: boolean
+ macro_order:
+ type: string
+ skill_based_filtered_views:
+ type: array
+ items:
+ type: object
+ additionalProperties: true
+ using_skill_based_routing:
+ type: boolean
+ AccountSettingsSideConversationsObject:
+ type: object
+ description: Side conversations settings
+ properties:
+ email_channel:
+ type: boolean
+ msteams_channel:
+ type: boolean
+ show_in_context_panel:
+ type: boolean
+ slack_channel:
+ type: boolean
+ tickets_channel:
+ type: boolean
+ AccountSettingsStatisticsObject:
+ type: object
+ description: Account statistics settings. See [Statistics](#statistics)
+ properties:
+ forum:
+ type: boolean
+ rule_usage:
+ type: boolean
+ search:
+ type: boolean
+ AccountSettingsTicketFormObject:
+ type: object
+ description: Ticket form settings. See [Ticket Form](#ticket-form)
+ properties:
+ raw_ticket_forms_instructions:
+ type: string
+ ticket_forms_instructions:
+ type: string
+ AccountSettingsTicketObject:
+ type: object
+ description: Ticket settings. See [Tickets](#tickets)
+ properties:
+ accepted_new_collaboration_tos:
+ type: boolean
+ agent_collision:
+ type: boolean
+ agent_invitation_enabled:
+ type: boolean
+ agent_ticket_deletion:
+ type: boolean
+ allow_group_reset:
+ type: boolean
+ assign_default_organization:
+ type: boolean
+ assign_tickets_upon_solve:
+ type: boolean
+ auto_translation_enabled:
+ type: boolean
+ auto_updated_ccs_followers_rules:
+ type: boolean
+ chat_sla_enablement:
+ type: boolean
+ collaboration:
+ type: boolean
+ comments_public_by_default:
+ type: boolean
+ default_solved_ticket_reassignment_strategy:
+ type: string
+ default_to_draft_mode:
+ type: boolean
+ email_attachments:
+ type: boolean
+ emoji_autocompletion:
+ type: boolean
+ follower_and_email_cc_collaborations:
+ type: boolean
+ has_color_text:
+ type: boolean
+ is_first_comment_private_enabled:
+ type: boolean
+ light_agent_email_ccs_allowed:
+ type: boolean
+ list_empty_views:
+ type: boolean
+ list_newest_comments_first:
+ type: boolean
+ markdown_ticket_comments:
+ type: boolean
+ maximum_personal_views_to_list:
+ type: integer
+ modern_ticket_reassignment:
+ type: boolean
+ private_attachments:
+ type: boolean
+ rich_text_comments:
+ type: boolean
+ show_modern_ticket_reassignment:
+ type: boolean
+ status_hold:
+ type: boolean
+ tagging:
+ type: boolean
+ using_skill_based_routing:
+ type: boolean
+ AccountSettingsTwitterObject:
+ type: object
+ description: X (formerly Twitter) settings. See [X](#x-formerly-twitter)
+ properties:
+ shorten_url:
+ type: string
+ AccountSettingsUserObject:
+ type: object
+ description: User settings. See [Users](#users)
+ properties:
+ agent_created_welcome_emails:
+ type: boolean
+ end_user_phone_number_validation:
+ type: boolean
+ have_gravatars_enabled:
+ type: boolean
+ language_selection:
+ type: boolean
+ multiple_organizations:
+ type: boolean
+ tagging:
+ type: boolean
+ time_zone_selection:
+ type: boolean
+ AccountSettingsVoiceObject:
+ type: object
+ description: Zendesk Talk settings. See [Voice](#voice)
+ properties:
+ agent_confirmation_when_forwarding:
+ type: boolean
+ agent_wrap_up_after_calls:
+ type: boolean
+ enabled:
+ type: boolean
+ logging:
+ type: boolean
+ maximum_queue_size:
+ type: integer
+ maximum_queue_wait_time:
+ type: integer
+ only_during_business_hours:
+ type: boolean
+ outbound_enabled:
+ type: boolean
+ recordings_public:
+ type: boolean
+ uk_mobile_forwarding:
+ type: boolean
+ ActionObject:
+ type: object
+ properties:
+ field:
+ type: string
+ description: The name of a ticket field to modify
+ value:
+ type: string
+ description: The new value of the field
+ ActionsObject:
+ type: object
+ properties:
+ actions:
+ type: array
+ items:
+ $ref: '#/components/schemas/ActionObject'
+ ActivitiesCountResponse:
+ type: object
+ properties:
+ count:
+ type: object
+ properties:
+ refreshed_at:
+ type: string
+ format: date-time
+ value:
+ type: integer
+ ActivitiesResponse:
+ type: object
+ properties:
+ activities:
+ type: array
+ items:
+ $ref: '#/components/schemas/ActivityObject'
+ readOnly: true
+ actors:
+ type: array
+ items:
+ type: object
+ additionalProperties: true
+ readOnly: true
+ count:
+ type: integer
+ readOnly: true
+ next_page:
+ type: string
+ nullable: true
+ readOnly: true
+ previous_page:
+ type: string
+ nullable: true
+ readOnly: true
+ users:
+ type: array
+ items:
+ type: object
+ additionalProperties: true
+ readOnly: true
+ example:
+ activities:
+ - actor:
+ active: true
+ alias: ""
+ created_at: "2020-11-17T00:32:12Z"
+ custom_role_id: null
+ default_group_id: 1873
+ details: ""
+ email: cgoddard+ted@zendesk.com
+ external_id: null
+ iana_time_zone: America/Juneau
+ id: 158488612
+ last_login_at: "2020-11-17T00:33:44Z"
+ locale: en-gb
+ locale_id: 5
+ moderator: true
+ name: Tedd
+ notes: ""
+ only_private_comments: false
+ organization_id: null
+ phone: null
+ photo: null
+ report_csv: true
+ restricted_agent: false
+ role: admin
+ role_type: null
+ shared: false
+ shared_agent: false
+ shared_phone_number: null
+ signature: ""
+ suspended: false
+ tags: [ ]
+ ticket_restriction: null
+ time_zone: Alaska
+ two_factor_auth_enabled: null
+ updated_at: "2020-11-17T00:34:38Z"
+ url: https://example.zendesk.com/api/v2/users/158488612
+ user_fields:
+ its_remember_september: null
+ skittles: null
+ user_field_1: null
+ verified: true
+ actor_id: 158488612
+ created_at: "2020-11-17T00:34:40Z"
+ id: 29183462
+ object:
+ ticket:
+ id: 1521
+ subject: test
+ target:
+ ticket:
+ id: 1521
+ subject: test
+ title: 'Tedd assigned ticket #1521 to you.'
+ updated_at: "2020-11-17T00:34:40Z"
+ url: https://example.zendesk.com/api/v2/activities/29183462
+ user:
+ active: true
+ alias: test
+ created_at: "2017-08-14T20:13:53Z"
+ custom_role_id: null
+ default_group_id: 1873
+ details: ""
+ email: user@zendesk.com
+ external_id: oev7jj
+ iana_time_zone: Pacific/Pago_Pago
+ id: 3343
+ last_login_at: "2020-11-16T22:57:45Z"
+ locale: en-gb
+ locale_id: 5
+ moderator: true
+ name: Samwise Gamgee
+ notes: test
+ only_private_comments: false
+ organization_id: 1873
+ phone: null
+ photo:
+ content_type: image/gif
+ content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
+ deleted: false
+ file_name: 1f84950b8d7949b3.gif
+ height: 80
+ id: 8730791
+ inline: false
+ mapped_content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
+ size: 4566
+ thumbnails:
+ - content_type: image/gif
+ content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
+ deleted: false
+ file_name: 1f84950b8d7949b3_thumb.gif
+ height: 32
+ id: 8730801
+ inline: false
+ mapped_content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
+ size: 1517
+ url: https://example.zendesk.com/api/v2/attachments/8730801
+ width: 32
+ url: https://example.zendesk.com/api/v2/attachments/8730791
+ width: 80
+ report_csv: true
+ restricted_agent: false
+ role: admin
+ role_type: null
+ shared: false
+ shared_agent: false
+ shared_phone_number: null
+ signature: test
+ suspended: false
+ tags:
+ - "101"
+ ticket_restriction: null
+ time_zone: American Samoa
+ two_factor_auth_enabled: null
+ updated_at: "2020-11-17T00:33:55Z"
+ url: https://example.zendesk.com/api/v2/users/3343
+ user_fields:
+ its_remember_september: null
+ skittles: "2018-09-14T00:00:00+00:00"
+ user_field_1: "101"
+ verified: true
+ user_id: 3343
+ verb: tickets.assignment
+ actors:
+ - active: true
+ alias: ""
+ created_at: "2020-11-17T00:32:12Z"
+ custom_role_id: null
+ default_group_id: 1873
+ details: ""
+ email: cgoddard+ted@zendesk.com
+ external_id: null
+ iana_time_zone: America/Juneau
+ id: 158488612
+ last_login_at: "2020-11-17T00:33:44Z"
+ locale: en-gb
+ locale_id: 5
+ moderator: true
+ name: Tedd
+ notes: ""
+ only_private_comments: false
+ organization_id: null
+ phone: null
+ photo: null
+ report_csv: true
+ restricted_agent: false
+ role: admin
+ role_type: null
+ shared: false
+ shared_agent: false
+ shared_phone_number: null
+ signature: ""
+ suspended: false
+ tags: [ ]
+ ticket_restriction: null
+ time_zone: Alaska
+ two_factor_auth_enabled: null
+ updated_at: "2020-11-17T00:34:38Z"
+ url: https://example.zendesk.com/api/v2/users/158488612
+ user_fields:
+ its_remember_september: null
+ skittles: null
+ user_field_1: null
+ verified: true
+ count: 1
+ next_page: null
+ previous_page: null
+ users:
+ - active: true
+ alias: test
+ created_at: "2017-08-14T20:13:53Z"
+ custom_role_id: null
+ default_group_id: 1873
+ details: ""
+ email: user@zendesk.com
+ external_id: oev7jj
+ iana_time_zone: Pacific/Pago_Pago
+ id: 3343
+ last_login_at: "2020-11-16T22:57:45Z"
+ locale: en-gb
+ locale_id: 5
+ moderator: true
+ name: Samwise Gamgee
+ notes: test
+ only_private_comments: false
+ organization_id: 1873
+ phone: null
+ photo:
+ content_type: image/gif
+ content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
+ deleted: false
+ file_name: 1f84950b8d7949b3.gif
+ height: 80
+ id: 8730791
+ inline: false
+ mapped_content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
+ size: 4566
+ thumbnails:
+ - content_type: image/gif
+ content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
+ deleted: false
+ file_name: 1f84950b8d7949b3_thumb.gif
+ height: 32
+ id: 8730801
+ inline: false
+ mapped_content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
+ size: 1517
+ url: https://example.zendesk.com/api/v2/attachments/8730801
+ width: 32
+ url: https://example.zendesk.com/api/v2/attachments/8730791
+ width: 80
+ report_csv: true
+ restricted_agent: false
+ role: admin
+ role_type: null
+ shared: false
+ shared_agent: false
+ shared_phone_number: null
+ signature: test
+ suspended: false
+ tags:
+ - "101"
+ ticket_restriction: null
+ time_zone: American Samoa
+ two_factor_auth_enabled: null
+ updated_at: "2020-11-17T00:33:55Z"
+ url: https://example.zendesk.com/api/v2/users/3343
+ user_fields:
+ its_remember_september: null
+ skittles: "2018-09-14T00:00:00+00:00"
+ user_field_1: "101"
+ verified: true
+ ActivityObject:
+ title: Ticket Activities
+ type: object
+ properties:
+ actor:
+ type: object
+ description: The full user record of the user responsible for the ticket activity. See [Users](/api-reference/ticketing/users/users/)
+ allOf:
+ - $ref: '#/components/schemas/UserObject'
+ readOnly: true
+ actor_id:
+ type: integer
+ description: The id of the user responsible for the ticket activity. An `actor_id` of "-1" is a Zendesk system user, such as an automations action.
+ readOnly: true
+ created_at:
+ type: string
+ description: When the record was created
+ readOnly: true
+ id:
+ type: integer
+ description: Automatically assigned on creation
+ readOnly: true
+ object:
+ type: object
+ description: The content of the activity. Can be a ticket, comment, or change.
+ additionalProperties: true
+ readOnly: true
+ target:
+ type: object
+ description: The target of the activity, a ticket.
+ additionalProperties: true
+ readOnly: true
+ title:
+ type: string
+ description: Description of the activity
+ readOnly: true
+ updated_at:
+ type: string
+ description: When the record was last updated
+ readOnly: true
+ url:
+ type: string
+ description: The API url of the activity
+ readOnly: true
+ user:
+ type: object
+ description: The full user record of the agent making the request. See [Users](/api-reference/ticketing/users/users/)
+ allOf:
+ - $ref: '#/components/schemas/UserObject'
+ readOnly: true
+ user_id:
+ type: integer
+ description: The id of the agent making the request
+ readOnly: true
+ verb:
+ type: string
+ description: The type of activity. Can be "tickets.assignment", "tickets.comment", or "tickets.priority_increase"
+ readOnly: true
+ example:
+ actor:
+ id: 8678530
+ name: James A. Rosen
+ actor_id: 23546
+ created_at: "2019-03-05T10:38:52Z"
+ id: 35
+ object: { }
+ target: { }
+ title: 'John Hopeful assigned ticket #123 to you'
+ updated_at: "2019-03-05T10:38:52Z"
+ url: https://company.zendesk.com/api/v2/activities/35
+ user:
+ id: 223443
+ name: Johnny Agent
+ user_id: 29451
+ verb: tickets.assignment
+ ActivityResponse:
+ type: object
+ properties:
+ activity:
+ $ref: '#/components/schemas/ActivityObject'
+ example:
+ activity:
+ actor:
+ active: true
+ alias: ""
+ created_at: "2020-11-17T00:32:12Z"
+ custom_role_id: null
+ default_group_id: 1873
+ details: ""
+ email: cgoddard+ted@zendesk.com
+ external_id: null
+ iana_time_zone: America/Juneau
+ id: 158488612
+ last_login_at: "2020-11-17T00:33:44Z"
+ locale: en-gb
+ locale_id: 5
+ moderator: true
+ name: Tedd
+ notes: ""
+ only_private_comments: false
+ organization_id: null
+ phone: null
+ photo: null
+ report_csv: true
+ restricted_agent: false
+ role: admin
+ role_type: null
+ shared: false
+ shared_agent: false
+ shared_phone_number: null
+ signature: ""
+ suspended: false
+ tags: [ ]
+ ticket_restriction: null
+ time_zone: Alaska
+ two_factor_auth_enabled: null
+ updated_at: "2020-11-17T00:34:38Z"
+ url: https://example.zendesk.com/api/v2/users/158488612
+ user_fields:
+ its_remember_september: null
+ skittles: null
+ user_field_1: null
+ verified: true
+ actor_id: 158488612
+ created_at: "2020-11-17T00:34:40Z"
+ id: 29183462
+ object:
+ ticket:
+ id: 1521
+ subject: test
+ target:
+ ticket:
+ id: 1521
+ subject: test
+ title: 'Tedd assigned ticket #1521 to you.'
+ updated_at: "2020-11-17T00:34:40Z"
+ url: https://example.zendesk.com/api/v2/activities/29183462
+ user:
+ active: true
+ alias: test
+ created_at: "2017-08-14T20:13:53Z"
+ custom_role_id: null
+ default_group_id: 1873
+ details: ""
+ email: user@zendesk.com
+ external_id: oev7jj
+ iana_time_zone: Pacific/Pago_Pago
+ id: 3343
+ last_login_at: "2020-11-16T22:57:45Z"
+ locale: en-gb
+ locale_id: 5
+ moderator: true
+ name: Samwise Gamgee
+ notes: test
+ only_private_comments: false
+ organization_id: 1873
+ phone: null
+ photo:
+ content_type: image/gif
+ content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
+ deleted: false
+ file_name: 1f84950b8d7949b3.gif
+ height: 80
+ id: 8730791
+ inline: false
+ mapped_content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
+ size: 4566
+ thumbnails:
+ - content_type: image/gif
+ content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
+ deleted: false
+ file_name: 1f84950b8d7949b3_thumb.gif
+ height: 32
+ id: 8730801
+ inline: false
+ mapped_content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
+ size: 1517
+ url: https://example.zendesk.com/api/v2/attachments/8730801
+ width: 32
+ url: https://example.zendesk.com/api/v2/attachments/8730791
+ width: 80
+ report_csv: true
+ restricted_agent: false
+ role: admin
+ role_type: null
+ shared: false
+ shared_agent: false
+ shared_phone_number: null
+ signature: test
+ suspended: false
+ tags:
+ - "101"
+ ticket_restriction: null
+ time_zone: American Samoa
+ two_factor_auth_enabled: null
+ updated_at: "2020-11-17T00:33:55Z"
+ url: https://example.zendesk.com/api/v2/users/3343
+ user_fields:
+ its_remember_september: null
+ skittles: "2018-09-14T00:00:00+00:00"
+ user_field_1: "101"
+ verified: true
+ user_id: 3343
+ verb: tickets.assignment
+ ApprovalRequestCreateRequest:
+ title: ApprovalRequestCreateRequest
+ type: object
+ properties:
+ assignee_group_id:
+ type: integer
+ format: int64
+ description: The id of the group assigned to review and approve the request
+ example: 789
+ nullable: true
+ assignee_user_id:
+ type: integer
+ format: int64
+ description: The id of the user assigned to review and approve the request
+ example: 456
+ nullable: true
+ message:
+ type: string
+ description: Details and context for the approval request
+ example: Please approve this request for a new laptop for the engineering team
+ subject:
+ type: string
+ description: Subject line for the approval request
+ example: Laptop Purchase Approval
+ ticket_id:
+ type: integer
+ format: int64
+ description: The id of the ticket the approval request was added to
+ example: 123
+ required:
+ - message
+ - subject
+ - ticket_id
+ ApprovalRequestError:
+ type: object
+ properties:
+ code:
+ type: string
+ description: Error code identifying the type of error
+ example: ApprovalRequestCreationFailed
+ title:
+ type: string
+ description: Human-readable error message
+ example: Unable to create approval request
+ required:
+ - code
+ - title
+ ApprovalRequestErrors:
+ type: object
+ properties:
+ errors:
+ type: array
+ items:
+ $ref: '#/components/schemas/ApprovalRequestError'
+ ApprovalRequestObject:
+ type: object
+ properties:
+ assignee_group_id:
+ type: integer
+ format: int64
+ description: The id of the group assigned to review the request
+ nullable: true
+ assignee_user_id:
+ type: integer
+ format: int64
+ description: The id of the user assigned to respond to the request. Also referred to as the `approver`
+ example: 456
+ nullable: true
+ created_at:
+ type: string
+ format: date-time
+ description: The ISO 8601 formatted date-time when the approval request was created
+ example: "2026-01-23T19:02:36Z"
+ readOnly: true
+ created_by_id:
+ type: integer
+ format: int64
+ description: The id of the user who created the approval request
+ example: 789
+ readOnly: true
+ id:
+ type: string
+ description: Unique identifier for the approval request (ULID format)
+ example: 01KFP3S9EVXF9CKAYY080NV98C
+ readOnly: true
+ message:
+ type: string
+ description: Details and context for the approval request
+ example: Please approve this request for a new laptop
+ origination_type:
+ type: string
+ description: How the approval request was created
+ enum:
+ - API_ORIGINATION
+ - UI_ORIGINATION
+ - TRIGGER_ORIGINATION
+ - DATA_IMPORTER_ORIGINATION
+ - TEMPLATE_ORIGINATION
+ - ACTION_FLOW_ORIGINATION
+ - UNKNOWN_ORIGINATION
+ example: API_ORIGINATION
+ nullable: true
+ readOnly: true
+ status:
+ type: string
+ description: Current status of the approval request
+ example: active
+ readOnly: true
+ subject:
+ type: string
+ description: Subject line for the approval request
+ example: Laptop Purchase Approval
+ ticket_id:
+ type: integer
+ format: int64
+ description: The id of the ticket this approval request is attached to
+ example: 123
+ ApprovalRequestSimpleResponse:
+ title: ApprovalRequestSimpleResponse
+ type: object
+ properties:
+ approval_request:
+ type: object
+ properties:
+ assignee_group_id:
+ type: integer
+ format: int64
+ description: The id of the group assigned to review the request
+ nullable: true
+ assignee_user_id:
+ type: integer
+ format: int64
+ description: The id of the user assigned to review the request
+ example: 456
+ nullable: true
+ created_at:
+ type: string
+ format: date-time
+ description: The time the approval request was created
+ example: "2026-01-23T19:02:36Z"
+ created_by_id:
+ type: integer
+ format: int64
+ description: The id of the user who created the approval request
+ example: 789
+ id:
+ type: string
+ description: Unique identifier for the approval request (ULID format)
+ example: 01KFP3S9EVXF9CKAYY080NV98C
+ message:
+ type: string
+ description: Details and context for the approval request
+ example: Please approve this request for a new laptop
+ origination_type:
+ type: string
+ description: How the approval request was created
+ enum:
+ - API_ORIGINATION
+ - UI_ORIGINATION
+ - TRIGGER_ORIGINATION
+ - DATA_IMPORTER_ORIGINATION
+ - TEMPLATE_ORIGINATION
+ - ACTION_FLOW_ORIGINATION
+ - UNKNOWN_ORIGINATION
+ example: API_ORIGINATION
+ nullable: true
+ status:
+ type: string
+ description: Current status of the approval request
+ example: active
+ subject:
+ type: string
+ description: Subject line for the approval request
+ example: Laptop Purchase Approval
+ ticket_id:
+ type: integer
+ format: int64
+ description: The id of the ticket this approval request is attached to
+ example: 123
+ ApprovalRequestsListResponse:
+ title: ApprovalRequestsListResponse
+ type: object
+ description: Response for listing approval requests with cursor pagination
+ properties:
+ approval_requests:
+ type: array
+ items:
+ type: object
+ properties:
+ assignee_group:
+ type: object
+ properties:
+ id:
+ type: integer
+ description: Unique identifier for the assigned group
+ name:
+ type: string
+ description: Name of the assigned group
+ nullable: true
+ assignee_user:
+ type: object
+ properties:
+ id:
+ type: integer
+ description: Unique identifier for the assigned user
+ name:
+ type: string
+ description: Name of the assigned user
+ nullable: true
+ created_at:
+ type: string
+ format: date-time
+ description: The time the approval request was created
+ readOnly: true
+ id:
+ type: string
+ description: Unique identifier for the approval request
+ message:
+ type: string
+ description: Details for the approval request
+ origination_type:
+ type: string
+ description: Source where the approval request originated from (example, "UI_ORIGINATION")
+ status:
+ type: string
+ description: Current status of the approval request (active, approved, rejected, withdrawn)
+ subject:
+ type: string
+ description: Subject for the approval request
+ ticket_id:
+ type: integer
+ description: The id of the ticket associated with this approval request
+ links:
+ type: object
+ description: Links for navigation
+ properties:
+ next:
+ type: string
+ description: Link to the next page of results
+ nullable: true
+ prev:
+ type: string
+ description: Link to the previous page of results
+ nullable: true
+ meta:
+ type: object
+ description: Metadata about the response
+ properties:
+ after_cursor:
+ type: string
+ description: Cursor for fetching the next page of results
+ nullable: true
+ before_cursor:
+ type: string
+ description: Cursor for fetching the previous page of results
+ nullable: true
+ has_more:
+ type: boolean
+ description: Indicates if there are more results available
+ AssigneeFieldAssignableAgentObject:
+ title: AssigneeFieldAssignableAgents
+ type: object
+ properties:
+ avatar_url:
+ type: string
+ description: URL of Agent's avatar
+ nullable: true
+ id:
+ type: integer
+ description: Agent Support ID
+ name:
+ type: string
+ description: Name of the agent
+ example:
+ avatar_url: https://z3n-example.zendesk.com/system/photos/900005192023/my_profile.png
+ id: 6473829100
+ name: Joe Smith
+ AssigneeFieldAssignableGroupAgentsResponse:
+ type: object
+ properties:
+ agents:
+ type: array
+ items:
+ $ref: '#/components/schemas/AssigneeFieldAssignableAgentObject'
+ count:
+ type: integer
+ description: Number of agents listed in `agents` property.
+ next_page:
+ type: string
+ nullable: true
+ readOnly: true
+ previous_page:
+ type: string
+ nullable: true
+ readOnly: true
+ example:
+ agents:
+ - avatar_url: https://z3n-example.zendesk.com/system/photos/900005192023/my_profile.png
+ id: 6473829100
+ name: Joe Smith
+ - avatar_url: https://z3n-example.zendesk.com/system/photos/412005192023/my_profile.png
+ id: 9182736400
+ name: Jane Doe
+ - avatar_url: https://z3n-example.zendesk.com/system/photos/887005192023/my_profile.png
+ id: 1928373460
+ name: Cookie Monster
+ count: 3
+ next_page: null
+ previous_page: null
+ AssigneeFieldAssignableGroupObject:
+ title: AssigneeFieldAssignableGroups
+ type: object
+ properties:
+ description:
+ type: string
+ description: Description of the group
+ readOnly: true
+ id:
+ type: integer
+ description: Group ID
+ readOnly: true
+ name:
+ type: string
+ description: Name of the group
+ readOnly: true
+ example:
+ description: Engineering team for bugs
+ id: 9182736455
+ name: Engineering
+ AssigneeFieldAssignableGroupsAndAgentsSearchResponse:
+ type: object
+ properties:
+ agents:
+ type: array
+ items:
+ $ref: '#/components/schemas/AssigneeFieldAssignableSearchAgentObject'
+ count:
+ type: integer
+ description: Number of agents + groups listed from search result.
+ groups:
+ type: array
+ items:
+ $ref: '#/components/schemas/AssigneeFieldAssignableSearchGroupObject'
+ example:
+ agents:
+ - group: Tech
+ group_id: 6574839201
+ id: 8392017465
+ name: Sam Technologist
+ photo_url: https://z3n-example.zendesk.com/system/photos/410305192023/my_profile.png
+ count: 2
+ groups:
+ - id: 6574839201
+ name: Tech
+ AssigneeFieldAssignableGroupsResponse:
+ type: object
+ properties:
+ count:
+ type: integer
+ description: Number of groups listed in `groups` property.
+ groups:
+ type: array
+ items:
+ $ref: '#/components/schemas/AssigneeFieldAssignableGroupObject'
+ next_page:
+ type: string
+ nullable: true
+ readOnly: true
+ previous_page:
+ type: string
+ nullable: true
+ readOnly: true
+ example:
+ count: 3
+ groups:
+ - description: Engineering
+ id: 9182736455
+ name: Group for Bugs for Engineering
+ - description: Product
+ id: 1928374655
+ name: Group for feature requests
+ - description: Customer Support
+ id: 5519283746
+ name: Group for customer inquiries
+ next_page: null
+ previous_page: null
+ AssigneeFieldAssignableSearchAgentObject:
+ type: object
+ properties:
+ group:
+ type: string
+ description: Name of the agent's group
+ group_id:
+ type: integer
+ description: Agent's Group ID
+ id:
+ type: integer
+ description: Agent ID
+ name:
+ type: string
+ description: Name of the agent
+ photo_url:
+ type: string
+ description: URL of Avatar
+ nullable: true
+ example:
+ group: Engineering
+ group_id: 9182736455
+ id: 6473829100
+ name: Joe Smith
+ photo_url: https://z3n-example.zendesk.com/system/photos/900005192023/my_profile.png
+ AssigneeFieldAssignableSearchGroupObject:
+ type: object
+ properties:
+ id:
+ type: integer
+ description: Group ID
+ name:
+ type: string
+ description: Name of the group
+ example:
+ id: 9182736455
+ name: Engineering
+ AttachmentBaseObject:
+ type: object
+ properties:
+ content_type:
+ type: string
+ description: 'The content type of the image. Example value: "image/png"'
+ readOnly: true
+ content_url:
+ type: string
+ description: A full URL where the attachment image file can be downloaded. The file may be hosted externally so take care not to inadvertently send Zendesk authentication credentials. See [Working with url properties](/documentation/api-basics/best-practices/working-with-url-properties/)
+ readOnly: true
+ deleted:
+ type: boolean
+ description: If true, the attachment has been deleted
+ readOnly: true
+ file_name:
+ type: string
+ description: The name of the image file
+ readOnly: true
+ height:
+ type: integer
+ description: The height of the image file in pixels. If height is unknown, returns null
+ readOnly: true
+ id:
+ type: integer
+ description: Automatically assigned when created
+ readOnly: true
+ inline:
+ type: boolean
+ description: |
+ If true, the attachment is excluded from the attachment list and the attachment's URL
+ can be referenced within the comment of a ticket. Default is false
+ readOnly: true
+ malware_access_override:
+ type: boolean
+ description: If true, you can download an attachment flagged as malware. If false, you can't download such an attachment.
+ readOnly: true
+ malware_scan_result:
+ type: string
+ description: 'The result of the malware scan. There is a delay between the time the attachment is uploaded and when the malware scan is completed. Usually the scan is done within a few seconds, but high load conditions can delay the scan results. Possible values: "malware_found", "malware_not_found", "failed_to_scan", "not_scanned"'
+ readOnly: true
+ mapped_content_url:
+ type: string
+ description: The URL the attachment image file has been mapped to
+ readOnly: true
+ size:
+ type: integer
+ description: The size of the image file in bytes
+ readOnly: true
+ url:
+ type: string
+ description: A URL to access the attachment details
+ readOnly: true
+ width:
+ type: integer
+ description: The width of the image file in pixels. If width is unknown, returns null
+ readOnly: true
+ AttachmentObject:
+ type: object
+ description: A file represented as an [Attachment](/api-reference/ticketing/tickets/ticket-attachments/) object
+ allOf:
+ - $ref: '#/components/schemas/AttachmentBaseObject'
+ - $ref: '#/components/schemas/AttachmentThumbnails'
+ example:
+ content_type: image/png
+ content_url: https://company.zendesk.com/attachments/my_funny_profile_pic.png
+ file_name: my_funny_profile_pic.png
+ id: 928374
+ size: 166144
+ thumbnails:
+ - content_type: image/png
+ content_url: https://company.zendesk.com/attachments/my_funny_profile_pic_thumb.png
+ file_name: my_funny_profile_pic_thumb.png
+ id: 928375
+ size: 58298
+ AttachmentResponse:
+ type: object
+ properties:
+ attachment:
+ $ref: '#/components/schemas/AttachmentObject'
+ AttachmentThumbnails:
+ type: object
+ properties:
+ thumbnails:
+ type: array
+ description: An array of attachment objects. Note that photo thumbnails do not have thumbnails
+ items:
+ $ref: '#/components/schemas/AttachmentBaseObject'
+ readOnly: true
+ AttachmentUpdateInput:
+ type: object
+ properties:
+ malware_access_override:
+ type: boolean
+ description: If true, allows access to attachments with detected malware.
+ AttachmentUpdateRequest:
+ type: object
+ properties:
+ attachment:
+ $ref: '#/components/schemas/AttachmentUpdateInput'
+ AttachmentUploadResponse:
+ type: object
+ properties:
+ upload:
+ type: object
+ properties:
+ attachment:
+ $ref: '#/components/schemas/AttachmentObject'
+ attachments:
+ type: array
+ items:
+ $ref: '#/components/schemas/AttachmentObject'
+ token:
+ type: string
+ description: Token for subsequent request
+ readOnly: true
+ AuditLogObject:
+ type: object
+ properties:
+ action:
+ type: string
+ description: |
+ Type of change made. Possible values are "create", "destroy", "exported", "login", and "update"
+ readOnly: true
+ action_label:
+ type: string
+ description: Localized string of action field
+ readOnly: true
+ actor_id:
+ type: integer
+ description: id of the user or system that initiated the change
+ readOnly: true
+ actor_name:
+ type: string
+ description: Name of the user or system that initiated the change
+ readOnly: true
+ change_description:
+ type: string
+ description: The description of the change that occurred
+ readOnly: true
+ created_at:
+ type: string
+ format: date-time
+ description: The time the audit got created
+ readOnly: true
+ id:
+ type: integer
+ description: The id automatically assigned upon creation
+ readOnly: true
+ ip_address:
+ type: string
+ description: The IP address of the user doing the audit
+ readOnly: true
+ source_id:
+ type: integer
+ description: The id of the item being audited
+ readOnly: true
+ source_label:
+ type: string
+ description: The name of the item being audited
+ readOnly: true
+ source_type:
+ type: string
+ description: |
+ Item type being audited. Typically describes the system where the change
+ was initiated. Possible values vary based on your account's Zendesk
+ products and activity. Common values include "apitoken", "rule", "ticket",
+ "user", and "zendesk/app_market/app". The "rule" value is used for
+ [automations](https://support.zendesk.com/hc/en-us/articles/4408832701850),
+ [macros](https://support.zendesk.com/hc/en-us/articles/4408844187034),
+ [triggers](https://support.zendesk.com/hc/en-us/articles/4408822236058),
+ [views](https://support.zendesk.com/hc/en-us/articles/4408888828570),
+ and other automated business rules
+ readOnly: true
+ url:
+ type: string
+ description: The URL to access the audit log
+ readOnly: true
+ example:
+ action: update
+ action_label: Updated
+ actor_id: 1234
+ actor_name: Sameer Patel
+ change_description: Role changed from Administrator to End User
+ created_at: "2012-03-05T11:32:44Z"
+ id: 498483
+ ip_address: 209.119.38.228
+ source_id: 3456
+ source_label: John Doe
+ source_type: user
+ url: https://company.zendesk.com/api/v2/audit_logs/498483
+ AuditLogResponse:
+ type: object
+ properties:
+ audit_log:
+ $ref: '#/components/schemas/AuditLogObject'
+ AuditLogsResponse:
+ type: object
+ properties:
+ audit_logs:
+ type: array
+ items:
+ $ref: '#/components/schemas/AuditLogObject'
+ AuditObject:
+ type: object
+ properties:
+ author_id:
+ type: integer
+ readOnly: true
+ created_at:
+ type: string
+ format: date-time
+ readOnly: true
+ events:
+ type: array
+ items:
+ type: object
+ properties:
+ body:
+ type: string
+ readOnly: true
+ field_name:
+ type: string
+ readOnly: true
+ id:
+ type: integer
+ readOnly: true
+ type:
+ type: string
+ readOnly: true
+ value:
+ oneOf:
+ - type: string
+ - type: integer
+ readOnly: true
+ id:
+ type: integer
+ readOnly: true
+ metadata:
+ type: object
+ readOnly: true
+ ticket_id:
+ type: integer
+ readOnly: true
+ via:
+ $ref: '#/components/schemas/ViaObject'
+ AuthorObject:
+ type: object
+ properties:
+ email:
+ type: string
+ description: The author email
+ readOnly: true
+ id:
+ type: integer
+ description: The author id
+ readOnly: true
+ name:
+ type: string
+ description: The author name
+ readOnly: true
+ AutomationObject:
+ type: object
+ properties:
+ actions:
+ type: array
+ description: An object describing what the automation will do. See [Actions reference](/documentation/ticketing/reference-guides/actions-reference)
+ items:
+ $ref: '#/components/schemas/ActionObject'
+ active:
+ type: boolean
+ description: Whether the automation is active
+ conditions:
+ $ref: '#/components/schemas/ConditionsObject'
+ created_at:
+ type: string
+ format: date-time
+ description: The time the automation was created
+ readOnly: true
+ default:
+ type: boolean
+ description: If true, the automation is a default automation
+ readOnly: true
+ id:
+ type: integer
+ description: Automatically assigned when created
+ readOnly: true
+ position:
+ type: integer
+ description: The position of the automation which specifies the order it will be executed
+ raw_title:
+ type: string
+ description: The raw title of the automation
+ readOnly: true
+ title:
+ type: string
+ description: The title of the automation
+ updated_at:
+ type: string
+ format: date-time
+ description: The time of the last update of the automation
+ readOnly: true
+ example:
+ actions:
+ - field: priority
+ value: high
+ active: true
+ conditions:
+ all:
+ - field: status
+ operator: is
+ value: open
+ - field: priority
+ operator: less_than
+ value: high
+ any: [ ]
+ default: false
+ id: 9873843
+ position: 8
+ raw_title: Roger Wilco
+ title: Roger Wilco
+ AutomationResponse:
+ type: object
+ properties:
+ automation:
+ $ref: '#/components/schemas/AutomationObject'
+ AutomationsResponse:
+ type: object
+ properties:
+ automations:
+ type: array
+ items:
+ $ref: '#/components/schemas/AutomationObject'
+ count:
+ type: integer
+ readOnly: true
+ next_page:
+ type: string
+ nullable: true
+ readOnly: true
+ previous_page:
+ type: string
+ nullable: true
+ readOnly: true
+ BatchErrorItem:
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/Error'
+ - type: object
+ properties:
+ trigger_id:
+ type: string
+ BatchJobRequest:
+ type: object
+ properties:
+ job:
+ type: object
+ properties:
+ action:
+ type: string
+ enum:
+ - patch
+ items:
+ type: object
+ properties:
+ trigger_categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/TriggerCategoryBatchRequest'
+ triggers:
+ type: array
+ items:
+ $ref: '#/components/schemas/TriggerBatchRequest'
+ BatchJobResponse:
+ type: object
+ properties:
+ errors:
+ type: array
+ items:
+ $ref: '#/components/schemas/BatchErrorItem'
+ results:
+ type: object
+ properties:
+ trigger_categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/TriggerCategory'
+ triggers:
+ type: array
+ items:
+ $ref: '#/components/schemas/TriggerObject'
+ status:
+ type: string
+ enum:
+ - complete
+ - failed
+ BookmarkCreateRequest:
+ type: object
+ properties:
+ bookmark:
+ $ref: '#/components/schemas/BookmarkInput'
+ BookmarkInput:
+ type: object
+ properties:
+ ticket_id:
+ type: integer
+ description: The id of the ticket the bookmark is for.
+ BookmarkObject:
+ title: Bookmarks
+ type: object
+ properties:
+ created_at:
+ type: string
+ format: date-time
+ description: The time the bookmark was created
+ readOnly: true
+ id:
+ type: integer
+ description: Automatically assigned when the bookmark is created
+ readOnly: true
+ ticket:
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/TicketObject'
+ readOnly: true
+ url:
+ type: string
+ description: The API url of this bookmark
+ readOnly: true
+ example:
+ created_at: "2014-11-20T22:55:29Z"
+ id: 35436
+ ticket:
+ description: The fire is very colorful.
+ id: 60
+ priority: high
+ requester_id: 156
+ subject: Help, my printer is on fire!
+ url: https://{subdomain}.zendesk.com/api/v2/bookmarks/35436
+ BookmarkResponse:
+ type: object
+ properties:
+ bookmark:
+ $ref: '#/components/schemas/BookmarkObject'
+ BookmarksResponse:
+ title: Bookmarks
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/OffsetPaginationObject'
+ - type: object
+ properties:
+ bookmarks:
+ type: array
+ items:
+ $ref: '#/components/schemas/BookmarkObject'
+ BrandAgentObject:
+ type: object
+ properties:
+ brand_id:
+ type: integer
+ description: The id of a brand
+ created_at:
+ type: string
+ format: date-time
+ description: The time the brand membership was created
+ readOnly: true
+ id:
+ type: string
+ description: Automatically assigned upon creation
+ readOnly: true
+ updated_at:
+ type: string
+ format: date-time
+ description: The time of the last update of the brand membership
+ readOnly: true
+ url:
+ type: string
+ description: The API url of this record
+ readOnly: true
+ user_id:
+ type: integer
+ description: The id of an agent
+ required:
+ - user_id
+ - brand_id
+ BrandAgentResponse:
+ type: object
+ properties:
+ brand_agent:
+ $ref: '#/components/schemas/BrandAgentObject'
+ BrandAgentsResponse:
+ type: object
+ properties:
+ brand_agents:
+ type: array
+ items:
+ $ref: '#/components/schemas/BrandAgentObject'
+ BrandCreateRequest:
+ type: object
+ properties:
+ brand:
+ $ref: '#/components/schemas/BrandObject'
+ BrandObject:
+ title: Brands
+ type: object
+ properties:
+ active:
+ type: boolean
+ description: If the brand is set as active
+ brand_url:
+ type: string
+ description: The url of the brand
+ created_at:
+ type: string
+ format: date-time
+ description: The time the brand was created
+ readOnly: true
+ default:
+ type: boolean
+ description: Is the brand the default brand for this account
+ has_help_center:
+ type: boolean
+ description: If the brand has a Help Center
+ help_center_state:
+ type: string
+ description: The state of the Help Center
+ enum:
+ - enabled
+ - disabled
+ - restricted
+ readOnly: true
+ host_mapping:
+ type: string
+ description: The hostmapping to this brand, if any. Only admins view this property.
+ id:
+ type: integer
+ description: The ID automatically assigned when the brand is created
+ readOnly: true
+ is_deleted:
+ type: boolean
+ description: If the brand object is deleted or not
+ logo:
+ $ref: '#/components/schemas/AttachmentObject'
+ name:
+ type: string
+ description: The name of the brand
+ signature_template:
+ type: string
+ description: The signature template for a brand
+ subdomain:
+ type: string
+ description: The subdomain of the brand
+ ticket_form_ids:
+ type: array
+ description: The ids of ticket forms that are available for use by a brand
+ items:
+ type: integer
+ readOnly: true
+ updated_at:
+ type: string
+ format: date-time
+ description: The time of the last update of the brand
+ readOnly: true
+ url:
+ type: string
+ description: The API url of this brand
+ readOnly: true
+ example:
+ active: true
+ brand_url: https://brand1.com
+ created_at: "2012-04-02T22:55:29Z"
+ default: true
+ has_help_center: true
+ help_center_state: enabled
+ host_mapping: brand1.com
+ id: 47
+ logo:
+ content_type: image/png
+ content_url: https://company.zendesk.com/logos/brand1_logo.png
+ file_name: brand1_logo.png
+ id: 928374
+ size: 166144
+ thumbnails:
+ - content_type: image/png
+ content_url: https://company.zendesk.com/photos/brand1_logo_thumb.png
+ file_name: brand1_logo_thumb.png
+ id: 928375
+ mapped_content_url: https://company.com/photos/brand1_logo_thumb.png
+ size: 58298
+ url: https://company.zendesk.com/api/v2/attachments/928375
+ - content_type: image/png
+ content_url: https://company.zendesk.com/photos/brand1_logo_small.png
+ file_name: brand1_logo_small.png
+ id: 928376
+ mapped_content_url: https://company.com/photos/brand1_logo_small.png
+ size: 58298
+ url: https://company.zendesk.com/api/v2/attachments/928376
+ url: https://company.zendesk.com/api/v2/attachments/928374
+ name: Brand 1
+ signature_template: '{{agent.signature}}'
+ subdomain: brand1
+ ticket_form_ids:
+ - 47
+ - 33
+ - 22
+ updated_at: "2012-04-02T22:55:29Z"
+ url: https://company.zendesk.com/api/v2/brands/47
+ required:
+ - name
+ - subdomain
+ BrandResponse:
+ type: object
+ properties:
+ brand:
+ $ref: '#/components/schemas/BrandObject'
+ BrandUpdateRequest:
+ type: object
+ properties:
+ brand:
+ $ref: '#/components/schemas/BrandObject'
+ BrandsResponse:
+ title: Brands
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/OffsetPaginationObject'
+ - type: object
+ properties:
+ brands:
+ type: array
+ description: Array of brands
+ items:
+ $ref: '#/components/schemas/BrandObject'
+ BulkSkillBasedRoutingAttributeValueJob:
+ type: object
+ properties:
+ action:
+ type: string
+ description: 'The action to perform on the attribute values. One of the following: "upsert", "update", "delete"'
+ readOnly: true
+ attributes:
+ type: object
+ description: The attribute values to update. See [Attribute Values](#attribute-values). `agent_skill_priority` is optional. If not provided, it keeps the current priority or defaults to `NORMAL` when adding new attribute values.
+ properties:
+ attribute_values:
+ type: array
+ items:
+ $ref: '#/components/schemas/SkillBasedRoutingAttributeValueObject'
+ items:
+ type: array
+ description: The list of agent ids
+ items:
+ type: integer
+ readOnly: true
+ required:
+ - action
+ - items
+ - attributes
+ BulkSkillBasedRoutingAttributeValuesRequest:
+ title: Bulk Skill Based Routing Attribute Values Job
+ type: object
+ properties:
+ job:
+ $ref: '#/components/schemas/BulkSkillBasedRoutingAttributeValueJob'
+ BulkUpdateDefaultCustomStatusRequest:
+ type: object
+ properties:
+ ids:
+ type: string
+ description: The comma-separated list of custom ticket status ids to be set as default for their status categories
+ BulkUpdateDefaultCustomStatusResponse:
+ type: object
+ ChannelFrameworkPushResultsResponse:
+ type: object
+ properties:
+ results:
+ type: array
+ description: An array of [result objects](#result-object)
+ items:
+ $ref: '#/components/schemas/ChannelFrameworkResultObject'
+ ChannelFrameworkResultObject:
+ type: object
+ properties:
+ external_resource_id:
+ type: string
+ description: The external ID of the resource, as passed in
+ readOnly: true
+ status:
+ $ref: '#/components/schemas/ChannelFrameworkResultStatusObject'
+ ChannelFrameworkResultStatusObject:
+ type: object
+ description: The status of the import for the indicated resource
+ properties:
+ code:
+ type: string
+ description: A code indicating the status of the import of the resource, as described in [status codes](#status-codes)
+ readOnly: true
+ description:
+ type: string
+ description: In the case of an exception, a description of the exception. Otherwise, not present.
+ readOnly: true
+ CollaboratorObject:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ name:
+ type: string
+ example:
+ email: someone@example.com
+ name: Someone Special
+ ComplianceDeletionStatusObject:
+ type: object
+ properties:
+ account_subdomain:
+ type: string
+ action:
+ type: string
+ application:
+ type: string
+ created_at:
+ type: string
+ executer_id:
+ type: integer
+ nullable: true
+ user_id:
+ type: integer
+ required:
+ - action
+ - application
+ - account_subdomain
+ - executer_id
+ - user_id
+ - created_at
+ ComplianceDeletionStatusesResponse:
+ type: object
+ properties:
+ compliance_deletion_statuses:
+ type: array
+ items:
+ $ref: '#/components/schemas/ComplianceDeletionStatusObject'
+ ConditionObject:
+ type: object
+ properties:
+ field:
+ type: string
+ description: The name of a ticket field
+ operator:
+ type: string
+ description: A comparison operator
+ value:
+ type: string
+ description: The value of a ticket field
+ ConditionsObject:
+ type: object
+ description: An object that describes the conditions under which the automation will execute. See [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference)
+ properties:
+ all:
+ type: array
+ description: Logical AND. Tickets must fulfill all of the conditions to be considered matching
+ items:
+ $ref: '#/components/schemas/ConditionObject'
+ any:
+ type: array
+ description: Logical OR. Tickets may satisfy any of the conditions to be considered matching
+ items:
+ $ref: '#/components/schemas/ConditionObject'
+ ConversationLogObject:
+ type: object
+ properties:
+ attachments:
+ type: array
+ description: A collection of attachments (image or file) associated with the event
+ items:
+ $ref: '#/components/schemas/AttachmentObject'
+ readOnly: true
+ author:
+ type: object
+ description: Object that describes the user who created the event
+ properties:
+ type:
+ type: string
+ description: Either user, agent, or bot
+ enum:
+ - user
+ - agent
+ - bot
+ readOnly: true
+ zen:sunco:user_id:
+ type: string
+ description: A Zendesk resource name prefix describing a messaging user
+ readOnly: true
+ zen:support:user_id:
+ type: integer
+ description: A Zendesk resource name prefix describing a Support user
+ readOnly: true
+ additionalProperties: true
+ content:
+ type: object
+ description: Object that describes the content of the message. The inner fields depends on the record type
+ additionalProperties: true
+ readOnly: true
+ created_at:
+ type: string
+ format: date-time
+ description: The timestamp of when this record was created
+ readOnly: true
+ id:
+ type: string
+ description: Unique record identifier
+ readOnly: true
+ metadata:
+ type: object
+ description: Various additional data that further describes this record
+ additionalProperties: true
+ readOnly: true
+ reference:
+ type: string
+ description: 'A Zendesk resource name value that uniquely identifies this record. Example: `zen:ticket_event:
\r\n
\r\n {{quoted_content}}\r\n\r\n\r\n"
+ mail_delimiter: '{{txt.email.delimiter}}'
+ modern_email_template: true
+ no_mail_delimiter: true
+ personalized_replies: true
+ rich_content_in_emails: true
+ send_gmail_messages_via_gmail: true
+ text_mail_template: "{{content}}\r\n\r\n{{footer}}\r\n\r\n{{quoted_content}}"
+ google_apps:
+ has_google_apps: false
+ has_google_apps_admin: false
+ groups:
+ check_group_name_uniqueness: true
+ limits:
+ attachment_size: 52428800
+ localization:
+ locale_ids:
+ - 1042
+ lotus:
+ pod_id: 999
+ prefer_lotus: true
+ reporting: true
+ messaging_inactivity:
+ default_localized_messages:
+ pre_solved_message_1: Waiting on your response. If we don't hear from you within a few minutes, this ticket will be marked as solved.
+ pre_solved_message_2: This ticket will be marked as solved soon. We hope to hear from you.
+ solved_message: As we haven't heard from you in a while, we'll be marking this ticket as solved.
+ enabled: true
+ reminders:
+ - message: Waiting on your response. If we don't hear from you within a few minutes, this ticket will be marked as solved.
+ - message: This ticket will be marked as solved soon. We hope to hear from you.
+ ticket_status_id: null
+ timeout: 300
+ - message: As we haven't heard from you in a while, we'll be marking this ticket as solved.
+ ticket_status_id: 8678123367037
+ timeout: 60
+ ticket_status_id: 8001424138749
+ timeout: 5
+ metrics:
+ account_size: 100-399
+ onboarding:
+ checklist_onboarding_version: 2
+ onboarding_segments: null
+ product_sign_up: null
+ routing:
+ autorouting_tag: ""
+ enabled: false
+ max_email_capacity: 0
+ max_messaging_capacity: 0
+ rule:
+ macro_most_used: true
+ macro_order: alphabetical
+ skill_based_filtered_views: [ ]
+ using_skill_based_routing: false
+ side_conversations:
+ email_channel: false
+ msteams_channel: false
+ show_in_context_panel: false
+ slack_channel: false
+ tickets_channel: false
+ statistics:
+ forum: true
+ rule_usage: true
+ search: true
+ ticket_form:
+ raw_ticket_forms_instructions: Please choose your issue below
+ ticket_forms_instructions: Please choose your issue below
+ tickets:
+ accepted_new_collaboration_tos: false
+ agent_collision: true
+ agent_invitation_enabled: true
+ agent_ticket_deletion: false
+ allow_group_reset: true
+ assign_default_organization: true
+ assign_tickets_upon_solve: true
+ auto_translation_enabled: false
+ auto_updated_ccs_followers_rules: false
+ chat_sla_enablement: false
+ collaboration: true
+ comments_public_by_default: true
+ default_solved_ticket_reassignment_strategy: legacy
+ default_to_draft_mode: false
+ email_attachments: false
+ emoji_autocompletion: true
+ follower_and_email_cc_collaborations: false
+ has_color_text: true
+ is_first_comment_private_enabled: true
+ light_agent_email_ccs_allowed: false
+ list_empty_views: true
+ list_newest_comments_first: true
+ markdown_ticket_comments: false
+ maximum_personal_views_to_list: 8
+ modern_ticket_reassignment: false
+ private_attachments: false
+ rich_text_comments: true
+ show_modern_ticket_reassignment: false
+ status_hold: false
+ tagging: true
+ using_skill_based_routing: false
+ twitter:
+ shorten_url: optional
+ user:
+ agent_created_welcome_emails: true
+ end_user_phone_number_validation: false
+ have_gravatars_enabled: true
+ language_selection: true
+ multiple_organizations: false
+ tagging: true
+ time_zone_selection: true
+ voice:
+ agent_confirmation_when_forwarding: true
+ agent_wrap_up_after_calls: true
+ enabled: true
+ logging: true
+ maximum_queue_size: 5
+ maximum_queue_wait_time: 1
+ only_during_business_hours: false
+ outbound_enabled: true
+ recordings_public: true
+ uk_mobile_forwarding: true
+ ActivitiesCountResponseExample:
+ value:
+ count:
+ refreshed_at: "2020-04-06T02:18:17Z"
+ value: 102
+ ActivitiesResponseExample:
+ value:
+ activities:
+ - actor:
+ active: true
+ alias: ""
+ created_at: "2020-11-17T00:32:12Z"
+ custom_role_id: null
+ default_group_id: 1873
+ details: ""
+ email: cgoddard+ted@zendesk.com
+ external_id: null
+ iana_time_zone: America/Juneau
+ id: 158488612
+ last_login_at: "2020-11-17T00:33:44Z"
+ locale: en-gb
+ locale_id: 5
+ moderator: true
+ name: Tedd
+ notes: ""
+ only_private_comments: false
+ organization_id: null
+ phone: null
+ photo: null
+ report_csv: true
+ restricted_agent: false
+ role: admin
+ role_type: null
+ shared: false
+ shared_agent: false
+ shared_phone_number: null
+ signature: ""
+ suspended: false
+ tags: [ ]
+ ticket_restriction: null
+ time_zone: Alaska
+ two_factor_auth_enabled: null
+ updated_at: "2020-11-17T00:34:38Z"
+ url: https://example.zendesk.com/api/v2/users/158488612
+ user_fields:
+ its_remember_september: null
+ skittles: null
+ user_field_1: null
+ verified: true
+ actor_id: 158488612
+ created_at: "2020-11-17T00:34:40Z"
+ id: 29183462
+ object:
+ ticket:
+ id: 1521
+ subject: test
+ target:
+ ticket:
+ id: 1521
+ subject: test
+ title: 'Tedd assigned ticket #1521 to you.'
+ updated_at: "2020-11-17T00:34:40Z"
+ url: https://example.zendesk.com/api/v2/activities/29183462
+ user:
+ active: true
+ alias: test
+ created_at: "2017-08-14T20:13:53Z"
+ custom_role_id: null
+ default_group_id: 1873
+ details: ""
+ email: user@zendesk.com
+ external_id: oev7jj
+ iana_time_zone: Pacific/Pago_Pago
+ id: 3343
+ last_login_at: "2020-11-16T22:57:45Z"
+ locale: en-gb
+ locale_id: 5
+ moderator: true
+ name: Samwise Gamgee
+ notes: test
+ only_private_comments: false
+ organization_id: 1873
+ phone: null
+ photo:
+ content_type: image/gif
+ content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
+ deleted: false
+ file_name: 1f84950b8d7949b3.gif
+ height: 80
+ id: 8730791
+ inline: false
+ mapped_content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
+ size: 4566
+ thumbnails:
+ - content_type: image/gif
+ content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
+ deleted: false
+ file_name: 1f84950b8d7949b3_thumb.gif
+ height: 32
+ id: 8730801
+ inline: false
+ mapped_content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
+ size: 1517
+ url: https://example.zendesk.com/api/v2/attachments/8730801
+ width: 32
+ url: https://example.zendesk.com/api/v2/attachments/8730791
+ width: 80
+ report_csv: true
+ restricted_agent: false
+ role: admin
+ role_type: null
+ shared: false
+ shared_agent: false
+ shared_phone_number: null
+ signature: test
+ suspended: false
+ tags:
+ - "101"
+ ticket_restriction: null
+ time_zone: American Samoa
+ two_factor_auth_enabled: null
+ updated_at: "2020-11-17T00:33:55Z"
+ url: https://example.zendesk.com/api/v2/users/3343
+ user_fields:
+ its_remember_september: null
+ skittles: "2018-09-14T00:00:00+00:00"
+ user_field_1: "101"
+ verified: true
+ user_id: 3343
+ verb: tickets.assignment
+ actors:
+ - active: true
+ alias: ""
+ created_at: "2020-11-17T00:32:12Z"
+ custom_role_id: null
+ default_group_id: 1873
+ details: ""
+ email: cgoddard+ted@zendesk.com
+ external_id: null
+ iana_time_zone: America/Juneau
+ id: 158488612
+ last_login_at: "2020-11-17T00:33:44Z"
+ locale: en-gb
+ locale_id: 5
+ moderator: true
+ name: Tedd
+ notes: ""
+ only_private_comments: false
+ organization_id: null
+ phone: null
+ photo: null
+ report_csv: true
+ restricted_agent: false
+ role: admin
+ role_type: null
+ shared: false
+ shared_agent: false
+ shared_phone_number: null
+ signature: ""
+ suspended: false
+ tags: [ ]
+ ticket_restriction: null
+ time_zone: Alaska
+ two_factor_auth_enabled: null
+ updated_at: "2020-11-17T00:34:38Z"
+ url: https://example.zendesk.com/api/v2/users/158488612
+ user_fields:
+ its_remember_september: null
+ skittles: null
+ user_field_1: null
+ verified: true
+ count: 1
+ next_page: null
+ previous_page: null
+ users:
+ - active: true
+ alias: test
+ created_at: "2017-08-14T20:13:53Z"
+ custom_role_id: null
+ default_group_id: 1873
+ details: ""
+ email: user@zendesk.com
+ external_id: oev7jj
+ iana_time_zone: Pacific/Pago_Pago
+ id: 3343
+ last_login_at: "2020-11-16T22:57:45Z"
+ locale: en-gb
+ locale_id: 5
+ moderator: true
+ name: Samwise Gamgee
+ notes: test
+ only_private_comments: false
+ organization_id: 1873
+ phone: null
+ photo:
+ content_type: image/gif
+ content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
+ deleted: false
+ file_name: 1f84950b8d7949b3.gif
+ height: 80
+ id: 8730791
+ inline: false
+ mapped_content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
+ size: 4566
+ thumbnails:
+ - content_type: image/gif
+ content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
+ deleted: false
+ file_name: 1f84950b8d7949b3_thumb.gif
+ height: 32
+ id: 8730801
+ inline: false
+ mapped_content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
+ size: 1517
+ url: https://example.zendesk.com/api/v2/attachments/8730801
+ width: 32
+ url: https://example.zendesk.com/api/v2/attachments/8730791
+ width: 80
+ report_csv: true
+ restricted_agent: false
+ role: admin
+ role_type: null
+ shared: false
+ shared_agent: false
+ shared_phone_number: null
+ signature: test
+ suspended: false
+ tags:
+ - "101"
+ ticket_restriction: null
+ time_zone: American Samoa
+ two_factor_auth_enabled: null
+ updated_at: "2020-11-17T00:33:55Z"
+ url: https://example.zendesk.com/api/v2/users/3343
+ user_fields:
+ its_remember_september: null
+ skittles: "2018-09-14T00:00:00+00:00"
+ user_field_1: "101"
+ verified: true
+ ActivityResponseExample:
+ value:
+ activity:
+ actor:
+ active: true
+ alias: ""
+ created_at: "2020-11-17T00:32:12Z"
+ custom_role_id: null
+ default_group_id: 1873
+ details: ""
+ email: cgoddard+ted@zendesk.com
+ external_id: null
+ iana_time_zone: America/Juneau
+ id: 158488612
+ last_login_at: "2020-11-17T00:33:44Z"
+ locale: en-gb
+ locale_id: 5
+ moderator: true
+ name: Tedd
+ notes: ""
+ only_private_comments: false
+ organization_id: null
+ phone: null
+ photo: null
+ report_csv: true
+ restricted_agent: false
+ role: admin
+ role_type: null
+ shared: false
+ shared_agent: false
+ shared_phone_number: null
+ signature: ""
+ suspended: false
+ tags: [ ]
+ ticket_restriction: null
+ time_zone: Alaska
+ two_factor_auth_enabled: null
+ updated_at: "2020-11-17T00:34:38Z"
+ url: https://example.zendesk.com/api/v2/users/158488612
+ user_fields:
+ its_remember_september: null
+ skittles: null
+ user_field_1: null
+ verified: true
+ actor_id: 158488612
+ created_at: "2020-11-17T00:34:40Z"
+ id: 29183462
+ object:
+ ticket:
+ id: 1521
+ subject: test
+ target:
+ ticket:
+ id: 1521
+ subject: test
+ title: 'Tedd assigned ticket #1521 to you.'
+ updated_at: "2020-11-17T00:34:40Z"
+ url: https://example.zendesk.com/api/v2/activities/29183462
+ user:
+ active: true
+ alias: test
+ created_at: "2017-08-14T20:13:53Z"
+ custom_role_id: null
+ default_group_id: 1873
+ details: ""
+ email: user@zendesk.com
+ external_id: oev7jj
+ iana_time_zone: Pacific/Pago_Pago
+ id: 3343
+ last_login_at: "2020-11-16T22:57:45Z"
+ locale: en-gb
+ locale_id: 5
+ moderator: true
+ name: Samwise Gamgee
+ notes: test
+ only_private_comments: false
+ organization_id: 1873
+ phone: null
+ photo:
+ content_type: image/gif
+ content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
+ deleted: false
+ file_name: 1f84950b8d7949b3.gif
+ height: 80
+ id: 8730791
+ inline: false
+ mapped_content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
+ size: 4566
+ thumbnails:
+ - content_type: image/gif
+ content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
+ deleted: false
+ file_name: 1f84950b8d7949b3_thumb.gif
+ height: 32
+ id: 8730801
+ inline: false
+ mapped_content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
+ size: 1517
+ url: https://example.zendesk.com/api/v2/attachments/8730801
+ width: 32
+ url: https://example.zendesk.com/api/v2/attachments/8730791
+ width: 80
+ report_csv: true
+ restricted_agent: false
+ role: admin
+ role_type: null
+ shared: false
+ shared_agent: false
+ shared_phone_number: null
+ signature: test
+ suspended: false
+ tags:
+ - "101"
+ ticket_restriction: null
+ time_zone: American Samoa
+ two_factor_auth_enabled: null
+ updated_at: "2020-11-17T00:33:55Z"
+ url: https://example.zendesk.com/api/v2/users/3343
+ user_fields:
+ its_remember_september: null
+ skittles: "2018-09-14T00:00:00+00:00"
+ user_field_1: "101"
+ verified: true
+ user_id: 3343
+ verb: tickets.assignment
+ AddTagsByObjectIdResponseExample:
+ value:
+ tags:
+ - urgent
+ - printer
+ - fire
+ - paper
+ ApprovalRequestCreateRequestExample:
+ value:
+ assignee_user_id: 456
+ message: Please approve this request for a new laptop for the engineering team
+ subject: Laptop Purchase Approval
+ ticket_id: 123
+ ApprovalRequestCreateRequestWithGroupExample:
+ value:
+ assignee_group_id: 789
+ message: Please approve this request for new office equipment for the support team
+ subject: Office Equipment Approval
+ ticket_id: 123
+ ApprovalRequestErrorExample:
+ value:
+ errors:
+ - code: ApprovalRequestCreationFailed
+ title: Approval request couldn't be sent because one active, approved, or denied request already exists
+ ApprovalRequestSimpleResponseExample:
+ value:
+ approval_request:
+ assignee_group_id: null
+ assignee_user_id: 456
+ created_at: "2026-01-23T19:02:36Z"
+ created_by_id: 789
+ id: 01KFP3S9EVXF9CKAYY080NV98C
+ message: Please approve this request for a new laptop for the engineering team
+ origination_type: API_ORIGINATION
+ status: active
+ subject: Laptop Purchase Approval
+ ticket_id: 123
+ ApprovalRequestsListResponseExample:
+ value:
+ approval_requests:
+ - assignee_user:
+ id: 12345
+ name: Jane Approver
+ created_at: "2025-02-26T10:30:00Z"
+ id: 01HX123ABC
+ message: Please approve the software license request
+ origination_type: API_ORIGINATION
+ status: active
+ subject: Software License Approval
+ ticket_id: 101
+ - assignee_group:
+ id: 456
+ name: Approval Team
+ created_at: "2025-02-25T14:15:00Z"
+ id: 01HX123DEF
+ message: Please approve the hardware request
+ origination_type: UI_ORIGINATION
+ status: approved
+ subject: Hardware Request
+ ticket_id: 102
+ links:
+ next: null
+ prev: null
+ meta:
+ after_cursor: null
+ before_cursor: null
+ has_more: false
+ AssigneeFieldAssignableGroupAgentsResponseExample:
+ value:
+ agents:
+ - avatar_url: https://z3n-example.zendesk.com/system/photos/900005192023/my_profile.png
+ id: 6473829100
+ name: Joe Smith
+ - avatar_url: https://z3n-example.zendesk.com/system/photos/412005192023/my_profile.png
+ id: 9182736400
+ name: Jane Doe
+ - avatar_url: https://z3n-example.zendesk.com/system/photos/887005192023/my_profile.png
+ id: 1928373460
+ name: Cookie Monster
+ count: 3
+ next_page: null
+ previous_page: null
+ AssigneeFieldAssignableGroupsAndAgentsSearchResponseExample:
+ value:
+ agents:
+ - group: Tech
+ group_id: 6574839201
+ id: 8392017465
+ name: Sam Technologist
+ photo_url: https://z3n-example.zendesk.com/system/photos/410305192023/my_profile.png
+ count: 2
+ groups:
+ - id: 6574839201
+ name: Tech
+ AssigneeFieldAssignableGroupsResponseExample:
+ value:
+ count: 3
+ groups:
+ - description: Engineering
+ id: 9182736455
+ name: Group for Bugs for Engineering
+ - description: Product
+ id: 1928374655
+ name: Group for feature requests
+ - description: Customer Support
+ id: 5519283746
+ name: Group for customer inquiries
+ next_page: null
+ previous_page: null
+ AttachmentResponseExample:
+ value:
+ attachment:
+ content_type: application/binary
+ content_url: https://company.zendesk.com/attachments/myfile.dat
+ file_name: myfile.dat
+ id: 498483
+ size: 2532
+ thumbnails: [ ]
+ url: https://company.zendesk.com/api/v2/attachments/498483
+ AttachmentUpdateRequestExample:
+ value:
+ attachment:
+ malware_access_override: true
+ AttachmentUploadResponseExample:
+ value:
+ upload:
+ attachment:
+ content_type: image/png
+ content_url: https://company.zendesk.com/attachments/token/tyBq1ms40dFaHefSIigxZpwGg/?name=crash.png
+ deleted: false
+ file_name: crash.png
+ height: 62
+ id: 1503729607981
+ inline: false
+ mapped_content_url: https://company.zendesk.com/attachments/token/tyBq1ms40dFaHefSIigxZpwGg/?name=crash.png
+ size: 5172
+ thumbnails: [ ]
+ url: https://company.zendesk.com/api/v2/attachments/1503729607981
+ width: 80
+ attachments:
+ - content_type: image/png
+ content_url: https://company.zendesk.com/attachments/token/tyBq1ms40dFaHefSIigxZpwGg/?name=crash.png
+ deleted: false
+ file_name: crash.png
+ height: 62
+ id: 1503729607981
+ inline: false
+ mapped_content_url: https://company.zendesk.com/attachments/token/tyBq1ms40dFaHefSIigxZpwGg/?name=crash.png
+ size: 5172
+ thumbnails: [ ]
+ url: https://company.zendesk.com/api/v2/attachments/1503729607981
+ width: 80
+ token: LXJdriewLBP8JrtzzkN7Ne4k6
+ AuditLogResponseExample:
+ value:
+ audit_log:
+ action: update
+ actor_id: 1234
+ actor_name: Sameer Patel
+ change_description: Role changed from Administrator to End User
+ created_at: "2012-03-05T11:32:44Z"
+ id: 498483
+ ip_address: 209.119.38.228
+ source_id: 3456
+ source_label: John Doe
+ source_type: user
+ url: https://company.zendesk.com/api/v2/audit_logs/498483
+ AuditLogsResponseExample:
+ value:
+ audit_logs:
+ - action: update
+ actor_id: 1234
+ actor_name: Sameer Patel
+ change_description: Role changed from Administrator to End User
+ created_at: "2012-03-05T11:32:44Z"
+ id: 498483
+ ip_address: 209.119.38.228
+ source_id: 3456
+ source_label: John Doe
+ source_type: user
+ url: https://company.zendesk.com/api/v2/audit_logs/498483
+ AutocompleteOrganizationsResponseExample:
+ value:
+ count: 2
+ next_page: null
+ organizations:
+ - created_at: "2018-11-14T00:14:52Z"
+ details: caterpillar =)
+ domain_names:
+ - remain.com
+ external_id: null
+ group_id: 1835962
+ id: 35436
+ name: Important Customers
+ notes: donkey
+ organization_fields:
+ datepudding: "2018-11-04T00:00:00+00:00"
+ org_field_1: happy happy
+ org_field_2: teapot_kettle
+ shared_comments: false
+ shared_tickets: false
+ tags:
+ - smiley
+ - teapot_kettle
+ updated_at: "2018-11-14T00:54:22Z"
+ url: https://example.zendesk.com/api/v2/organizations/4112492
+ - created_at: "2017-08-14T20:13:52Z"
+ details: test
+ domain_names:
+ - test.com
+ external_id: null
+ group_id: null
+ id: 20057623
+ name: Imperial College
+ notes: ""
+ organization_fields:
+ datepudding: "2018-11-02T00:00:00+00:00"
+ org_field_1: malarky
+ org_field_2: teapot_kettle
+ shared_comments: false
+ shared_tickets: false
+ tags:
+ - teapot_kettle
+ updated_at: "2019-05-16T01:27:46Z"
+ url: https://example.zendesk.com.com/api/v2/organizations/1873
+ previous_page: null
+ AutomationCreateResponseExample:
+ value:
+ automation:
+ actions:
+ - field: priority
+ value: high
+ active: true
+ conditions:
+ all:
+ - field: status
+ operator: is
+ value: open
+ - field: priority
+ operator: less_than
+ value: high
+ any: [ ]
+ id: 9873843
+ position: 8
+ raw_title: Roger Wilco
+ title: Roger Wilco
+ AutomationResponseExample:
+ value:
+ automation:
+ actions:
+ - field: status
+ value: open
+ - field: assignee_id
+ value: "296220096"
+ active: true
+ conditions:
+ all:
+ - field: status
+ operator: less_than
+ value: solved
+ - field: assignee_id
+ operator: is
+ value: "296220096"
+ any:
+ - field: current_tags
+ operator: includes
+ value: hello
+ id: 25
+ position: 8
+ raw_title: Close and Save
+ title: Close and Save
+ AutomationsResponseExample:
+ value:
+ automations:
+ - actions:
+ - field: status
+ value: open
+ - field: assignee_id
+ value: "296220096"
+ active: true
+ conditions:
+ all:
+ - field: status
+ operator: less_than
+ value: solved
+ - field: assignee_id
+ operator: is
+ value: "296220096"
+ any:
+ - field: current_tags
+ operator: includes
+ value: hello
+ id: 25
+ position: 8
+ raw_title: Close and Save
+ title: Close and Save
+ - actions:
+ - field: status
+ value: open
+ - field: assignee_id
+ value: "296220096"
+ active: false
+ conditions:
+ all:
+ - field: status
+ operator: less_than
+ value: solved
+ - field: assignee_id
+ operator: is
+ value: "296220096"
+ any:
+ - field: current_tags
+ operator: includes
+ value: hello
+ id: 26
+ position: 9
+ raw_title: '{{dc.assign_priority_tag}}'
+ title: Assign priority tag
+ count: 2
+ next_page: null
+ previous_page: null
+ AutomationsSearchResponseExample:
+ value:
+ automations:
+ - actions:
+ - field: status
+ value: open
+ - field: assignee_id
+ value: "296220096"
+ active: true
+ conditions:
+ all:
+ - field: status
+ operator: less_than
+ value: solved
+ - field: assignee_id
+ operator: is
+ value: "296220096"
+ any:
+ - field: current_tags
+ operator: includes
+ value: hello
+ id: 25
+ position: 9
+ raw_title: Close and Save
+ title: Close and Save
+ - actions:
+ - field: status
+ value: open
+ - field: assignee_id
+ value: "296220096"
+ active: true
+ conditions:
+ all:
+ - field: status
+ operator: less_than
+ value: solved
+ - field: assignee_id
+ operator: is
+ value: "296220096"
+ any:
+ - field: current_tags
+ operator: includes
+ value: hello
+ id: 28
+ position: 9
+ raw_title: '{{dc.close_and_redirect}}'
+ title: Close and redirect to topics
+ count: 2
+ next_page: null
+ previous_page: null
+ AutomationsUpdateManyResponseExample:
+ value:
+ automations:
+ - actions:
+ - field: status
+ value: open
+ - field: assignee_id
+ value: "296220096"
+ active: true
+ conditions:
+ all:
+ - field: status
+ operator: less_than
+ value: solved
+ - field: assignee_id
+ operator: is
+ value: "296220096"
+ any:
+ - field: current_tags
+ operator: includes
+ value: hello
+ id: 25
+ position: 15
+ raw_title: Close and Save
+ title: Close and Save
+ - actions:
+ - field: status
+ value: open
+ - field: assignee_id
+ value: "296220096"
+ active: false
+ conditions:
+ all:
+ - field: status
+ operator: less_than
+ value: solved
+ - field: assignee_id
+ operator: is
+ value: "296220096"
+ any:
+ - field: current_tags
+ operator: includes
+ value: hello
+ id: 26
+ position: 8
+ raw_title: '{{dc.assign_priority_tag}}'
+ title: Assign priority tag
+ count: 2
+ next_page: null
+ previous_page: null
+ BookmarkCreateRequest:
+ value:
+ bookmark:
+ ticket_id: 113
+ BookmarkResponse:
+ value:
+ bookmark:
+ created_at: "2020-10-01T08:33:45Z"
+ id: 900000009567
+ ticket:
+ id: 123
+ priority: high
+ raw_subject: Chat with Visitor 19785128
+ requester_id: 156
+ subject: Chat with Visitor 19785128
+ url: https://{subdomain}.zendesk.com/api/v2/tickets/123
+ url: https://{subdomain}.zendesk.com/api/v2/bookmarks/900000001111
+ BookmarksResponse:
+ value:
+ bookmarks:
+ - created_at: "2020-10-01T08:33:45Z"
+ id: 900000009567
+ ticket:
+ id: 123
+ priority: high
+ raw_subject: Chat with Visitor 19785128
+ requester_id: 165
+ subject: Chat with Visitor 19785128
+ url: https://{subdomain}.zendesk.com/api/v2/tickets/123
+ url: https://{subdomain}.zendesk.com/api/v2/bookmarks/900000001111
+ - created_at: "2020-09-11T10:22:45Z"
+ id: 900000009568
+ ticket:
+ id: 123
+ priority: high
+ raw_subject: Chat with Visitor 19785128
+ requester_id: 156
+ subject: Chat with Visitor 19785128
+ url: https://{subdomain}.zendesk.com/api/v2/tickets/123
+ url: https://{subdomain}.zendesk.com/api/v2/bookmarks/900000001112
+ count: 1
+ next_page: null
+ previous_page: null
+ BrandAgentResponseExample:
+ value:
+ brand_agent:
+ brand_id: 88
+ created_at: "2012-04-03T12:34:01Z"
+ id: "461"
+ updated_at: "2012-04-03T12:34:01Z"
+ user_id: 72
+ BrandAgentsResponseExample:
+ value:
+ brand_agents:
+ - brand_id: 12
+ created_at: "2009-05-13T00:07:08Z"
+ id: "4"
+ updated_at: "2011-07-22T00:11:12Z"
+ user_id: 29
+ - brand_id: 3
+ created_at: "2012-03-13T22:01:32Z"
+ id: "49"
+ updated_at: "2012-03-13T22:01:32Z"
+ user_id: 155
+ BrandCreateRequestExample:
+ value:
+ brand:
+ name: Brand 1
+ subdomain: Brand1
+ BrandResponseExample:
+ value:
+ brand:
+ active: true
+ brand_url: https://brand1.zendesk.com
+ created_at: "2019-08-06T02:43:39Z"
+ default: true
+ has_help_center: true
+ help_center_state: enabled
+ host_mapping: brand1.com
+ id: 360002783572
+ is_deleted: false
+ logo:
+ content_type: image/png
+ content_url: https://company.zendesk.com/logos/brand1_logo.png
+ file_name: brand1_logo.png
+ id: 928374
+ mapped_content_url: https://company.com/logos/brand1_logo.png
+ size: 166144
+ thumbnails:
+ - content_type: image/png
+ content_url: https://company.zendesk.com/photos/brand1_logo_thumb.png
+ file_name: brand1_logo_thumb.png
+ id: 928375
+ mapped_content_url: https://company.com/photos/brand1_logo_thumb.png
+ size: 58298
+ url: https://company.zendesk.com/api/v2/attachments/928375
+ - content_type: image/png
+ content_url: https://company.zendesk.com/photos/brand1_logo_small.png
+ file_name: brand1_logo_small.png
+ id: 928376
+ mapped_content_url: https://company.com/photos/brand1_logo_small.png
+ size: 58298
+ url: https://company.zendesk.com/api/v2/attachments/928376
+ url: https://company.zendesk.com/api/v2/attachments/928374
+ name: Brand 1
+ signature_template: '{{agent.signature}}'
+ subdomain: hello-world
+ ticket_form_ids:
+ - 360000660811
+ updated_at: "2019-08-06T02:43:40Z"
+ url: https://company.zendesk.com/api/v2/brands/360002783572
+ BrandUpdateRequestExample:
+ value:
+ brand:
+ active: true
+ host_mapping: brand1.com
+ name: Brand 1
+ subdomain: Brand1
+ BrandsResponseExample:
+ value:
+ brands:
+ - active: true
+ brand_url: https://brand1.zendesk.com
+ created_at: "2019-08-06T02:43:39Z"
+ default: true
+ has_help_center: true
+ help_center_state: enabled
+ host_mapping: brand1.com
+ id: 360002783572
+ is_deleted: false
+ logo:
+ content_type: image/png
+ content_url: https://company.zendesk.com/logos/brand1_logo.png
+ file_name: brand1_logo.png
+ id: 928374
+ mapped_content_url: https://company.com/logos/brand1_logo.png
+ size: 166144
+ thumbnails:
+ - content_type: image/png
+ content_url: https://company.zendesk.com/photos/brand1_logo_thumb.png
+ file_name: brand1_logo_thumb.png
+ id: 928375
+ mapped_content_url: https://company.com/photos/brand1_logo_thumb.png
+ size: 58298
+ url: https://company.zendesk.com/api/v2/attachments/928375
+ - content_type: image/png
+ content_url: https://company.zendesk.com/photos/brand1_logo_small.png
+ file_name: brand1_logo_small.png
+ id: 928376
+ mapped_content_url: https://company.com/photos/brand1_logo_small.png
+ size: 58298
+ url: https://company.zendesk.com/api/v2/attachments/928376
+ url: https://company.zendesk.com/api/v2/attachments/928374
+ name: Brand 1
+ signature_template: '{{agent.signature}}'
+ subdomain: hello-world
+ ticket_form_ids:
+ - 360000660811
+ updated_at: "2019-08-06T02:43:40Z"
+ url: https://company.zendesk.com/api/v2/brands/360002783572
+ count: 1
+ next_page: null
+ previous_page: null
+ BulkSkillBasedRoutingAttributeValuesErrorExample:
+ value:
+ error:
+ message: 'You passed an invalid value for the job.items attribute. Invalid parameter: job.items must be an integer from api/v2/routing/instance_values/update_many_agent_instance_values'
+ title: Invalid attribute
+ BulkSkillBasedRoutingAttributeValuesJobStatusResponseExample:
+ value:
+ job_status:
+ id: V3-25da3dc252ff0f7b63f65d9a8c3ead61
+ job_type: Bulk upsert/update/delete agent instance values
+ message: null
+ progress: null
+ results: null
+ status: queued
+ total: 2
+ url: https://example.zendesk.com/api/v2/job_statuses/82de0b0467893ac9fe64f1a99
+ BulkSkillBasedRoutingAttributeValuesRequestExample:
+ value:
+ job:
+ action: upsert
+ attributes:
+ attribute_values:
+ - agent_skill_priority: NORMAL
+ id: b376b35a-e38b-11e8-a292-e3b6377c5575
+ items:
+ - 224
+ - 225
+ BulkUpdateDefaultCustomStatusRequestExample:
+ value:
+ ids: 1234567,1234577
+ BulkUpdateDefaultCustomStatusResponseExample:
+ value: { }
+ ChannelFrameworkPushResultsResponseExample:
+ value:
+ results:
+ - external_resource_id: "234"
+ status:
+ code: could_not_locate_parent_external_resource
+ description: "123"
+ ComplianceDeletionStatusesResponseExample:
+ value:
+ compliance_deletion_statuses:
+ - account_subdomain: accountABC
+ action: request_deletion
+ application: all
+ created_at: "2009-07-20T22:55:23Z"
+ executer_id: 2000
+ user_id: 1
+ - account_subdomain: accountABC
+ action: started
+ application: support
+ created_at: "2009-07-20T22:55:29Z"
+ executer_id: null
+ user_id: 1
+ - account_subdomain: accountABC
+ action: complete
+ application: support
+ created_at: "2009-07-20T22:57:02Z"
+ executer_id: null
+ user_id: 1
+ - account_subdomain: accountABC
+ action: started
+ application: chat
+ created_at: "2009-07-21T02:51:18Z"
+ executer_id: null
+ user_id: 1
+ ConversationLogResponseExample:
+ value:
+ events:
+ - attachments: [ ]
+ author:
+ avatar_url: https://static.zdassets.com/web_widget/latest/default_avatar.png
+ display_name: SampleBot
+ type: bot
+ zen:sunco:user_id: a21a91fd1234a
+ zen:support:user_id: -1
+ content:
+ actions:
+ - reply:
+ payload: goto_node=01J9WVC919KKCBB0WKC42YQMCT_01J9Z7SYB9EGXNGT8DQV3KX4F2
+ text: Talk to a human
+ text: Hey! Have a question? I'm here to assist.
+ type: text
+ created_at: 2025-04-22T09:24:26Z
+ id: 02JSED093DTX4RTDRRJXN2YKB0
+ metadata:
+ custom: { }
+ system: { }
+ ticket_version: 0
+ received_at: 2025-04-22T09:24:26.861Z
+ reference: zen:sunco:conversation_message:6807603a38564290f5a086c2
+ source:
+ type: zd:answerBot
+ type: Messaging::ConversationMessage
+ - attachments: [ ]
+ author:
+ display_name: sample user
+ type: user
+ zen:support:user_id: 8303911923701
+ content:
+ body: |-
+ Creates any of the following custom field types:
| Custom field type | -Description | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| text | -Default custom field type when type is not specified |
- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| textarea | -For multi-line text | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| checkbox | -To capture a boolean value. Allowed values are true or false. Optionally, you can specify a tag to be added - to the ticket when the value is true. - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| date | -Example: 2021-04-16 | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| integer | -String composed of numbers. May contain an optional decimal point | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| decimal | -For numbers containing decimals | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| regexp | -Matches the Regex pattern found in the custom field settings | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| partialcreditcard | -A credit card number. Only the last 4 digits are retained | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| multiselect | -Enables users to choose multiple options from a dropdown menu. It contains one or more tag values belonging - to the field's options. - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tagger | -Single-select dropdown menu. It contains one or more tag values belonging to the field's options. - Example: ( {"id": 21938362, "value": ["hd_3000", "hd_5555"]}) - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| lookup | -A field to create a relationship (see Allowed For
-
|
| value | -description | -
|---|---|
position |
- order set manually using the Arrange Content page. Default order | -
created_at |
- order by creation time | -
updated_at |
- order by update time | -
| value | -description | -
|---|---|
asc |
- ascending order | -
desc |
- descending order | -
You must specify a category name and locale. The locale can be omitted if it's specified - in the URL. Optionally, you can specify multiple translations for - the category. The specified locales must be enabled for the current Help Center.
-Note: {/locale} is an optional parameter for admins and agents. End users and anonymous users must provide the parameter.
Translations are embedded within the category because they're - not shared between resources.
- responses: - "200": - description:description
- content: - application/json: - schema: - $ref: '#/components/schemas/CategoryResponse' - put: - operationId: UpdateCategory - tags: - - Category - summary: Update Category by Locale - description: |- -These endpoints only update category-level metadata such as the sorting position. - They don't update category translations.
-WARNING: Every section and all articles in the category will also be deleted.
-The endpoint updates the category source_locale property
OK Response
- content: - application/json: - schema: - $ref: '#/components/schemas/CategoryResponse' - /api/v2/help_center/categories: - get: - operationId: ListCategoriesNoLocale - tags: - - Category - summary: List Categories - description: |- -The response will list only the categories that the agent can view in the help center.
- parameters: - - name: sort_by - in: query - description:Sorts the results by one of the accepted values
- schema: - type: string - enum: - - position - - created_at - - updated_at - - name: sort_order - in: query - description:Selects the order of the results.
- schema: - type: string - enum: - - asc - - desc - responses: - "200": - description:description
- content: - application/json: - schema: - $ref: '#/components/schemas/CategoriesResponse' - post: - operationId: CreateCategoryNoLocale - tags: - - Category - summary: Create Category - description: |- -You must specify a category name and locale. - Optionally, you can specify multiple translations for - the category. The specified locales must be enabled for the current Help Center.
-Note: {/locale} is an optional parameter for admins and agents. End users and anonymous users must provide the parameter.
Translations are embedded within the category because they're - not shared between resources.
- responses: - "200": - description:description
- content: - application/json: - schema: - $ref: '#/components/schemas/CategoryResponse' - put: - operationId: UpdateCategoryNoLocale - tags: - - Category - summary: Update Category - description: |- -These endpoints only update category-level metadata such as the sorting position. - They don't update category translations.
-WARNING: Every section and all articles in the category will also be deleted.
-No content
- /api/v2/search: - get: - operationId: List - tags: - - Search - summary: List Search Results - description: |- -Returns the search results. See Query syntax for details on the {@code query} parameter.
-Use the ampersand character (&) to append the {@code sort_by} or {@code sort_order} parameters to the URL.
-For examples, see Searching with Zendesk API.
-This endpoint has its own rate limit. The rate limit counts towards the global API rate limit. See Limits.
-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 - Using cursor pagination for more information.
- parameters: - - name: query - in: query - description: Returns the search results. See Query syntax for details on the {@code query} parameter. For details on the query syntax, see the Zendesk Support search reference. - required: true - schema: - type: string - - name: sort_by - in: query - description: One of {@code updated_at}, {@code created_at}, {@code priority}, {@code status}, or {@code ticket_type}. Defaults to sorting by relevance - schema: - $ref: '#/components/schemas/SearchSortBy' - - name: sort_order - in: query - description: Defaults to descending - schema: - $ref: '#/components/schemas/SearchSortOrder' - - $ref: '#/components/parameters/SearchInclude' - responses: - "200": - description: Success response - content: - application/json: - schema: - $ref: '#/components/schemas/SearchResponse' - "400": - description: Error response - content: - application/json: - schema: - $ref: '#/components/schemas/BadRequestErrorResponse' - /api/v2/search/count: - get: - operationId: Count - tags: - - Search - summary: Show Search Results Count - description: | - Returns the number of items matching the query rather than returning the items. The search string works the same as a regular search. - -Exports a set of results. See Query syntax for the syntax of the {@code query} parameter.
-Use this endpoint for search queries that will return more than 1000 results. The result set is ordered only by the {@code 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 {@code 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 {@code 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 {@code 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.
- parameters: - - name: query - in: query - description: Returns the search results. See Query syntax for details on the {@code query} parameter. For details on the query syntax, see the Zendesk Support search reference. - required: true - schema: - type: string - - name: page[size] - in: query - description: The number of results shown in a page. - required: true - schema: - type: integer - - name: page[after] - in: query - description: The cursor token for fetching the next page of results. - required: true - schema: - type: string - - name: filter[type] - in: query - description: The object type returned by the export query. Can be `ticket`, `organization`, `user`, or `group`. - required: true - schema: - $ref: '#/components/schemas/SearchExportType' - - $ref: '#/components/parameters/SearchInclude' - responses: - "200": - description: Success response - content: - application/json: - schema: - $ref: '#/components/schemas/SearchResponse' - "400": - description: Error response - content: - application/json: - schema: - $ref: '#/components/schemas/BadRequestErrorResponse' +#paths: +# /api/v2/ticket_fields: +# get: +# operationId: ListTicketFields +# tags: +# - Ticket +# summary: List Ticket Fields +# description: | +#Returns a list of all system and custom ticket fields in your account.
+#For end users, only the ticket fields with visible_in_portal set to true are returned.
+#Consider caching this resource to use with the{@link TicketClient}.
+#Creates any of the following custom field types:
+#| Custom field type | +#Description | +#
|---|---|
| text | +#Default custom field type when type is not specified |
+#
| textarea | +#For multi-line text | +#
| checkbox | +#To capture a boolean value. Allowed values are true or false. Optionally, you can specify a tag to be added +# to the ticket when the value is true. +# | +#
| date | +#Example: 2021-04-16 | +#
| integer | +#String composed of numbers. May contain an optional decimal point | +#
| decimal | +#For numbers containing decimals | +#
| regexp | +#Matches the Regex pattern found in the custom field settings | +#
| partialcreditcard | +#A credit card number. Only the last 4 digits are retained | +#
| multiselect | +#Enables users to choose multiple options from a dropdown menu. It contains one or more tag values belonging +# to the field's options. +# | +#
| tagger | +#Single-select dropdown menu. It contains one or more tag values belonging to the field's options. +# Example: ( {"id": 21938362, "value": ["hd_3000", "hd_5555"]}) +# | +#
| lookup | +#A field to create a relationship (see lookup relationships) to +# another object such as a user, ticket, or organization +# | +#
Note: Tags can't be re-used across custom ticket fields. For example, if you configure a tag for +# a checkbox field, you can't use that tag value for a dropdown (tagger) field option. The use of tags isn't +# validated and can prevent editing in the future.
+#See About custom field types in the Zendesk +# Help Center.
+#We recommend the following best practices for ticket fields limits. Creating more than these amounts can affect +# performance.
+#Returns a number of ticket properties though not the ticket comments. To get the comments, use List Comments
+#Some user segments can only be applied to sections and topics on certain Guide plans. For instance, user
+# segments with a user_type of "staff" cannot be applied to sections and topics on accounts on the Guide
+# Lite plan or the Suite Team plan.
+# (Allowed for Help Center managers)
Lists the topics that use the specified user segment.
+#This endpoint supports pagination as described in Pagination.
+#See Pagination.
+# responses: +# "200": +# description: OK Response +# content: +# application/json: +# schema: +# $ref: '#/components/schemas/TopicsResponse' +# /api/v2/help_center/{locale}/categories: +# parameters: +# - $ref: '#/components/parameters/OptionalLocale' +# get: +# operationId: ListCategories +# tags: +# - Category +# summary: List Categories by Locale +# description: |- +#The response will list only the categories that the agent, end user, or +# anonymous user can view in the help center.
+#Translations are embedded within the category because they're +# not shared between resources.
+# parameters: +# - name: sort_by +# in: query +# description: | +#The sort_by parameter can have one of the following values:
| value | +#description | +#
|---|---|
position |
+# order set manually using the Arrange Content page. Default order | +#
created_at |
+# order by creation time | +#
updated_at |
+# order by update time | +#
| value | +#description | +#
|---|---|
asc |
+# ascending order | +#
desc |
+# descending order | +#
You must specify a category name and locale. The locale can be omitted if it's specified +# in the URL. Optionally, you can specify multiple translations for +# the category. The specified locales must be enabled for the current Help Center.
+#Note: {/locale} is an optional parameter for admins and agents. End users and anonymous users must provide the parameter.
Translations are embedded within the category because they're +# not shared between resources.
+# responses: +# "200": +# description:description
+# content: +# application/json: +# schema: +# $ref: '#/components/schemas/CategoryResponse' +# put: +# operationId: UpdateCategory +# tags: +# - Category +# summary: Update Category by Locale +# description: |- +#These endpoints only update category-level metadata such as the sorting position. +# They don't update category translations.
+#WARNING: Every section and all articles in the category will also be deleted.
+#The endpoint updates the category source_locale property
OK Response
+# content: +# application/json: +# schema: +# $ref: '#/components/schemas/CategoryResponse' +# /api/v2/help_center/categories: +# get: +# operationId: ListCategoriesNoLocale +# tags: +# - Category +# summary: List Categories +# description: |- +#The response will list only the categories that the agent can view in the help center.
+# parameters: +# - name: sort_by +# in: query +# description:Sorts the results by one of the accepted values
+# schema: +# type: string +# enum: +# - position +# - created_at +# - updated_at +# - name: sort_order +# in: query +# description:Selects the order of the results.
+# schema: +# type: string +# enum: +# - asc +# - desc +# responses: +# "200": +# description:description
+# content: +# application/json: +# schema: +# $ref: '#/components/schemas/CategoriesResponse' +# post: +# operationId: CreateCategoryNoLocale +# tags: +# - Category +# summary: Create Category +# description: |- +#You must specify a category name and locale. The locale can be omitted if it's specified +# in the URL. Optionally, you can specify multiple translations for +# the category. The specified locales must be enabled for the current Help Center.
+#description
+# content: +# application/json: +# schema: +# $ref: '#/components/schemas/CategoryResponse' +# put: +# operationId: UpdateCategoryNoLocale +# tags: +# - Category +# summary: Update Category +# description: |- +#These endpoints only update category-level metadata such as the sorting position. +# They don't update category translations.
+#WARNING: Every section and all articles in the category will also be deleted.
+#No content
+# /api/v2/search: +# get: +# operationId: List +# tags: +# - Search +# summary: List Search Results +# description: |- +#Returns the search results. See Query syntax for details on the {@code query} parameter.
+#Use the ampersand character (&) to append the {@code sort_by} or {@code sort_order} parameters to the URL.
+#For examples, see Searching with Zendesk API.
+#This endpoint has its own rate limit. The rate limit counts towards the global API rate limit. See Limits.
+#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 +# Using cursor pagination for more information.
+# parameters: +# - name: query +# in: query +# description: Returns the search results. See Query syntax for details on the {@code query} parameter. For details on the query syntax, see the Zendesk Support search reference. +# required: true +# schema: +# type: string +# - name: sort_by +# in: query +# description: One of {@code updated_at}, {@code created_at}, {@code priority}, {@code status}, or {@code ticket_type}. Defaults to sorting by relevance +# schema: +# $ref: '#/components/schemas/SearchSortBy' +# - name: sort_order +# in: query +# description: Defaults to descending +# schema: +# $ref: '#/components/schemas/SearchSortOrder' +# - $ref: '#/components/parameters/SearchInclude' +# responses: +# "200": +# description: Success response +# content: +# application/json: +# schema: +# $ref: '#/components/schemas/SearchResponse' +# "400": +# description: Error response +# content: +# application/json: +# schema: +# $ref: '#/components/schemas/BadRequestErrorResponse' +# /api/v2/search/count: +# get: +# operationId: Count +# tags: +# - Search +# summary: Show Search Results Count +# description: | +# Returns the number of items matching the query rather than returning the items. The search string works the same as a regular search. +# +#Exports a set of results. See Query syntax for the syntax of the {@code query} parameter.
+#Use this endpoint for search queries that will return more than 1000 results. The result set is ordered only by the {@code 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 {@code 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 {@code 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 {@code 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.
+# parameters: +# - name: query +# in: query +# description: Returns the search results. See Query syntax for details on the {@code query} parameter. For details on the query syntax, see the Zendesk Support search reference. +# required: true +# schema: +# type: string +# - name: page[size] +# in: query +# description: The number of results shown in a page. +# required: true +# schema: +# type: integer +# - name: page[after] +# in: query +# description: The cursor token for fetching the next page of results. +# required: true +# schema: +# type: string +# - name: filter[type] +# in: query +# description: The object type returned by the export query. Can be `ticket`, `organization`, `user`, or `group`. +# required: true +# schema: +# $ref: '#/components/schemas/SearchExportType' +# - $ref: '#/components/parameters/SearchInclude' +# responses: +# "200": +# description: Success response +# content: +# application/json: +# schema: +# $ref: '#/components/schemas/SearchResponse' +# "400": +# description: Error response +# content: +# application/json: +# schema: +# $ref: '#/components/schemas/BadRequestErrorResponse' components: schemas: SearchSortBy: @@ -1007,7 +980,7 @@ components: Attachment: type: object description: | - A file represented as an Attachment object + A file represented as an Attachment object allOf: - $ref: '#/components/schemas/AttachmentBase' - $ref: '#/components/schemas/AttachmentThumbnails' @@ -1021,7 +994,7 @@ components: content_url: type: string description: | - A full URL where the attachment image file can be downloaded. The file may be hosted externally so take care not to inadvertently send Zendesk authentication credentials. See Working with url properties + A full URL where the attachment image file can be downloaded. The file may be hosted externally so take care not to inadvertently send Zendesk authentication credentials. See Working with url properties readOnly: true deleted: type: boolean @@ -1175,7 +1148,7 @@ components: type: string description: |HTML body of the article. Unsafe tags and attributes may be removed before display. For a list of safe tags and attributes, - see Allowing unsafe HTML in Help Center articles in Zendesk help
+ see Allowing unsafe HTML in Help Center articles in Zendesk help comments_disabled: type: boolean description: True if comments are disabled; false otherwise @@ -1425,36 +1398,39 @@ components: html_url: type: string description: The url of this category in Help Center + # readOnly: true id: type: integer format: int64 description: Automatically assigned when creating categories + # readOnly: true locale: - $ref: '#/components/schemas/LocaleAbbreviation' + type: string + description: The locale where the category is displayed name: type: string description: The name of the category outdated: type: boolean description: Whether the category is out of date + # readOnly: true position: type: integer format: int64 description: The position of this category relative to other categories source_locale: - $ref: '#/components/schemas/LocaleAbbreviation' - translations: - type: array - description: The translations for the category - items: - $ref: '#/components/schemas/Translation' + type: string + description: The source (default) locale of the category + # readOnly: true updated_at: type: string format: date-time description: The time at which the category was last updated + # readOnly: true url: type: string description: The API url of this category + # readOnly: true required: - name CategoryResponse: @@ -1479,13 +1455,13 @@ components: author_id: type: integer format: int64 - description: The id of the author of this comment. Writable on create by Help Center managers. See Create Comment + description: The id of the author of this comment. Writable on create by Help Center managers. See Create Comment body: type: string - description: The comment made by the author. See User content + description: The comment made by the author. See User content created_at: type: string - description: The time the comment was created. Writable on create by Help Center managers. See Create Comment + description: The time the comment was created. Writable on create by Help Center managers. See Create Comment html_url: type: string description: The url at which the comment is presented in Help Center @@ -1596,7 +1572,7 @@ components: readOnly: true source_locale: type: string - description: Used only for Create Section Subscription and Create Article Subscription, where it's mandatory. Selects the locale of the content to be subscribed + description: Used only for Create Section Subscription and Create Article Subscription, where it's mandatory. Selects the locale of the content to be subscribed updated_at: type: string description: The time at which the subscription was last updated @@ -1888,83 +1864,6 @@ components: name: English updated_at: "2011-05-05T10:38:52Z" url: https://company.zendesk.com/api/v2/locales/en-US.json - LocaleAbbreviation: - type: string - description: The locale of the translation - enum: - - ar - - pt-br - - bg - - cs - - da - - nl - - en-gb - - en-us - - fa-af - - fil - - fi - - fr - - fr-ca - - de - - el - - he - - hi - - hu - - id - - it - - ja - - ko - - ms - - no - - pl - - ro - - ru - - zh-cn - - es - - sk - - sv - - th - - zh-tw - - tr - - uk - - vi - x-enum-varnames: - - ARABIC - - PORTUGUESE_BRAZIL - - BULGARIAN - - CZECH - - DANISH - - DUTCH - - ENGLISH_UNITED_KINGDOM - - ENGLISH_UNITED_STATES - - DARI_PERSIAN_AFGHANISTAN - - FILIPINO - - FINNISH - - FRENCH - - FRENCH_CANADA - - GERMAN - - GREEK - - HEBREW - - HINDI - - HUNGARIAN - - INDONESIAN - - ITALIAN - - JAPANESE - - KOREAN - - MALAY - - NORWEGIAN - - POLISH - - ROMANIAN - - RUSSIAN - - SIMPLIFIED_CHINESE - - SPANISH - - SLOVAK - - SWEDISH - - THAI - - TRADITIONAL_CHINESE - - TURKISH - - UKRAINIAN - - VIETNAMESE LocaleResponse: type: object properties: @@ -1992,13 +1891,13 @@ components: author_id: type: integer format: int64 - description: The id of the author of the comment. Writable on create by Help Center managers. See Create Post Comment + description: The id of the author of the comment. Writable on create by Help Center managers. See Create Post Comment body: type: string - description: The comment made by the author. See User content + description: The comment made by the author. See User content created_at: type: string - description: When the comment was created. Writable on create by Help Center managers. See Create Post Comment + description: When the comment was created. Writable on create by Help Center managers. See Create Post Comment html_url: type: string description: The community url of the comment @@ -2071,7 +1970,7 @@ components: author_id: type: integer format: int64 - description: The id of the author of the post. *Writable on create by Help Center managers -- see Create Post + description: The id of the author of the post. *Writable on create by Help Center managers -- see Create Post readOnly: true closed: type: boolean @@ -2090,11 +1989,11 @@ components: created_at: type: string format: date-time - description: When the post was created. Writable on create by Help Center managers -- see Create Post + description: When the post was created. Writable on create by Help Center managers -- see Create Post readOnly: true details: type: string - description: The details of the post made by the author. See User content + description: The details of the post made by the author. See User content featured: type: boolean description: Whether the post is featured @@ -2360,7 +2259,7 @@ components: brand_id: type: integer format: int64 - description: The id of the brand this ticket is associated with. See Setting up multiple brands + description: The id of the brand this ticket is associated with. See Setting up multiple brands collaborator_ids: type: array description: The ids of users currently CC'ed on the ticket @@ -2369,12 +2268,12 @@ components: format: int64 collaborators: type: array - description: POST requests only. Users to add as cc's when creating a ticket. See Setting Collaborators + description: POST requests only. Users to add as cc's when creating a ticket. See Setting Collaborators items: $ref: '#/components/schemas/Collaborator' comment: type: object - description: Write only. An object that adds a comment to the ticket. See Ticket comments. To include an attachment with the comment, see Attaching files. A ticket can contain up to 5000 comments in total, including both public and private comments. Once this limit is reached, any additional attempts to add comments results in a 422 error. The ticket can still be updated in other ways, provided that no new comments are added. + description: Write only. An object that adds a comment to the ticket. See Ticket comments. To include an attachment with the comment, see Attaching files. A ticket can contain up to 5000 comments in total, including both public and private comments. Once this limit is reached, any additional attempts to add comments results in a 422 error. The ticket can still be updated in other ways, provided that no new comments are added. writeOnly: true created_at: type: string @@ -2383,7 +2282,7 @@ components: readOnly: true custom_fields: type: array - description: Custom fields for the ticket. See Setting custom field values + description: Custom fields for the ticket. See Setting custom field values items: type: object properties: @@ -2397,39 +2296,39 @@ components: custom_status_id: type: integer format: int64 - description: The custom ticket status id of the ticket. See custom ticket statuses + description: The custom ticket status id of the ticket. See custom ticket statuses description: type: string description: | - Read-only first comment on the ticket. When creating a ticket, usecomment to set the description. See Description and first comment
+ Read-only first comment on the ticket. When creating a ticket, use comment to set the description. See Description and first comment
readOnly: true
due_at:
type: string
format: date-time
- description: If this is a ticket of type "task" it has a due date. Due date format uses ISO 8601 format
+ description: If this is a ticket of type "task" it has a due date. Due date format uses ISO 8601 format
nullable: true
email_cc_ids:
type: array
- description: The ids of agents or end users currently CC'ed on the ticket. Ignored when CCs and followers is not enabled
+ description: The ids of agents or end users currently CC'ed on the ticket. Ignored when CCs and followers is not enabled
items:
type: integer
format: int64
email_ccs:
type: object
- description: Write only. An array of objects that represents agent or end users email CCs to add or delete from the ticket. See Setting email CCs. Ignored when CCs and followers is not enabled
+ description: Write only. An array of objects that represents agent or end users email CCs to add or delete from the ticket. See Setting email CCs. Ignored when CCs and followers is not enabled
writeOnly: true
external_id:
type: string
description: An id you can use to link Zendesk Support tickets to local records
follower_ids:
type: array
- description: The ids of agents currently following the ticket. Ignored when CCs and followers is not enabled
+ description: The ids of agents currently following the ticket. Ignored when CCs and followers is not enabled
items:
type: integer
format: int64
followers:
type: object
- description: Write only. An array of objects that represents agent followers to add or delete from the ticket. See Setting followers. Ignored when CCs and followers is not enabled
+ description: Write only. An array of objects that represents agent followers to add or delete from the ticket. See Setting followers. Ignored when CCs and followers is not enabled
writeOnly: true
followup_ids:
type: array
@@ -2445,7 +2344,7 @@ components:
readOnly: true
from_messaging_channel:
type: boolean
- description: If true, the ticket's via type is a messaging channel.
+ description: If true, the ticket's via type is a messaging channel.
readOnly: true
generated_timestamp:
type: integer
@@ -2482,12 +2381,12 @@ components:
format: int64
metadata:
type: object
- description: Write only. Metadata for the audit. In the audit object, the data is specified in the custom property of the metadata object. See Setting Metadata
+ description: Write only. Metadata for the audit. In the audit object, the data is specified in the custom property of the metadata object. See Setting Metadata
writeOnly: true
organization_id:
type: integer
format: int64
- description: The organization of the requester. You can only specify the ID of an organization associated with the requester. See Organization Memberships
+ description: The organization of the requester. You can only specify the ID of an organization associated with the requester. See Organization Memberships
priority:
type: string
description: The urgency with which the ticket should be addressed
@@ -2503,13 +2402,13 @@ components:
raw_subject:
type: string
description: |
- The dynamic content placeholder, if present, or the "subject" value, if not. See Dynamic Content Items
+ The dynamic content placeholder, if present, or the "subject" value, if not. See Dynamic Content Items
recipient:
type: string
description: The original recipient e-mail address of the ticket. Notification emails for the ticket are sent from this address
requester:
type: object
- description: Write only. See Creating a ticket with a new requester
+ description: Write only. See Creating a ticket with a new requester
writeOnly: true
requester_id:
type: integer
@@ -2517,7 +2416,7 @@ components:
description: The user who requested this ticket
safe_update:
type: boolean
- description: Write only. Optional boolean. When true and an update_stamp date is included, protects against ticket update collisions and returns a message to let you know if one occurs. See Protecting against ticket update collisions. A value of false has the same effect as true. Omit the property to force the updates to not be safe
+ description: Write only. Optional boolean. When true and an update_stamp date is included, protects against ticket update collisions and returns a message to let you know if one occurs. See Protecting against ticket update collisions. A value of false has the same effect as true. Omit the property to force the updates to not be safe
writeOnly: true
satisfaction_rating:
type: object
@@ -2536,7 +2435,7 @@ components:
The state of the ticket.
If your account has activated custom ticket statuses, this is the ticket's
- status category. See custom ticket statuses
+ status category. See custom ticket statuses
enum:
- new
- open
@@ -2547,14 +2446,14 @@ components:
subject:
type: string
description: |
- The value of the subject field for this ticket. See Subject
+ The value of the subject field for this ticket. See Subject
submitter_id:
type: integer
format: int64
description: The user who submitted the ticket. The submitter always becomes the author of the first comment on the ticket
tags:
type: array
- description: The array of tags applied to this ticket. Unless otherwise specified, the set tag behavior is used, which overwrites and replaces existing tags
+ description: The array of tags applied to this ticket. Unless otherwise specified, the set tag behavior is used, which overwrites and replaces existing tags
items:
type: string
ticket_form_id:
@@ -2572,7 +2471,7 @@ components:
updated_at:
type: string
format: date-time
- description: When this record last got updated. It is updated only if the update generates a ticket event
+ description: When this record last got updated. It is updated only if the update generates a ticket event
readOnly: true
updated_stamp:
type: string
@@ -2584,7 +2483,7 @@ components:
readOnly: true
via:
type: object
- description: For more information, see the Via object reference
+ description: For more information, see the Via object reference
properties:
channel:
type: string
@@ -2598,15 +2497,15 @@ components:
via_followup_source_id:
type: integer
format: int64
- description: POST requests only. The id of a closed ticket when creating a follow-up ticket. See Creating a follow-up ticket
+ description: POST requests only. The id of a closed ticket when creating a follow-up ticket. See Creating a follow-up ticket
via_id:
type: integer
format: int64
- description: Write only. For more information, see the Via object reference
+ description: Write only. For more information, see the Via object reference
writeOnly: true
voice_comment:
type: object
- description: Write only. See Creating voicemail ticket
+ description: Write only. See Creating voicemail ticket
writeOnly: true
example:
assignee_id: 235323
@@ -2680,18 +2579,18 @@ components:
description: Enterprise only. The id of the brand this ticket is associated with
collaborators:
type: array
- description: POST requests only. Users to add as cc's when creating a ticket. See Setting Collaborators
+ description: POST requests only. Users to add as cc's when creating a ticket. See Setting Collaborators
items:
$ref: '#/components/schemas/Collaborator'
email_cc_ids:
type: array
- description: The ids of agents or end users currently CC'ed on the ticket. See CCs and followers resources in the Support Help Center
+ description: The ids of agents or end users currently CC'ed on the ticket. See CCs and followers resources in the Support Help Center
items:
type: integer
format: int64
follower_ids:
type: array
- description: The ids of agents currently following the ticket. See CCs and followers resources
+ description: The ids of agents currently following the ticket. See CCs and followers resources
items:
type: integer
format: int64
@@ -2704,7 +2603,7 @@ components:
raw_subject:
type: string
description: |
- The dynamic content placeholder, if present, or the "subject" value, if not. See Dynamic Content Items
+ The dynamic content placeholder, if present, or the "subject" value, if not. See Dynamic Content Items
recipient:
type: string
description: The original recipient e-mail address of the ticket
@@ -2721,7 +2620,7 @@ components:
via_followup_source_id:
type: integer
format: int64
- description: POST requests only. The id of a closed ticket when creating a follow-up ticket. See Creating a follow-up ticket
+ description: POST requests only. The id of a closed ticket when creating a follow-up ticket. See Creating a follow-up ticket
required:
- comment
example:
@@ -2801,13 +2700,13 @@ components:
description: The relative position of the ticket field on a ticket. Note that for accounts with ticket forms, positions are controlled by the different forms
raw_description:
type: string
- description: The dynamic content placeholder if present, or the description value if not. See Dynamic Content
+ description: The dynamic content placeholder if present, or the description value if not. See Dynamic Content
raw_title:
type: string
- description: The dynamic content placeholder if present, or the title value if not. See Dynamic Content
+ description: The dynamic content placeholder if present, or the title value if not. See Dynamic Content
raw_title_in_portal:
type: string
- description: The dynamic content placeholder if present, or the "title_in_portal" value if not. See Dynamic Content
+ description: The dynamic content placeholder if present, or the "title_in_portal" value if not. See Dynamic Content
regexp_for_validation:
type: string
description: For "regexp" fields only. The validation pattern for a field value to be deemed valid
@@ -2849,7 +2748,7 @@ components:
description: The title of the ticket field for end users in Help Center
type:
type: string
- description: System or custom field type. Editable for custom field types and only on creation. See Create Ticket Field
+ description: System or custom field type. Editable for custom field types and only on creation. See Create Ticket Field
updated_at:
type: string
format: date-time
@@ -2889,7 +2788,7 @@ components:
properties:
additional_collaborators:
type: array
- description: An array of numeric IDs, emails, or objects containing name and email properties. See Setting Collaborators. An email notification is sent to them when the ticket is updated
+ description: An array of numeric IDs, emails, or objects containing name and email properties. See Setting Collaborators. An email notification is sent to them when the ticket is updated
items:
$ref: '#/components/schemas/Collaborator'
assignee_email:
@@ -2913,20 +2812,20 @@ components:
$ref: '#/components/schemas/TicketComment'
custom_fields:
type: array
- description: Custom fields for the ticket. See Setting custom field values
+ description: Custom fields for the ticket. See Setting custom field values
items:
$ref: '#/components/schemas/CustomField'
custom_status_id:
type: integer
- description: The custom ticket status id of the ticket. See custom ticket statuses
+ description: The custom ticket status id of the ticket. See custom ticket statuses
due_at:
type: string
format: date-time
- description: If this is a ticket of type "task" it has a due date. Due date format uses ISO 8601 format.
+ description: If this is a ticket of type "task" it has a due date. Due date format uses ISO 8601 format.
nullable: true
email_ccs:
type: array
- description: An array of objects that represent agent or end users email CCs to add or delete from the ticket. See Setting email CCs
+ description: An array of objects that represent agent or end users email CCs to add or delete from the ticket. See Setting email CCs
items:
$ref: '#/components/schemas/EmailCC'
external_id:
@@ -2934,7 +2833,7 @@ components:
description: An id you can use to link Zendesk Support tickets to local records
followers:
type: array
- description: An array of objects that represent agent followers to add or delete from the ticket. See Setting followers
+ description: An array of objects that represent agent followers to add or delete from the ticket. See Setting followers
items:
$ref: '#/components/schemas/Follower'
group_id:
@@ -2942,7 +2841,7 @@ components:
description: The group this ticket is assigned to
organization_id:
type: integer
- description: The organization of the requester. You can only specify the ID of an organization associated with the requester. See Organization Memberships
+ description: The organization of the requester. You can only specify the ID of an organization associated with the requester. See Organization Memberships
priority:
type: string
description: The urgency with which the ticket should be addressed.
@@ -2971,7 +2870,7 @@ components:
The state of the ticket.
If your account has activated custom ticket statuses, this is the ticket's
- status category. See custom ticket statuses.
+ status category. See custom ticket statuses.
enum:
- new
- open
@@ -3018,7 +2917,7 @@ components:
$ref: '#/components/schemas/TicketUpdateInput'
TicketAuditVia:
type: object
- description: Describes how the object was created. See the Via object reference
+ description: Describes how the object was created. See the Via object reference
properties:
channel:
type: string
@@ -3034,20 +2933,20 @@ components:
properties:
attachments:
type: array
- description: Attachments, if any. See Attachment
+ description: Attachments, if any. See Attachment
items:
$ref: '#/components/schemas/Attachment'
readOnly: true
audit_id:
type: integer
- description: The id of the ticket audit record. See Show Audit
+ description: The id of the ticket audit record. See Show Audit
readOnly: true
author_id:
type: integer
- description: The id of the comment author. See Author id
+ description: The id of the comment author. See Author id
body:
type: string
- description: The comment string. See Bodies
+ description: The comment string. See Bodies
created_at:
type: string
format: date-time
@@ -3055,30 +2954,30 @@ components:
readOnly: true
html_body:
type: string
- description: The comment formatted as HTML. See Bodies
+ description: The comment formatted as HTML. See Bodies
id:
type: integer
description: Automatically assigned when the comment is created
readOnly: true
metadata:
type: object
- description: System information (web client, IP address, etc.) and comment flags, if any. See Comment flags
+ description: System information (web client, IP address, etc.) and comment flags, if any. See Comment flags
additionalProperties: true
readOnly: true
plain_body:
type: string
- description: The comment presented as plain text. See Bodies
+ description: The comment presented as plain text. See Bodies
readOnly: true
public:
type: boolean
description: true if a public comment; false if an internal note. The initial value set on ticket creation persists for any additional comment unless you change it
type:
type: string
- description: "`Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See Adding voice comments to tickets"
+ description: '`Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See Adding voice comments to tickets'
readOnly: true
uploads:
type: array
- description: List of tokens received from uploading files for comment attachments. The files are attached by creating or updating tickets with the tokens. See Attaching files in Tickets
+ description: List of tokens received from uploading files for comment attachments. The files are attached by creating or updating tickets with the tokens. See Attaching files in Tickets
items:
type: string
via:
@@ -3231,7 +3130,8 @@ components:
description: Automatically assigned when a translation is created
readOnly: true
locale:
- $ref: '#/components/schemas/LocaleAbbreviation'
+ type: string
+ description: The locale of the translation
outdated:
type: boolean
description: True if the translation is outdated; false otherwise. False by default
@@ -3261,6 +3161,12 @@ components:
type: string
description: The API url of the translation
readOnly: true
+ example:
+ id: 3243452
+ locale: en
+ source_id: 768934
+ source_type: Article
+ title: Hello translation
required:
- locale
- title
@@ -3451,7 +3357,7 @@ components:
Via:
type: object
description: |
- An object explaining how the ticket was created. See the Via object reference
+ An object explaining how the ticket was created. See the Via object reference
properties:
channel:
type: string
@@ -3678,7 +3584,9 @@ components:
description: The locale the item is displayed in. (must be lowercase, even if returned from zendesk as mixed case)
required: true
schema:
- $ref: '#/components/schemas/LocaleAbbreviation'
+ type: string
+ example: en-us
+ example: en-us
PostCommentId:
name: post_comment_id
in: path
diff --git a/src/test/groovy/lol/pbu/z4j/client/ViewClientSpec.groovy b/src/test/groovy/lol/pbu/z4j/client/ViewClientSpec.groovy
new file mode 100644
index 0000000..5e8f0e1
--- /dev/null
+++ b/src/test/groovy/lol/pbu/z4j/client/ViewClientSpec.groovy
@@ -0,0 +1,4 @@
+package lol.pbu.z4j.client
+
+class ViewClientSpec {
+}
diff --git a/src/test/resources/logback.xml b/src/test/resources/logback.xml
index ddda692..06b75f5 100644
--- a/src/test/resources/logback.xml
+++ b/src/test/resources/logback.xml
@@ -1,4 +1,5 @@
You must specify a category name and locale. The locale can be omitted if it's specified in the URL. Optionally, you can specify multiple translations for the category. The specified locales must be enabled for the current Help Center.
You must specify a category name and locale. + * Though the Zendesk Api states you can create multiple translations at this time, in practice this doesn't work.
+ *You must specify a category name and locale. The locale can be omitted if it's specified in the URL. Optionally, you can specify multiple translations for the category. The specified locales must be enabled for the current Help Center.
You must specify a category name and locale. + * Though the Zendesk Api states you can create multiple translations at this time, in practice this doesn't work.
+ *WARNING: Every section and all articles in the category will also be deleted.
WARNING: Every section and all articles in the category will also be deleted.
+ *WARNING: Every section and all articles in the category will also be deleted.
WARNING: Every section and all articles in the category will also be deleted.
+ *No content
(status code 204) */ @Delete("/api/v2/help_center/categories/{category_id}") - MonoThe response will list only the categories that the agent, end user, or anonymous user can view in the help center.
Translations are embedded within the category because they're not shared between resources.
+ *The response will list only the categories that the agent, end user, or anonymous user can view in the help center.
+ *Translations are embedded within the category because they're not shared between resources.
+ *The sort_by parameter can have one of the following values:
| value | description |
|---|---|
position | order set manually using the Arrange Content page. Default order |
created_at | order by creation time |
updated_at | order by update time |
| value | description |
|---|---|
asc | ascending order |
desc | descending order |
The response will list only the categories that the agent can view in the help center.
+ *The response will list only the categories that the agent can view in the help center.
* - * @param sortBySorts the results by one of the accepted values
(optional) - * @param sortOrderSelects the order of the results.
(optional) - * @returndescription
(status code 200) + * @param sortBy {@link SortCategoryBy} (optional) + * @param sortOrder {@link SortOrder} (optional) + * @return status code 200 */ @Get("/api/v2/help_center/categories") Mono<@Valid CategoriesResponse> listCategoriesNoLocale( - @QueryValue("sort_by") @Nullable ListCategoriesSortByParameter sortBy, - @QueryValue("sort_order") @Nullable ListArticlesSortOrderParameter sortOrder + @QueryValue("sort_by") @Nullable SortCategoryBy sortBy, + @QueryValue("sort_order") @Nullable SortOrder sortOrder ); /** - * {@summary Show Category by Locale} - *Note: {/locale} is an optional parameter for admins and agents. End users and anonymous users must provide the parameter.
Translations are embedded within the category because they're not shared between resources.
- * + *Translations are embedded within the category because they're not shared between resources.
+ *description
(status code 200) + * @return status code 200 */ @Get("/api/v2/help_center/{locale}/categories/{category_id}") Mono<@Valid CategoryResponse> showCategory( @@ -111,36 +152,36 @@ Monodescription
(status code 200) + * @return status code 200 */ @Get("/api/v2/help_center/categories/{category_id}") - Mono<@Valid CategoryResponse> showCategoryNoLocale( - @PathVariable("category_id") @NotNull Long categoryId - ); + Mono<@Valid CategoryResponse> showCategoryNoLocale(@PathVariable("category_id") @NotNull Long categoryId); /** - * {@summary Update Category by Locale} - *These endpoints only update category-level metadata such as the sorting position. They don't update category translations.
This only updates category-level metadata such as the sorting position. This doesn't update category translations.
+ *These endpoints only update category-level metadata such as the sorting position. They don't update category translations.
This only updates category-level metadata such as the sorting position. This doesn't update category translations.
+ *The endpoint updates the category source_locale property
The endpoint updates the category source_locale property
OK Response
(status code 200) */ @Put("/api/v2/help_center/categories/{category_id}/source_locale") - Mono<@Valid CategoryResponse> updateCategorySourceLocale( - @PathVariable("category_id") @NotNull Long categoryId - ); -} \ No newline at end of file + Mono<@Valid CategoryResponse> updateCategorySourceLocale(@PathVariable("category_id") @NotNull Long categoryId); +} diff --git a/src/main/java/lol/pbu/z4j/client/LocaleClient.java b/src/main/java/lol/pbu/z4j/client/LocaleClient.java index 8cfb8b2..ff5942e 100644 --- a/src/main/java/lol/pbu/z4j/client/LocaleClient.java +++ b/src/main/java/lol/pbu/z4j/client/LocaleClient.java @@ -1,3 +1,18 @@ +/* + * Copyright 2026 Peanut Butter Unicorn, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package lol.pbu.z4j.client; import io.micronaut.http.annotation.Get; @@ -7,16 +22,25 @@ import lol.pbu.z4j.model.LocalesResponse; import reactor.core.publisher.Mono; +/** + *Exports a set of results. See Query syntax for the syntax of the {@code query} parameter.
Use this endpoint for search queries that will return more than 1000 results. The result set is ordered only by the {@code 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 {@code 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 {@code 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 {@code 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.
+ *Exports a set of results. See Query syntax for the syntax of the {@code query} parameter.
Use this endpoint for search queries that will return more than 1000 results. The result set is ordered only by the {@code 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 {@code filter[type]} parameter. Searches with type in the query string will result in an error.
Allowed for AgentsSee Pagination.
Returns a maximum of 1000 records per page. The number of results shown in a page is determined by the {@code 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 {@code 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.
* * @param query Returns the search results. See Query syntax for details on the {@code query} parameter. For details on the query syntax, see the Zendesk Support search reference. (required) * @param pageSize The number of results shown in a page. (required) @@ -52,8 +76,8 @@ public interface SearchClient { ); /** - * {@summary List Search Results} - *Returns the search results. See Query syntax for details on the {@code query} parameter.
Use the ampersand character (&) to append the {@code sort_by} or {@code sort_order} parameters to the URL.
For examples, see Searching with Zendesk API.
This endpoint has its own rate limit. The rate limit counts towards the global API rate limit. See Limits.
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 Using cursor pagination for more information.
+ *Returns the search results. See Query syntax for details on the {@code query} parameter.
Use the ampersand character (&) to append the {@code sort_by} or {@code sort_order} parameters to the URL.
For examples, see Searching with Zendesk API.
This endpoint has its own rate limit. The rate limit counts towards the global API rate limit. See Limits.
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 Using cursor pagination for more information.
* * @param query Returns the search results. See Query syntax for details on the {@code query} parameter. For details on the query syntax, see the Zendesk Support search reference. (required) * @param sortBy One of {@code updated_at}, {@code created_at}, {@code priority}, {@code status}, or {@code ticket_type}. Defaults to sorting by relevance (optional) @@ -65,8 +89,8 @@ public interface SearchClient { @Get("/api/v2/search") Mono<@Valid SearchResponse> list( @QueryValue("query") @NotNull String query, - @QueryValue("sort_by") @Nullable SearchSortBy sortBy, - @QueryValue("sort_order") @Nullable SearchSortOrder sortOrder, + @QueryValue("sort_by") @Nullable SortBy sortBy, + @QueryValue("sort_order") @Nullable SortOrder sortOrder, @QueryValue("include") @Nullable String include ); -} \ No newline at end of file +} diff --git a/src/main/java/lol/pbu/z4j/client/TicketClient.java b/src/main/java/lol/pbu/z4j/client/TicketClient.java index ed7435a..6927ee5 100644 --- a/src/main/java/lol/pbu/z4j/client/TicketClient.java +++ b/src/main/java/lol/pbu/z4j/client/TicketClient.java @@ -1,3 +1,18 @@ +/* + * Copyright 2026 Peanut Butter Unicorn, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package lol.pbu.z4j.client; import io.micronaut.core.annotation.Nullable; @@ -10,32 +25,55 @@ import lol.pbu.z4j.model.*; import reactor.core.publisher.Mono; +/** + *Creates any of the following custom field types:
| Custom field type | Description |
|---|---|
| text | Default custom field type when type is not specified |
| textarea | For multi-line text |
| checkbox | To capture a boolean value. Allowed values are true or false. Optionally, you can specify a tag to be added to the ticket when the value is true. |
| date | Example: 2021-04-16 |
| integer | String composed of numbers. May contain an optional decimal point |
| decimal | For numbers containing decimals |
| regexp | Matches the Regex pattern found in the custom field settings |
| partialcreditcard | A credit card number. Only the last 4 digits are retained |
| multiselect | Enables users to choose multiple options from a dropdown menu. It contains one or more tag values belonging to the field's options. |
| tagger | Single-select dropdown menu. It contains one or more tag values belonging to the field's options. Example: ( {"id": 21938362, "value": ["hd_3000", "hd_5555"]}) |
| lookup | A field to create a relationship (see lookup relationships) to another object such as a user, ticket, or organization |
Note: Tags can't be re-used across custom ticket fields. For example, if you configure a tag for a checkbox field, you can't use that tag value for a dropdown (tagger) field option. The use of tags isn't validated and can prevent editing in the future.
See About custom field types in the Zendesk Help Center.
We recommend the following best practices for ticket fields limits. Creating more than these amounts can affect performance.
See About custom field types in the Zendesk Help + * Center.
We recommend the following best practices for ticket fields limits. + * Creating more than these amounts can affect performance.
+ *Returns a list of all system and custom ticket fields in your account.
For end users, only the ticket fields with visible_in_portal set to true are returned.
Consider caching this resource to use with the{@link TicketClient}.
Returns a number of ticket properties though not the ticket comments. To get the comments, use List Comments
Lists the topics that use the specified user segment.
This endpoint supports pagination as described in Pagination.
See Pagination.
+ *Lists the topics that use the specified user segment.
+ * + * Pagination is not currently supported. Open an issue with us to let us know you'd like this supported! + *Some user segments can only be applied to sections and topics on certain Guide plans. For instance, user segments with a user_type of "staff" cannot be applied to sections and topics on accounts on the Guide Lite plan or the Suite Team plan.
(Allowed for Help Center managers)
Some user segments can only be applied to sections and topics on certain Guide plans.
+ * For instance, user segments with a user_type of "staff" cannot be applied to sections and topics on accounts on the Guide Lite plan or the Suite Team plan.
+ *
+ *
HTML body of the article. Unsafe tags and attributes may be removed before display. For a list of safe tags and attributes, see Allowing unsafe HTML in Help Center articles in Zendesk help
+ */ + @Nullable + @JsonProperty(JSON_PROPERTY_BODY) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String body; + + /** + * True if comments are disabled; false otherwise + */ + @Nullable + @JsonProperty(JSON_PROPERTY_COMMENTS_DISABLED) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Boolean commentsDisabled; + + /** + * The list of content tags attached to the article + */ + @Nullable + @JsonProperty(JSON_PROPERTY_CONTENT_TAG_IDS) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private List<@NotNull String> contentTagIds; + + /** + * The time the article was created + */ + @Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String createdAt; + + /** + * True if the translation for the current locale is a draft; false otherwise. false by default. Can be set when creating but not when updating. For updating, see Translations + */ + @Nullable + @JsonProperty(JSON_PROPERTY_DRAFT) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Boolean draft; + + /** + * The time the article was last edited in its displayed locale + */ + @Nullable + @JsonProperty(JSON_PROPERTY_EDITED_AT) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String editedAt; + + /** + * The url of the article in Help Center + */ + @Nullable + @JsonProperty(JSON_PROPERTY_HTML_URL) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String htmlUrl; + + /** + * Automatically assigned when the article is created + */ + @Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Long id; + + /** + * An array of label names associated with this article. By default no label names are used. Only available on certain plans + */ + @Nullable + @JsonProperty(JSON_PROPERTY_LABEL_NAMES) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private List<@NotNull String> labelNames; + + /** + * Deprecated. Always false because the source translation is always the most up-to-date translation + */ + @Nullable + @JsonProperty(JSON_PROPERTY_OUTDATED) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Boolean outdated; + + /** + * Locales in which the article was marked as outdated + */ + @Nullable + @JsonProperty(JSON_PROPERTY_OUTDATED_LOCALES) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private List<@NotNull String> outdatedLocales; + + /** + * The position of this article in the article list. 0 by default + */ + @Nullable + @JsonProperty(JSON_PROPERTY_POSITION) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Long position; + + /** + * True if this article is promoted; false otherwise. false by default + */ + @Nullable + @JsonProperty(JSON_PROPERTY_PROMOTED) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Boolean promoted; + + /** + * The id of the section to which this article belongs + */ + @Nullable + @JsonProperty(JSON_PROPERTY_SECTION_ID) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Long sectionId; + + /** + * The source (default) locale of the article + */ + @Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_LOCALE) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String sourceLocale; + + /** + * The time the article was last updated + */ + @Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String updatedAt; + + /** + * The API url of the article + */ + @Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String url; + + /** + * The id of the user segment which defines who can see this article. Set to null to make it accessible to everyone. Either user_segment_id or user_segment_ids must be specified + */ + @Nullable + @JsonProperty(JSON_PROPERTY_USER_SEGMENT_ID) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Long userSegmentId; + + /** + * List of user segment ids which define who can view this article. Set to an empty list to make it accessible to everyone. For Enterprise plans only this may contain more than one user_segment_id. Either user_segment_id or user_segment_ids must be specified + */ + @Nullable + @JsonProperty(JSON_PROPERTY_USER_SEGMENT_IDS) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private List<@NotNull String> userSegmentIds; + + /** + * The total number of upvotes and downvotes + */ + @Nullable + @JsonProperty(JSON_PROPERTY_VOTE_COUNT) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Long voteCount; + + /** + * The sum of upvotes (+1) and downvotes (-1), which may be positive or negative + */ + @Nullable + @JsonProperty(JSON_PROPERTY_VOTE_SUM) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Long voteSum; + + public Article(String locale, Long permissionGroupId, String title) { + this.locale = locale; + this.permissionGroupId = permissionGroupId; + this.title = title; + } + + /** + * Add an item to the contentTagIds property in a chainable fashion. + * + * @return The same instance of Article for chaining. + */ + public Article addContentTagIdsItem(String contentTagIdsItem) { + if (contentTagIds == null) { + contentTagIds = new ArrayList<>(); + } + contentTagIds.add(contentTagIdsItem); + return this; + } + + /** + * Add an item to the labelNames property in a chainable fashion. + * + * @return The same instance of Article for chaining. + */ + public Article addLabelNamesItem(String labelNamesItem) { + if (labelNames == null) { + labelNames = new ArrayList<>(); + } + labelNames.add(labelNamesItem); + return this; + } + + /** + * Add an item to the userSegmentIds property in a chainable fashion. + * + * @return The same instance of Article for chaining. + */ + public Article addUserSegmentIdsItem(String userSegmentIdsItem) { + if (userSegmentIds == null) { + userSegmentIds = new ArrayList<>(); + } + userSegmentIds.add(userSegmentIdsItem); + return this; + } + +} diff --git a/src/main/java/lol/pbu/z4j/model/ArticleAttachment.java b/src/main/java/lol/pbu/z4j/model/ArticleAttachment.java new file mode 100644 index 0000000..15fef12 --- /dev/null +++ b/src/main/java/lol/pbu/z4j/model/ArticleAttachment.java @@ -0,0 +1,174 @@ +/* + * Copyright 2026 Peanut Butter Unicorn, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package lol.pbu.z4j.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.micronaut.core.annotation.Nullable; +import io.micronaut.serde.annotation.Serdeable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; + +/** + * ArticleAttachment + * + * @author Jonathan-Zollinger + * @since 0.1.1 + */ +@Accessors(chain = true) +@NoArgsConstructor +@AllArgsConstructor +@Data +@JsonPropertyOrder({ + ArticleAttachment.JSON_PROPERTY_ARTICLE_ID, + ArticleAttachment.JSON_PROPERTY_CONTENT_TYPE, + ArticleAttachment.JSON_PROPERTY_CONTENT_URL, + ArticleAttachment.JSON_PROPERTY_CREATED_AT, + ArticleAttachment.JSON_PROPERTY_FILE, + ArticleAttachment.JSON_PROPERTY_FILE_NAME, + ArticleAttachment.JSON_PROPERTY_GUIDE_MEDIA_ID, + ArticleAttachment.JSON_PROPERTY_ID, + ArticleAttachment.JSON_PROPERTY_INLINE, + ArticleAttachment.JSON_PROPERTY_LOCALE, + ArticleAttachment.JSON_PROPERTY_SIZE, + ArticleAttachment.JSON_PROPERTY_UPDATED_AT, + ArticleAttachment.JSON_PROPERTY_URL, +}) +@Serdeable +public class ArticleAttachment { + + public static final String JSON_PROPERTY_ARTICLE_ID = "article_id"; + public static final String JSON_PROPERTY_CONTENT_TYPE = "content_type"; + public static final String JSON_PROPERTY_CONTENT_URL = "content_url"; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + public static final String JSON_PROPERTY_FILE = "file"; + public static final String JSON_PROPERTY_FILE_NAME = "file_name"; + public static final String JSON_PROPERTY_GUIDE_MEDIA_ID = "guide_media_id"; + public static final String JSON_PROPERTY_ID = "id"; + public static final String JSON_PROPERTY_INLINE = "inline"; + public static final String JSON_PROPERTY_LOCALE = "locale"; + public static final String JSON_PROPERTY_SIZE = "size"; + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + public static final String JSON_PROPERTY_URL = "url"; + + /** + * The associated article, if present + */ + @Nullable + @JsonProperty(JSON_PROPERTY_ARTICLE_ID) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Long articleId; + + /** + * The file type. Example: image/png + */ + @Nullable + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String contentType; + + /** + * URL where the attachment file can be downloaded + */ + @Nullable + @JsonProperty(JSON_PROPERTY_CONTENT_URL) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String contentUrl; + + /** + * The time the article attachment was created + */ + @Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String createdAt; + + /** + * File to upload, applicable only during creation. + */ + @Nullable + @JsonProperty(JSON_PROPERTY_FILE) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Object file; + + /** + * The file name + */ + @Nullable + @JsonProperty(JSON_PROPERTY_FILE_NAME) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String fileName; + + /** + * Unique identifier for the guide-media to associate with this attachment, applicable only during creation. + */ + @Nullable + @JsonProperty(JSON_PROPERTY_GUIDE_MEDIA_ID) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String guideMediaId; + + /** + * Assigned ID when the article attachment is created + */ + @Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Long id; + + /** + * The attached file is shown in the admin interface for inline attachments. Its URL can be referenced in the article's HTML body. Inline attachments are image files directly embedded in the article body. If false, the attachment is listed in the list of attachments. The default value is false + */ + @Nullable + @JsonProperty(JSON_PROPERTY_INLINE) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Boolean inline; + + /** + * The locale of translation that the attachment will be attached to and can only be set on inline attachments + */ + @Nullable + @JsonProperty(JSON_PROPERTY_LOCALE) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String locale; + + /** + * The attachment file size in bytes + */ + @Nullable + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Long size; + + /** + * The time the article attachment was last updated + */ + @Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String updatedAt; + + /** + * The URL of the article attachment + */ + @Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String url; + +} diff --git a/src/main/java/lol/pbu/z4j/model/ArticleAttachmentResponse.java b/src/main/java/lol/pbu/z4j/model/ArticleAttachmentResponse.java index 85fc3ad..393cc1e 100644 --- a/src/main/java/lol/pbu/z4j/model/ArticleAttachmentResponse.java +++ b/src/main/java/lol/pbu/z4j/model/ArticleAttachmentResponse.java @@ -1,3 +1,18 @@ +/* + * Copyright 2026 Peanut Butter Unicorn, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package lol.pbu.z4j.model; import com.fasterxml.jackson.annotation.JsonInclude; @@ -5,7 +20,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.micronaut.core.annotation.Nullable; import io.micronaut.serde.annotation.Serdeable; -import jakarta.annotation.Generated; import jakarta.validation.Valid; import lombok.AllArgsConstructor; import lombok.Data; @@ -14,6 +28,8 @@ /** * ArticleAttachmentResponse + * @author Jonathan-Zollinger + * @since 0.1.1 */ @Accessors(chain = true) @NoArgsConstructor @@ -21,7 +37,6 @@ @Data @JsonPropertyOrder(ArticleAttachmentResponse.JSON_PROPERTY_ARTICLE_ATTACHMENT) @Serdeable -@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen") public class ArticleAttachmentResponse { public static final String JSON_PROPERTY_ARTICLE_ATTACHMENT = "article_attachment"; @@ -32,4 +47,4 @@ public class ArticleAttachmentResponse { @JsonInclude(JsonInclude.Include.USE_DEFAULTS) private ArticleAttachment articleAttachment; -} \ No newline at end of file +} diff --git a/src/main/java/lol/pbu/z4j/model/ArticleAttachmentsResponse.java b/src/main/java/lol/pbu/z4j/model/ArticleAttachmentsResponse.java index 5ef0579..446816e 100644 --- a/src/main/java/lol/pbu/z4j/model/ArticleAttachmentsResponse.java +++ b/src/main/java/lol/pbu/z4j/model/ArticleAttachmentsResponse.java @@ -1,3 +1,18 @@ +/* + * Copyright 2026 Peanut Butter Unicorn, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package lol.pbu.z4j.model; import com.fasterxml.jackson.annotation.JsonInclude; @@ -5,7 +20,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.micronaut.core.annotation.Nullable; import io.micronaut.serde.annotation.Serdeable; -import jakarta.annotation.Generated; import jakarta.validation.Valid; import lombok.AllArgsConstructor; import lombok.Data; @@ -17,6 +31,8 @@ /** * ArticleAttachmentsResponse + * @author Jonathan-Zollinger + * @since 0.1.1 */ @Accessors(chain = true) @NoArgsConstructor @@ -24,7 +40,6 @@ @Data @JsonPropertyOrder(ArticleAttachmentsResponse.JSON_PROPERTY_ARTICLE_ATTACHMENTS) @Serdeable -@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen") public class ArticleAttachmentsResponse { public static final String JSON_PROPERTY_ARTICLE_ATTACHMENTS = "article_attachments"; @@ -47,4 +62,4 @@ public ArticleAttachmentsResponse addArticleAttachmentsItem(ArticleAttachment ar return this; } -} \ No newline at end of file +} diff --git a/src/main/java/lol/pbu/z4j/model/ArticleRequest.java b/src/main/java/lol/pbu/z4j/model/ArticleRequest.java index edff53c..2993866 100644 --- a/src/main/java/lol/pbu/z4j/model/ArticleRequest.java +++ b/src/main/java/lol/pbu/z4j/model/ArticleRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2026 Peanut Butter Unicorn, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package lol.pbu.z4j.model; import com.fasterxml.jackson.annotation.JsonInclude; @@ -5,7 +20,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.micronaut.core.annotation.Nullable; import io.micronaut.serde.annotation.Serdeable; -import jakarta.annotation.Generated; import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; import lombok.EqualsAndHashCode; @@ -16,6 +30,8 @@ /** * ArticleRequest + * @author Jonathan-Zollinger + * @since 0.1.1 */ @Accessors(chain = true) @EqualsAndHashCode @@ -27,7 +43,6 @@ ArticleRequest.JSON_PROPERTY_NOTIFY_SUBSCRIBERS, }) @Serdeable -@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen") public class ArticleRequest { public static final String JSON_PROPERTY_ARTICLE = "article"; @@ -47,4 +62,4 @@ public ArticleRequest(ArticleRequestArticle article) { this.article = article; } -} \ No newline at end of file +} diff --git a/src/main/java/lol/pbu/z4j/model/ArticleRequestArticle.java b/src/main/java/lol/pbu/z4j/model/ArticleRequestArticle.java index 27f7127..bd914c2 100644 --- a/src/main/java/lol/pbu/z4j/model/ArticleRequestArticle.java +++ b/src/main/java/lol/pbu/z4j/model/ArticleRequestArticle.java @@ -1,3 +1,18 @@ +/* + * Copyright 2026 Peanut Butter Unicorn, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package lol.pbu.z4j.model; import com.fasterxml.jackson.annotation.JsonInclude; @@ -5,7 +20,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.micronaut.core.annotation.Nullable; import io.micronaut.serde.annotation.Serdeable; -import jakarta.annotation.Generated; import jakarta.validation.constraints.NotNull; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -15,6 +29,8 @@ /** * ArticleRequestArticle + * @author Jonathan-Zollinger + * @since 0.1.1 */ @Accessors(chain = true) @EqualsAndHashCode @@ -29,7 +45,6 @@ ArticleRequestArticle.JSON_PROPERTY_BODY, }) @Serdeable -@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen") public class ArticleRequestArticle { public static final String JSON_PROPERTY_LOCALE = "locale"; @@ -66,4 +81,4 @@ public ArticleRequestArticle(String locale, Long permissionGroupId, String title this.userSegmentId = userSegmentId; } -} \ No newline at end of file +} diff --git a/src/main/java/lol/pbu/z4j/model/ArticleResponse.java b/src/main/java/lol/pbu/z4j/model/ArticleResponse.java index 6dd9812..3ec0a59 100644 --- a/src/main/java/lol/pbu/z4j/model/ArticleResponse.java +++ b/src/main/java/lol/pbu/z4j/model/ArticleResponse.java @@ -1,3 +1,18 @@ +/* + * Copyright 2026 Peanut Butter Unicorn, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package lol.pbu.z4j.model; import com.fasterxml.jackson.annotation.JsonInclude; @@ -5,7 +20,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.micronaut.core.annotation.Nullable; import io.micronaut.serde.annotation.Serdeable; -import jakarta.annotation.Generated; import jakarta.validation.Valid; import lombok.AllArgsConstructor; import lombok.Data; @@ -14,6 +28,8 @@ /** * ArticleResponse + * @author Jonathan-Zollinger + * @since 0.1.1 */ @Accessors(chain = true) @NoArgsConstructor @@ -21,7 +37,6 @@ @Data @JsonPropertyOrder(ArticleResponse.JSON_PROPERTY_ARTICLE) @Serdeable -@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen") public class ArticleResponse { public static final String JSON_PROPERTY_ARTICLE = "article"; @@ -32,4 +47,4 @@ public class ArticleResponse { @JsonInclude(JsonInclude.Include.USE_DEFAULTS) private Article article; -} \ No newline at end of file +} diff --git a/src/main/java/lol/pbu/z4j/model/ArticleSearchResponse.java b/src/main/java/lol/pbu/z4j/model/ArticleSearchResponse.java index 7aa7b98..9d19941 100644 --- a/src/main/java/lol/pbu/z4j/model/ArticleSearchResponse.java +++ b/src/main/java/lol/pbu/z4j/model/ArticleSearchResponse.java @@ -1,3 +1,18 @@ +/* + * Copyright 2026 Peanut Butter Unicorn, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package lol.pbu.z4j.model; import com.fasterxml.jackson.annotation.JsonInclude; @@ -5,7 +20,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.micronaut.core.annotation.Nullable; import io.micronaut.serde.annotation.Serdeable; -import jakarta.annotation.Generated; import jakarta.validation.Valid; import lombok.AllArgsConstructor; import lombok.Data; @@ -17,6 +31,8 @@ /** * ArticleSearchResponse + * @author Jonathan-Zollinger + * @since 0.1.1 */ @Accessors(chain = true) @NoArgsConstructor @@ -28,7 +44,6 @@ ArticleSearchResponse.JSON_PROPERTY_SNIPPET, }) @Serdeable -@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen") public class ArticleSearchResponse { public static final String JSON_PROPERTY_RESULT_TYPE = "result_type"; @@ -69,4 +84,4 @@ public ArticleSearchResponse addResultsItem(Article resultsItem) { return this; } -} \ No newline at end of file +} diff --git a/src/main/java/lol/pbu/z4j/model/ArticlesResponse.java b/src/main/java/lol/pbu/z4j/model/ArticlesResponse.java index e7e0f38..3ba5353 100644 --- a/src/main/java/lol/pbu/z4j/model/ArticlesResponse.java +++ b/src/main/java/lol/pbu/z4j/model/ArticlesResponse.java @@ -1,3 +1,18 @@ +/* + * Copyright 2026 Peanut Butter Unicorn, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package lol.pbu.z4j.model; import com.fasterxml.jackson.annotation.JsonInclude; @@ -5,7 +20,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.micronaut.core.annotation.Nullable; import io.micronaut.serde.annotation.Serdeable; -import jakarta.annotation.Generated; import jakarta.validation.Valid; import lombok.AllArgsConstructor; import lombok.Data; @@ -17,6 +31,8 @@ /** * ArticlesResponse + * @author Jonathan-Zollinger + * @since 0.1.1 */ @Accessors(chain = true) @NoArgsConstructor @@ -24,7 +40,6 @@ @Data @JsonPropertyOrder(ArticlesResponse.JSON_PROPERTY_ARTICLES) @Serdeable -@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen") public class ArticlesResponse { public static final String JSON_PROPERTY_ARTICLES = "articles"; @@ -47,4 +62,4 @@ public ArticlesResponse addArticlesItem(Article articlesItem) { return this; } -} \ No newline at end of file +} diff --git a/src/main/java/lol/pbu/z4j/model/Attachment.java b/src/main/java/lol/pbu/z4j/model/Attachment.java new file mode 100644 index 0000000..d3b3a3a --- /dev/null +++ b/src/main/java/lol/pbu/z4j/model/Attachment.java @@ -0,0 +1,184 @@ +/* + * Copyright 2026 Peanut Butter Unicorn, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package lol.pbu.z4j.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.micronaut.core.annotation.Nullable; +import io.micronaut.serde.annotation.Serdeable; +import jakarta.validation.Valid; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; + +import java.util.List; + +/** + * A file represented as an Attachment object + * + * @author Jonathan-Zollinger + * @since 0.1.1 + */ +@Accessors(chain = true) +@NoArgsConstructor +@AllArgsConstructor +@Data +@JsonPropertyOrder({ + Attachment.JSON_PROPERTY_CONTENT_TYPE, + Attachment.JSON_PROPERTY_CONTENT_URL, + Attachment.JSON_PROPERTY_DELETED, + Attachment.JSON_PROPERTY_FILE_NAME, + Attachment.JSON_PROPERTY_HEIGHT, + Attachment.JSON_PROPERTY_ID, + Attachment.JSON_PROPERTY_INLINE, + Attachment.JSON_PROPERTY_MALWARE_ACCESS_OVERRIDE, + Attachment.JSON_PROPERTY_MALWARE_SCAN_RESULT, + Attachment.JSON_PROPERTY_MAPPED_CONTENT_URL, + Attachment.JSON_PROPERTY_SIZE, + Attachment.JSON_PROPERTY_URL, + Attachment.JSON_PROPERTY_WIDTH, + Attachment.JSON_PROPERTY_THUMBNAILS, +}) +@Serdeable +public class Attachment { + + public static final String JSON_PROPERTY_CONTENT_TYPE = "content_type"; + public static final String JSON_PROPERTY_CONTENT_URL = "content_url"; + public static final String JSON_PROPERTY_DELETED = "deleted"; + public static final String JSON_PROPERTY_FILE_NAME = "file_name"; + public static final String JSON_PROPERTY_HEIGHT = "height"; + public static final String JSON_PROPERTY_ID = "id"; + public static final String JSON_PROPERTY_INLINE = "inline"; + public static final String JSON_PROPERTY_MALWARE_ACCESS_OVERRIDE = "malware_access_override"; + public static final String JSON_PROPERTY_MALWARE_SCAN_RESULT = "malware_scan_result"; + public static final String JSON_PROPERTY_MAPPED_CONTENT_URL = "mapped_content_url"; + public static final String JSON_PROPERTY_SIZE = "size"; + public static final String JSON_PROPERTY_URL = "url"; + public static final String JSON_PROPERTY_WIDTH = "width"; + public static final String JSON_PROPERTY_THUMBNAILS = "thumbnails"; + + /** + * The content type of the image. Example value: \"image/png\" + */ + @Nullable + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String contentType; + + /** + * A full URL where the attachment image file can be downloaded. The file may be hosted externally so take care not to inadvertently send Zendesk authentication credentials. See Working with url properties + */ + @Nullable + @JsonProperty(JSON_PROPERTY_CONTENT_URL) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String contentUrl; + + /** + * If true, the attachment has been deleted + */ + @Nullable + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Boolean deleted; + + /** + * The name of the image file + */ + @Nullable + @JsonProperty(JSON_PROPERTY_FILE_NAME) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String fileName; + + /** + * The height of the image file in pixels. If height is unknown, returns null + */ + @Nullable + @JsonProperty(JSON_PROPERTY_HEIGHT) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String height; + + /** + * Automatically assigned when created + */ + @Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Integer id; + + /** + * If true, the attachment is excluded from the attachment list and the attachment's URL can be referenced within the comment of a ticket. Default is false + */ + @Nullable + @JsonProperty(JSON_PROPERTY_INLINE) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Boolean inline; + + /** + * If true, you can download an attachment flagged as malware. If false, you can't download such an attachment. + */ + @Nullable + @JsonProperty(JSON_PROPERTY_MALWARE_ACCESS_OVERRIDE) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Boolean malwareAccessOverride; + + @Nullable + @JsonProperty(JSON_PROPERTY_MALWARE_SCAN_RESULT) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private AttachmentBaseMalwareScanResult malwareScanResult; + + /** + * The URL the attachment image file has been mapped to + */ + @Nullable + @JsonProperty(JSON_PROPERTY_MAPPED_CONTENT_URL) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String mappedContentUrl; + + /** + * The size of the image file in bytes + */ + @Nullable + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Integer size; + + /** + * A URL to access the attachment details + */ + @Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String url; + + /** + * The width of the image file in pixels. If width is unknown, returns null + */ + @Nullable + @JsonProperty(JSON_PROPERTY_WIDTH) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String width; + + /** + * An array of attachment objects. Note that photo thumbnails do not have thumbnails + */ + @Nullable + @JsonProperty(JSON_PROPERTY_THUMBNAILS) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private List<@Valid AttachmentBase> thumbnails; + +} diff --git a/src/main/java/lol/pbu/z4j/model/AttachmentBase.java b/src/main/java/lol/pbu/z4j/model/AttachmentBase.java new file mode 100644 index 0000000..7136052 --- /dev/null +++ b/src/main/java/lol/pbu/z4j/model/AttachmentBase.java @@ -0,0 +1,171 @@ +/* + * Copyright 2026 Peanut Butter Unicorn, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package lol.pbu.z4j.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.micronaut.core.annotation.Nullable; +import io.micronaut.serde.annotation.Serdeable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; + +/** + * AttachmentBase + * + * @author Jonathan-Zollinger + * @since 0.1.1 + */ +@Accessors(chain = true) +@NoArgsConstructor +@AllArgsConstructor +@Data +@JsonPropertyOrder({ + AttachmentBase.JSON_PROPERTY_CONTENT_TYPE, + AttachmentBase.JSON_PROPERTY_CONTENT_URL, + AttachmentBase.JSON_PROPERTY_DELETED, + AttachmentBase.JSON_PROPERTY_FILE_NAME, + AttachmentBase.JSON_PROPERTY_HEIGHT, + AttachmentBase.JSON_PROPERTY_ID, + AttachmentBase.JSON_PROPERTY_INLINE, + AttachmentBase.JSON_PROPERTY_MALWARE_ACCESS_OVERRIDE, + AttachmentBase.JSON_PROPERTY_MALWARE_SCAN_RESULT, + AttachmentBase.JSON_PROPERTY_MAPPED_CONTENT_URL, + AttachmentBase.JSON_PROPERTY_SIZE, + AttachmentBase.JSON_PROPERTY_URL, + AttachmentBase.JSON_PROPERTY_WIDTH, +}) +@Serdeable +public class AttachmentBase { + + public static final String JSON_PROPERTY_CONTENT_TYPE = "content_type"; + public static final String JSON_PROPERTY_CONTENT_URL = "content_url"; + public static final String JSON_PROPERTY_DELETED = "deleted"; + public static final String JSON_PROPERTY_FILE_NAME = "file_name"; + public static final String JSON_PROPERTY_HEIGHT = "height"; + public static final String JSON_PROPERTY_ID = "id"; + public static final String JSON_PROPERTY_INLINE = "inline"; + public static final String JSON_PROPERTY_MALWARE_ACCESS_OVERRIDE = "malware_access_override"; + public static final String JSON_PROPERTY_MALWARE_SCAN_RESULT = "malware_scan_result"; + public static final String JSON_PROPERTY_MAPPED_CONTENT_URL = "mapped_content_url"; + public static final String JSON_PROPERTY_SIZE = "size"; + public static final String JSON_PROPERTY_URL = "url"; + public static final String JSON_PROPERTY_WIDTH = "width"; + + /** + * The content type of the image. Example value: \"image/png\" + */ + @Nullable + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String contentType; + + /** + * A full URL where the attachment image file can be downloaded. The file may be hosted externally so take care not to inadvertently send Zendesk authentication credentials. See Working with url properties + */ + @Nullable + @JsonProperty(JSON_PROPERTY_CONTENT_URL) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String contentUrl; + + /** + * If true, the attachment has been deleted + */ + @Nullable + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Boolean deleted; + + /** + * The name of the image file + */ + @Nullable + @JsonProperty(JSON_PROPERTY_FILE_NAME) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String fileName; + + /** + * The height of the image file in pixels. If height is unknown, returns null + */ + @Nullable + @JsonProperty(JSON_PROPERTY_HEIGHT) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String height; + + /** + * Automatically assigned when created + */ + @Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Integer id; + + /** + * If true, the attachment is excluded from the attachment list and the attachment's URL can be referenced within the comment of a ticket. Default is false + */ + @Nullable + @JsonProperty(JSON_PROPERTY_INLINE) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Boolean inline; + + /** + * If true, you can download an attachment flagged as malware. If false, you can't download such an attachment. + */ + @Nullable + @JsonProperty(JSON_PROPERTY_MALWARE_ACCESS_OVERRIDE) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Boolean malwareAccessOverride; + + @Nullable + @JsonProperty(JSON_PROPERTY_MALWARE_SCAN_RESULT) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private AttachmentBaseMalwareScanResult malwareScanResult; + + /** + * The URL the attachment image file has been mapped to + */ + @Nullable + @JsonProperty(JSON_PROPERTY_MAPPED_CONTENT_URL) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String mappedContentUrl; + + /** + * The size of the image file in bytes + */ + @Nullable + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private Integer size; + + /** + * A URL to access the attachment details + */ + @Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String url; + + /** + * The width of the image file in pixels. If width is unknown, returns null + */ + @Nullable + @JsonProperty(JSON_PROPERTY_WIDTH) + @JsonInclude(JsonInclude.Include.USE_DEFAULTS) + private String width; + +} diff --git a/src/main/java/lol/pbu/z4j/model/AttachmentBaseMalwareScanResult.java b/src/main/java/lol/pbu/z4j/model/AttachmentBaseMalwareScanResult.java new file mode 100644 index 0000000..98a3b6e --- /dev/null +++ b/src/main/java/lol/pbu/z4j/model/AttachmentBaseMalwareScanResult.java @@ -0,0 +1,77 @@ +/* + * Copyright 2026 Peanut Butter Unicorn, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package lol.pbu.z4j.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import io.micronaut.serde.annotation.Serdeable; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +import java.util.Arrays; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * The result of the malware scan. There is a delay between the time the attachment is uploaded and when the malware scan is completed. Usually the scan is done within a few seconds, but high load conditions can delay the scan results. Possible values: \"malware_found\", \"malware_not_found\", \"failed_to_scan\", \"not_scanned\" + * + * @author Jonathan-Zollinger + * @since 0.1.1 + */ +@RequiredArgsConstructor +@Getter(onMethod_ = {@JsonValue}) +@Serdeable +public enum AttachmentBaseMalwareScanResult { + + @JsonProperty("malware_found") + MALWARE_FOUND("malware_found"), + + @JsonProperty("malware_not_found") + MALWARE_NOT_FOUND("malware_not_found"), + + @JsonProperty("failed_to_scan") + FAILED_TO_SCAN("failed_to_scan"), + + @JsonProperty("not_scanned") + NOT_SCANNED("not_scanned"), + ; + + public static final Mapbody or author_id. Note that only edits made after May 17, 2021 will be reflected in this field. If no non-author edits have occured since May 17, 2021, then this field will be null.
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_NON_AUTHOR_EDITOR_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long nonAuthorEditorId;
+
+ /**
+ * When the comment was last edited by a non-author user
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_NON_AUTHOR_UPDATED_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private ZonedDateTime nonAuthorUpdatedAt;
+
+ /**
+ * The id of the item on which this comment was made
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_SOURCE_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long sourceId;
+
+ /**
+ * The type of the item on which this comment was made. Currently only supports 'Article'
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_SOURCE_TYPE)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String sourceType;
+
+ /**
+ * The time at which the comment was last updated
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_UPDATED_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String updatedAt;
+
+ /**
+ * The API url of this comment
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_URL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String url;
+
+ /**
+ * The total number of upvotes and downvotes
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_VOTE_COUNT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long voteCount;
+
+ /**
+ * The sum of upvotes (+1) and downvotes (-1), which may be positive or negative
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_VOTE_SUM)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long voteSum;
+
+ public Comment(String body, String locale) {
+ this.body = body;
+ this.locale = locale;
+ }
+
+}
diff --git a/src/main/java/lol/pbu/z4j/model/CommentResponse.java b/src/main/java/lol/pbu/z4j/model/CommentResponse.java
index a21bedf..e49f17d 100644
--- a/src/main/java/lol/pbu/z4j/model/CommentResponse.java
+++ b/src/main/java/lol/pbu/z4j/model/CommentResponse.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package lol.pbu.z4j.model;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -5,7 +20,6 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
-import jakarta.annotation.Generated;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -14,6 +28,8 @@
/**
* CommentResponse
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
*/
@Accessors(chain = true)
@NoArgsConstructor
@@ -21,7 +37,6 @@
@Data
@JsonPropertyOrder(CommentResponse.JSON_PROPERTY_COMMENT)
@Serdeable
-@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class CommentResponse {
public static final String JSON_PROPERTY_COMMENT = "comment";
@@ -32,4 +47,4 @@ public class CommentResponse {
@JsonInclude(JsonInclude.Include.USE_DEFAULTS)
private Comment comment;
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lol/pbu/z4j/model/CommentsResponse.java b/src/main/java/lol/pbu/z4j/model/CommentsResponse.java
index fbaf8c0..546f8bf 100644
--- a/src/main/java/lol/pbu/z4j/model/CommentsResponse.java
+++ b/src/main/java/lol/pbu/z4j/model/CommentsResponse.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package lol.pbu.z4j.model;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -5,7 +20,6 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
-import jakarta.annotation.Generated;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -17,6 +31,8 @@
/**
* CommentsResponse
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
*/
@Accessors(chain = true)
@NoArgsConstructor
@@ -24,7 +40,6 @@
@Data
@JsonPropertyOrder(CommentsResponse.JSON_PROPERTY_COMMENTS)
@Serdeable
-@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class CommentsResponse {
public static final String JSON_PROPERTY_COMMENTS = "comments";
@@ -47,4 +62,4 @@ public CommentsResponse addCommentsItem(Comment commentsItem) {
return this;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lol/pbu/z4j/model/CommunityPostSearchResponse.java b/src/main/java/lol/pbu/z4j/model/CommunityPostSearchResponse.java
index e8ff53f..290eef5 100644
--- a/src/main/java/lol/pbu/z4j/model/CommunityPostSearchResponse.java
+++ b/src/main/java/lol/pbu/z4j/model/CommunityPostSearchResponse.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package lol.pbu.z4j.model;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -5,7 +20,6 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
-import jakarta.annotation.Generated;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -17,6 +31,8 @@
/**
* CommunityPostSearchResponse
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
*/
@Accessors(chain = true)
@NoArgsConstructor
@@ -24,7 +40,6 @@
@Data
@JsonPropertyOrder(CommunityPostSearchResponse.JSON_PROPERTY_RESULTS)
@Serdeable
-@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class CommunityPostSearchResponse {
public static final String JSON_PROPERTY_RESULTS = "results";
@@ -47,4 +62,4 @@ public CommunityPostSearchResponse addResultsItem(Post resultsItem) {
return this;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lol/pbu/z4j/model/ContentSubscription.java b/src/main/java/lol/pbu/z4j/model/ContentSubscription.java
new file mode 100644
index 0000000..729c9d6
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/model/ContentSubscription.java
@@ -0,0 +1,144 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package lol.pbu.z4j.model;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import io.micronaut.core.annotation.Nullable;
+import io.micronaut.serde.annotation.Serdeable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+/**
+ * ContentSubscription
+ *
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
+ */
+@Accessors(chain = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@Data
+@JsonPropertyOrder({
+ ContentSubscription.JSON_PROPERTY_LOCALE,
+ ContentSubscription.JSON_PROPERTY_CONTENT_ID,
+ ContentSubscription.JSON_PROPERTY_CONTENT_TYPE,
+ ContentSubscription.JSON_PROPERTY_CREATED_AT,
+ ContentSubscription.JSON_PROPERTY_ID,
+ ContentSubscription.JSON_PROPERTY_INCLUDE_COMMENTS,
+ ContentSubscription.JSON_PROPERTY_SOURCE_LOCALE,
+ ContentSubscription.JSON_PROPERTY_UPDATED_AT,
+ ContentSubscription.JSON_PROPERTY_URL,
+ ContentSubscription.JSON_PROPERTY_USER_ID,
+})
+@Serdeable
+public class ContentSubscription {
+
+ public static final String JSON_PROPERTY_LOCALE = "locale";
+ public static final String JSON_PROPERTY_CONTENT_ID = "content_id";
+ public static final String JSON_PROPERTY_CONTENT_TYPE = "content_type";
+ public static final String JSON_PROPERTY_CREATED_AT = "created_at";
+ public static final String JSON_PROPERTY_ID = "id";
+ public static final String JSON_PROPERTY_INCLUDE_COMMENTS = "include_comments";
+ public static final String JSON_PROPERTY_SOURCE_LOCALE = "source_locale";
+ public static final String JSON_PROPERTY_UPDATED_AT = "updated_at";
+ public static final String JSON_PROPERTY_URL = "url";
+ public static final String JSON_PROPERTY_USER_ID = "user_id";
+
+ /**
+ * The locale of the subscribed item
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_LOCALE)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String locale;
+
+ /**
+ * The id of the subscribed item
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_CONTENT_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long contentId;
+
+ /**
+ * The type of the subscribed item
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_CONTENT_TYPE)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String contentType;
+
+ /**
+ * The time at which the subscription was created
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_CREATED_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String createdAt;
+
+ /**
+ * Automatically assigned when the subscription is created
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long id;
+
+ /**
+ * Subscribe also to article comments / post comments. Only for section / topic subscriptions.
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_INCLUDE_COMMENTS)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Boolean includeComments;
+
+ /**
+ * Used only for Create Section Subscription and Create Article Subscription, where it's mandatory. Selects the locale of the content to be subscribed
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_SOURCE_LOCALE)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String sourceLocale;
+
+ /**
+ * The time at which the subscription was last updated
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_UPDATED_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String updatedAt;
+
+ /**
+ * The API url of the subscription
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_URL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String url;
+
+ /**
+ * The id of the user who has this subscription
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_USER_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long userId;
+
+}
diff --git a/src/main/java/lol/pbu/z4j/model/ContentSubscriptionsResponse.java b/src/main/java/lol/pbu/z4j/model/ContentSubscriptionsResponse.java
index eade641..1e081a1 100644
--- a/src/main/java/lol/pbu/z4j/model/ContentSubscriptionsResponse.java
+++ b/src/main/java/lol/pbu/z4j/model/ContentSubscriptionsResponse.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package lol.pbu.z4j.model;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -5,7 +20,6 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
-import jakarta.annotation.Generated;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -17,6 +31,8 @@
/**
* ContentSubscriptionsResponse
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
*/
@Accessors(chain = true)
@NoArgsConstructor
@@ -24,7 +40,6 @@
@Data
@JsonPropertyOrder(ContentSubscriptionsResponse.JSON_PROPERTY_SUBSCRIPTIONS)
@Serdeable
-@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class ContentSubscriptionsResponse {
public static final String JSON_PROPERTY_SUBSCRIPTIONS = "subscriptions";
@@ -47,4 +62,4 @@ public ContentSubscriptionsResponse addSubscriptionsItem(ContentSubscription sub
return this;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lol/pbu/z4j/model/CreateCategoryRequest.java b/src/main/java/lol/pbu/z4j/model/CreateCategoryRequest.java
index 597c998..2417be2 100644
--- a/src/main/java/lol/pbu/z4j/model/CreateCategoryRequest.java
+++ b/src/main/java/lol/pbu/z4j/model/CreateCategoryRequest.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package lol.pbu.z4j.model;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -5,7 +20,6 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
-import jakarta.annotation.Generated;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -14,6 +28,8 @@
/**
* CreateCategoryRequest
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
*/
@Accessors(chain = true)
@NoArgsConstructor
@@ -21,7 +37,6 @@
@Data
@JsonPropertyOrder(CreateCategoryRequest.JSON_PROPERTY_CATEGORY)
@Serdeable
-@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class CreateCategoryRequest {
public static final String JSON_PROPERTY_CATEGORY = "category";
@@ -32,4 +47,4 @@ public class CreateCategoryRequest {
@JsonInclude(JsonInclude.Include.USE_DEFAULTS)
private Category category;
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lol/pbu/z4j/model/CreateUserImageResponse.java b/src/main/java/lol/pbu/z4j/model/CreateUserImageResponse.java
index be2aecf..66ad7ff 100644
--- a/src/main/java/lol/pbu/z4j/model/CreateUserImageResponse.java
+++ b/src/main/java/lol/pbu/z4j/model/CreateUserImageResponse.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package lol.pbu.z4j.model;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -5,7 +20,6 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
-import jakarta.annotation.Generated;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -14,6 +28,8 @@
/**
* CreateUserImageResponse
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
*/
@Accessors(chain = true)
@NoArgsConstructor
@@ -21,7 +37,6 @@
@Data
@JsonPropertyOrder(CreateUserImageResponse.JSON_PROPERTY_USER_IMAGE)
@Serdeable
-@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class CreateUserImageResponse {
public static final String JSON_PROPERTY_USER_IMAGE = "user_image";
@@ -32,4 +47,4 @@ public class CreateUserImageResponse {
@JsonInclude(JsonInclude.Include.USE_DEFAULTS)
private CreateUserImageResponseUserImage userImage;
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lol/pbu/z4j/model/CreateUserImageResponseUserImage.java b/src/main/java/lol/pbu/z4j/model/CreateUserImageResponseUserImage.java
index 13e1424..72851b9 100644
--- a/src/main/java/lol/pbu/z4j/model/CreateUserImageResponseUserImage.java
+++ b/src/main/java/lol/pbu/z4j/model/CreateUserImageResponseUserImage.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package lol.pbu.z4j.model;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -5,7 +20,6 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
-import jakarta.annotation.Generated;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -15,6 +29,8 @@
/**
* CreateUserImageResponseUserImage
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
*/
@Accessors(chain = true)
@NoArgsConstructor
@@ -26,7 +42,6 @@
CreateUserImageResponseUserImage.JSON_PROPERTY_SIZE,
})
@Serdeable
-@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class CreateUserImageResponseUserImage {
public static final String JSON_PROPERTY_CONTENT_TYPE = "content_type";
@@ -48,4 +63,4 @@ public class CreateUserImageResponseUserImage {
@JsonInclude(JsonInclude.Include.USE_DEFAULTS)
private BigDecimal size;
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lol/pbu/z4j/model/CreateUserSegmentRequest.java b/src/main/java/lol/pbu/z4j/model/CreateUserSegmentRequest.java
index 143e9cb..a174df9 100644
--- a/src/main/java/lol/pbu/z4j/model/CreateUserSegmentRequest.java
+++ b/src/main/java/lol/pbu/z4j/model/CreateUserSegmentRequest.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package lol.pbu.z4j.model;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -5,7 +20,6 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
-import jakarta.annotation.Generated;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -14,6 +28,8 @@
/**
* CreateUserSegmentRequest
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
*/
@Accessors(chain = true)
@NoArgsConstructor
@@ -21,7 +37,6 @@
@Data
@JsonPropertyOrder(CreateUserSegmentRequest.JSON_PROPERTY_USER_SEGMENT)
@Serdeable
-@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class CreateUserSegmentRequest {
public static final String JSON_PROPERTY_USER_SEGMENT = "user_segment";
@@ -32,4 +47,4 @@ public class CreateUserSegmentRequest {
@JsonInclude(JsonInclude.Include.USE_DEFAULTS)
private UserSegment userSegment;
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lol/pbu/z4j/model/CustomField.java b/src/main/java/lol/pbu/z4j/model/CustomField.java
new file mode 100644
index 0000000..99658dd
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/model/CustomField.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package lol.pbu.z4j.model;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import io.micronaut.core.annotation.Nullable;
+import io.micronaut.serde.annotation.Serdeable;
+import jakarta.validation.Valid;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+/**
+ * CustomField
+ *
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
+ */
+@Accessors(chain = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@Data
+@JsonPropertyOrder(CustomField.JSON_PROPERTY_PROPERTIES)
+@Serdeable
+public class CustomField {
+
+ public static final String JSON_PROPERTY_PROPERTIES = "properties";
+
+ @Nullable
+ @Valid
+ @JsonProperty(JSON_PROPERTY_PROPERTIES)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private CustomFieldProperties properties;
+
+}
diff --git a/src/main/java/lol/pbu/z4j/model/CustomFieldOption.java b/src/main/java/lol/pbu/z4j/model/CustomFieldOption.java
new file mode 100644
index 0000000..38b36d2
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/model/CustomFieldOption.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package lol.pbu.z4j.model;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import io.micronaut.core.annotation.Nullable;
+import io.micronaut.serde.annotation.Serdeable;
+import jakarta.validation.constraints.NotNull;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+/**
+ * CustomFieldOptionObject
+ *
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
+ */
+@Accessors(chain = true)
+@EqualsAndHashCode
+@ToString
+@Getter
+@Setter
+@JsonPropertyOrder({
+ CustomFieldOption.JSON_PROPERTY_NAME,
+ CustomFieldOption.JSON_PROPERTY_VALUE,
+ CustomFieldOption.JSON_PROPERTY_ID,
+ CustomFieldOption.JSON_PROPERTY_POSITION,
+ CustomFieldOption.JSON_PROPERTY_RAW_NAME,
+ CustomFieldOption.JSON_PROPERTY_URL,
+})
+@Serdeable
+public class CustomFieldOption {
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ public static final String JSON_PROPERTY_VALUE = "value";
+ public static final String JSON_PROPERTY_ID = "id";
+ public static final String JSON_PROPERTY_POSITION = "position";
+ public static final String JSON_PROPERTY_RAW_NAME = "raw_name";
+ public static final String JSON_PROPERTY_URL = "url";
+
+ /**
+ * Name of the dropdown option
+ */
+ @NotNull
+ @JsonProperty(JSON_PROPERTY_NAME)
+ private String name;
+
+ /**
+ * Value of the dropdown option
+ */
+ @NotNull
+ @JsonProperty(JSON_PROPERTY_VALUE)
+ private String value;
+
+ /**
+ * Automatically assigned upon creation
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long id;
+
+ /**
+ * Position of the dropdown option
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_POSITION)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Integer position;
+
+ /**
+ * Raw name of the dropdown option
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_RAW_NAME)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String rawName;
+
+ /**
+ * URL of the dropdown option
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_URL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String url;
+
+ public CustomFieldOption(String name, String value) {
+ this.name = name;
+ this.value = value;
+ }
+
+}
diff --git a/src/main/java/lol/pbu/z4j/model/CustomFieldProperties.java b/src/main/java/lol/pbu/z4j/model/CustomFieldProperties.java
new file mode 100644
index 0000000..5383a89
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/model/CustomFieldProperties.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package lol.pbu.z4j.model;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import io.micronaut.core.annotation.Nullable;
+import io.micronaut.serde.annotation.Serdeable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+/**
+ * A set of properties which describe the standard::name field's autonumbering and uniqueness behavior. Autonumbering and uniqueness can't be used together
+ *
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
+ */
+@Accessors(chain = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@Data
+@JsonPropertyOrder({
+ CustomFieldProperties.JSON_PROPERTY_AUTOINCREMENT_ENABLED,
+ CustomFieldProperties.JSON_PROPERTY_AUTOINCREMENT_NEXT_SEQUENCE,
+ CustomFieldProperties.JSON_PROPERTY_AUTOINCREMENT_PADDING,
+ CustomFieldProperties.JSON_PROPERTY_AUTOINCREMENT_PREFIX,
+ CustomFieldProperties.JSON_PROPERTY_IS_UNIQUE,
+})
+@Serdeable
+public class CustomFieldProperties {
+
+ public static final String JSON_PROPERTY_AUTOINCREMENT_ENABLED = "autoincrement_enabled";
+ public static final String JSON_PROPERTY_AUTOINCREMENT_NEXT_SEQUENCE = "autoincrement_next_sequence";
+ public static final String JSON_PROPERTY_AUTOINCREMENT_PADDING = "autoincrement_padding";
+ public static final String JSON_PROPERTY_AUTOINCREMENT_PREFIX = "autoincrement_prefix";
+ public static final String JSON_PROPERTY_IS_UNIQUE = "is_unique";
+
+ /**
+ * Turns autonumbering on or off
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_AUTOINCREMENT_ENABLED)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Boolean autoincrementEnabled;
+
+ /**
+ * The next number in the autonumbering sequence. It can't be negative or less than the current autonumbering value
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_AUTOINCREMENT_NEXT_SEQUENCE)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Integer autoincrementNextSequence;
+
+ /**
+ * Sets the number of digits for autogenerated numbers. Valid values are 0-9
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_AUTOINCREMENT_PADDING)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Integer autoincrementPadding;
+
+ /**
+ * A prefix to autogenerated numbers that can't exceed 30 characters
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_AUTOINCREMENT_PREFIX)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String autoincrementPrefix;
+
+ /**
+ * Turns uniqueness on or off
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_IS_UNIQUE)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Boolean isUnique;
+
+}
diff --git a/src/main/java/lol/pbu/z4j/model/EmailCC.java b/src/main/java/lol/pbu/z4j/model/EmailCC.java
new file mode 100644
index 0000000..02ede69
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/model/EmailCC.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package lol.pbu.z4j.model;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import io.micronaut.core.annotation.Nullable;
+import io.micronaut.serde.annotation.Serdeable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+/**
+ * EmailCC
+ *
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
+ */
+@Accessors(chain = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@Data
+@JsonPropertyOrder({
+ EmailCC.JSON_PROPERTY_ACTION,
+ EmailCC.JSON_PROPERTY_USER_EMAIL,
+ EmailCC.JSON_PROPERTY_USER_ID,
+ EmailCC.JSON_PROPERTY_USER_NAME,
+})
+@Serdeable
+public class EmailCC {
+
+ public static final String JSON_PROPERTY_ACTION = "action";
+ public static final String JSON_PROPERTY_USER_EMAIL = "user_email";
+ public static final String JSON_PROPERTY_USER_ID = "user_id";
+ public static final String JSON_PROPERTY_USER_NAME = "user_name";
+
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_ACTION)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private EmailCCAllOfAction action;
+
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_USER_EMAIL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String userEmail;
+
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_USER_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String userId;
+
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_USER_NAME)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String userName;
+
+}
diff --git a/src/main/java/lol/pbu/z4j/model/EmailCCAllOfAction.java b/src/main/java/lol/pbu/z4j/model/EmailCCAllOfAction.java
new file mode 100644
index 0000000..35f65ec
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/model/EmailCCAllOfAction.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package lol.pbu.z4j.model;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonValue;
+import io.micronaut.serde.annotation.Serdeable;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+/**
+ * Gets or Sets EmailCC_allOf_action
+ *
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
+ */
+@RequiredArgsConstructor
+@Getter(onMethod_ = {@JsonValue})
+@Serdeable
+public enum EmailCCAllOfAction {
+
+ @JsonProperty("put")
+ PUT("put"),
+
+ @JsonProperty("delete")
+ DELETE("delete"),
+ ;
+
+ public static final Maptitle or details. Note that only edits made after May 17, 2021 will be reflected in this field. If no non-author edits have occured since May 17, 2021, then this field will be null.
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_NON_AUTHOR_EDITOR_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long nonAuthorEditorId;
+
+ /**
+ * When the post was last edited by a non-author user
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_NON_AUTHOR_UPDATED_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private ZonedDateTime nonAuthorUpdatedAt;
+
+ /**
+ * When true, pins the post to the top of its topic
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_PINNED)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Boolean pinned;
+
+ /**
+ * The status of the post. Possible values: \"planned\", \"not_planned\" , \"answered\", or \"completed\"
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_STATUS)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String status;
+
+ /**
+ * The id of the topic that the post belongs to
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_TOPIC_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long topicId;
+
+ /**
+ * When the post was last updated
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_UPDATED_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private ZonedDateTime updatedAt;
+
+ /**
+ * The API url of the post
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_URL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String url;
+
+ /**
+ * The total number of upvotes and downvotes
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_VOTE_COUNT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long voteCount;
+
+ /**
+ * The sum of upvotes (+1) and downvotes (-1), which may be positive or negative
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_VOTE_SUM)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long voteSum;
+
+ public Post(String title) {
+ this.title = title;
+ }
+
+ /**
+ * Add an item to the contentTagIds property in a chainable fashion.
+ *
+ * @return The same instance of Post for chaining.
+ */
+ public Post addContentTagIdsItem(Long contentTagIdsItem) {
+ if (contentTagIds == null) {
+ contentTagIds = new ArrayList<>();
+ }
+ contentTagIds.add(contentTagIdsItem);
+ return this;
+ }
+
+}
diff --git a/src/main/java/lol/pbu/z4j/model/PostComment.java b/src/main/java/lol/pbu/z4j/model/PostComment.java
new file mode 100644
index 0000000..7843a38
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/model/PostComment.java
@@ -0,0 +1,182 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package lol.pbu.z4j.model;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import io.micronaut.core.annotation.Nullable;
+import io.micronaut.serde.annotation.Serdeable;
+import jakarta.validation.constraints.NotNull;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.time.ZonedDateTime;
+
+/**
+ * PostComment
+ *
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
+ */
+@Accessors(chain = true)
+@EqualsAndHashCode
+@ToString
+@Getter
+@Setter
+@JsonPropertyOrder({
+ PostComment.JSON_PROPERTY_BODY,
+ PostComment.JSON_PROPERTY_AUTHOR_ID,
+ PostComment.JSON_PROPERTY_CREATED_AT,
+ PostComment.JSON_PROPERTY_HTML_URL,
+ PostComment.JSON_PROPERTY_ID,
+ PostComment.JSON_PROPERTY_NON_AUTHOR_EDITOR_ID,
+ PostComment.JSON_PROPERTY_NON_AUTHOR_UPDATED_AT,
+ PostComment.JSON_PROPERTY_OFFICIAL,
+ PostComment.JSON_PROPERTY_POST_ID,
+ PostComment.JSON_PROPERTY_UPDATED_AT,
+ PostComment.JSON_PROPERTY_URL,
+ PostComment.JSON_PROPERTY_VOTE_COUNT,
+ PostComment.JSON_PROPERTY_VOTE_SUM,
+})
+@Serdeable
+public class PostComment implements SearchResultsInner {
+
+ public static final String JSON_PROPERTY_BODY = "body";
+ public static final String JSON_PROPERTY_AUTHOR_ID = "author_id";
+ public static final String JSON_PROPERTY_CREATED_AT = "created_at";
+ public static final String JSON_PROPERTY_HTML_URL = "html_url";
+ public static final String JSON_PROPERTY_ID = "id";
+ public static final String JSON_PROPERTY_NON_AUTHOR_EDITOR_ID = "non_author_editor_id";
+ public static final String JSON_PROPERTY_NON_AUTHOR_UPDATED_AT = "non_author_updated_at";
+ public static final String JSON_PROPERTY_OFFICIAL = "official";
+ public static final String JSON_PROPERTY_POST_ID = "post_id";
+ public static final String JSON_PROPERTY_UPDATED_AT = "updated_at";
+ public static final String JSON_PROPERTY_URL = "url";
+ public static final String JSON_PROPERTY_VOTE_COUNT = "vote_count";
+ public static final String JSON_PROPERTY_VOTE_SUM = "vote_sum";
+
+ /**
+ * The comment made by the author. See User content
+ */
+ @NotNull
+ @JsonProperty(JSON_PROPERTY_BODY)
+ private String body;
+
+ /**
+ * The id of the author of the comment. Writable on create by Help Center managers. See Create Post Comment
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_AUTHOR_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long authorId;
+
+ /**
+ * When the comment was created. Writable on create by Help Center managers. See Create Post Comment
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_CREATED_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String createdAt;
+
+ /**
+ * The community url of the comment
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_HTML_URL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String htmlUrl;
+
+ /**
+ * Automatically assigned when the comment is created
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long id;
+
+ /**
+ * The user id of whoever performed the most recent (if any) non-author edit. A non-author edit consists of an edit make by a user other than the author that creates or updates the body. Note that only edits made after May 17, 2021 will be reflected in this field. If no non-author edits have occured since May 17, 2021, then this field will be null.
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_NON_AUTHOR_EDITOR_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long nonAuthorEditorId;
+
+ /**
+ * When the comment was last edited by a non-author user
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_NON_AUTHOR_UPDATED_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private ZonedDateTime nonAuthorUpdatedAt;
+
+ /**
+ * Whether the comment is marked as official
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_OFFICIAL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Boolean official;
+
+ /**
+ * The id of the post on which the comment was made
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_POST_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long postId;
+
+ /**
+ * When the comment was last updated
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_UPDATED_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String updatedAt;
+
+ /**
+ * The API url of the comment
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_URL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String url;
+
+ /**
+ * The total number of upvotes and downvotes
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_VOTE_COUNT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long voteCount;
+
+ /**
+ * The sum of upvotes (+1) and downvotes (-1), which may be positive or negative
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_VOTE_SUM)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long voteSum;
+
+ public PostComment(String body) {
+ this.body = body;
+ }
+
+}
diff --git a/src/main/java/lol/pbu/z4j/model/PostCommentResponse.java b/src/main/java/lol/pbu/z4j/model/PostCommentResponse.java
index 4c37758..a237a65 100644
--- a/src/main/java/lol/pbu/z4j/model/PostCommentResponse.java
+++ b/src/main/java/lol/pbu/z4j/model/PostCommentResponse.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package lol.pbu.z4j.model;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -5,7 +20,6 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
-import jakarta.annotation.Generated;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -14,6 +28,8 @@
/**
* PostCommentResponse
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
*/
@Accessors(chain = true)
@NoArgsConstructor
@@ -21,7 +37,6 @@
@Data
@JsonPropertyOrder(PostCommentResponse.JSON_PROPERTY_COMMENT)
@Serdeable
-@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class PostCommentResponse {
public static final String JSON_PROPERTY_COMMENT = "comment";
@@ -32,4 +47,4 @@ public class PostCommentResponse {
@JsonInclude(JsonInclude.Include.USE_DEFAULTS)
private PostComment comment;
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lol/pbu/z4j/model/PostCommentsResponse.java b/src/main/java/lol/pbu/z4j/model/PostCommentsResponse.java
index a64b0e6..ba84ea4 100644
--- a/src/main/java/lol/pbu/z4j/model/PostCommentsResponse.java
+++ b/src/main/java/lol/pbu/z4j/model/PostCommentsResponse.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package lol.pbu.z4j.model;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -5,7 +20,6 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
-import jakarta.annotation.Generated;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -17,6 +31,8 @@
/**
* PostCommentsResponse
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
*/
@Accessors(chain = true)
@NoArgsConstructor
@@ -24,7 +40,6 @@
@Data
@JsonPropertyOrder(PostCommentsResponse.JSON_PROPERTY_COMMENTS)
@Serdeable
-@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class PostCommentsResponse {
public static final String JSON_PROPERTY_COMMENTS = "comments";
@@ -47,4 +62,4 @@ public PostCommentsResponse addCommentsItem(PostComment commentsItem) {
return this;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lol/pbu/z4j/model/PostResponse.java b/src/main/java/lol/pbu/z4j/model/PostResponse.java
index 4033dbd..63ec90f 100644
--- a/src/main/java/lol/pbu/z4j/model/PostResponse.java
+++ b/src/main/java/lol/pbu/z4j/model/PostResponse.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package lol.pbu.z4j.model;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -5,7 +20,6 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
-import jakarta.annotation.Generated;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -14,6 +28,8 @@
/**
* PostResponse
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
*/
@Accessors(chain = true)
@NoArgsConstructor
@@ -21,7 +37,6 @@
@Data
@JsonPropertyOrder(PostResponse.JSON_PROPERTY_POST)
@Serdeable
-@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class PostResponse {
public static final String JSON_PROPERTY_POST = "post";
@@ -32,4 +47,4 @@ public class PostResponse {
@JsonInclude(JsonInclude.Include.USE_DEFAULTS)
private Post post;
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lol/pbu/z4j/model/PostsResponse.java b/src/main/java/lol/pbu/z4j/model/PostsResponse.java
index 6c921e3..2c8ed07 100644
--- a/src/main/java/lol/pbu/z4j/model/PostsResponse.java
+++ b/src/main/java/lol/pbu/z4j/model/PostsResponse.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package lol.pbu.z4j.model;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -5,7 +20,6 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
-import jakarta.annotation.Generated;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -17,6 +31,8 @@
/**
* PostsResponse
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
*/
@Accessors(chain = true)
@NoArgsConstructor
@@ -24,7 +40,6 @@
@Data
@JsonPropertyOrder(PostsResponse.JSON_PROPERTY_POSTS)
@Serdeable
-@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class PostsResponse {
public static final String JSON_PROPERTY_POSTS = "posts";
@@ -47,4 +62,4 @@ public PostsResponse addPostsItem(Post postsItem) {
return this;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lol/pbu/z4j/model/RequestUserImageUploadResponse.java b/src/main/java/lol/pbu/z4j/model/RequestUserImageUploadResponse.java
index 2121ff6..12ada04 100644
--- a/src/main/java/lol/pbu/z4j/model/RequestUserImageUploadResponse.java
+++ b/src/main/java/lol/pbu/z4j/model/RequestUserImageUploadResponse.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package lol.pbu.z4j.model;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -5,7 +20,6 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
-import jakarta.annotation.Generated;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -14,6 +28,8 @@
/**
* RequestUserImageUploadResponse
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
*/
@Accessors(chain = true)
@NoArgsConstructor
@@ -21,7 +37,6 @@
@Data
@JsonPropertyOrder(RequestUserImageUploadResponse.JSON_PROPERTY_UPLOAD)
@Serdeable
-@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class RequestUserImageUploadResponse {
public static final String JSON_PROPERTY_UPLOAD = "upload";
@@ -32,4 +47,4 @@ public class RequestUserImageUploadResponse {
@JsonInclude(JsonInclude.Include.USE_DEFAULTS)
private RequestUserImageUploadResponseUpload upload;
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lol/pbu/z4j/model/RequestUserImageUploadResponseUpload.java b/src/main/java/lol/pbu/z4j/model/RequestUserImageUploadResponseUpload.java
index 68e2601..c8dde7e 100644
--- a/src/main/java/lol/pbu/z4j/model/RequestUserImageUploadResponseUpload.java
+++ b/src/main/java/lol/pbu/z4j/model/RequestUserImageUploadResponseUpload.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package lol.pbu.z4j.model;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -5,7 +20,6 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
-import jakarta.annotation.Generated;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -16,6 +30,8 @@
/**
* RequestUserImageUploadResponseUpload
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
*/
@Accessors(chain = true)
@NoArgsConstructor
@@ -27,7 +43,6 @@
RequestUserImageUploadResponseUpload.JSON_PROPERTY_URL,
})
@Serdeable
-@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class RequestUserImageUploadResponseUpload {
public static final String JSON_PROPERTY_HEADERS = "headers";
@@ -62,4 +77,4 @@ public RequestUserImageUploadResponseUpload putHeadersItem(String key, Object he
return this;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lol/pbu/z4j/model/Search.java b/src/main/java/lol/pbu/z4j/model/Search.java
new file mode 100644
index 0000000..0167974
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/model/Search.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package lol.pbu.z4j.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import io.micronaut.serde.annotation.Serdeable;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotNull;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Search
+ *
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
+ */
+@Accessors(chain = true)
+@EqualsAndHashCode
+@ToString
+@Getter
+@Setter
+@JsonPropertyOrder(Search.JSON_PROPERTY_RESULTS)
+@Serdeable
+public class Search {
+
+ public static final String JSON_PROPERTY_RESULTS = "results";
+
+ /**
+ * An array with the base articles or community posts
+ */
+ @NotNull
+ @JsonProperty(JSON_PROPERTY_RESULTS)
+ private List<@Valid SearchResultsInner> results = new ArrayList<>();
+
+ public Search(List<@Valid SearchResultsInner> results) {
+ this.results = results;
+ }
+
+ /**
+ * Add an item to the results property in a chainable fashion.
+ *
+ * @return The same instance of Search for chaining.
+ */
+ public Search addResultsItem(SearchResultsInner resultsItem) {
+ results.add(resultsItem);
+ return this;
+ }
+
+}
diff --git a/src/main/java/lol/pbu/z4j/model/SearchExportType.java b/src/main/java/lol/pbu/z4j/model/SearchExportType.java
new file mode 100644
index 0000000..16b7426
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/model/SearchExportType.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package lol.pbu.z4j.model;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonValue;
+import io.micronaut.serde.annotation.Serdeable;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+/**
+ * Gets or Sets SearchExportType
+ *
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
+ */
+@RequiredArgsConstructor
+@Getter(onMethod_ = {@JsonValue})
+@Serdeable
+public enum SearchExportType {
+
+ @JsonProperty("ticket")
+ TICKET("ticket"),
+
+ @JsonProperty("organization")
+ ORGANIZATION("organization"),
+
+ @JsonProperty("user")
+ USER("user"),
+
+ @JsonProperty("group")
+ GROUP("group"),
+ ;
+
+ public static final MapDefault order if no other order is selected
+ */ + POSITION("position"), + /** + * Order alphabetically by title. Must specify a locale in associated query + */ + TITLE("title"), + /** + * Order by creation time + */ + CREATED_AT("created_at"), + /** + * Order by update time + */ + UPDATED_AT("updated_at"), + /** + * Order by the last time the title or body was edited. Must specify a locale in associated query + */ + EDITED_AT("edited_at"), + ; + + public static final Mapcomment to set the description. See Description and first comment
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_DESCRIPTION)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String description;
+
+ /**
+ * If this is a ticket of type \"task\" it has a due date. Due date format uses ISO 8601 format
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_DUE_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private ZonedDateTime dueAt;
+
+ /**
+ * The ids of agents or end users currently CC'ed on the ticket. Ignored when CCs and followers is not enabled
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_EMAIL_CC_IDS)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private List<@NotNull Long> emailCcIds;
+
+ /**
+ * Write only. An array of objects that represents agent or end users email CCs to add or delete from the ticket. See Setting email CCs. Ignored when CCs and followers is not enabled
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_EMAIL_CCS)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Object emailCcs;
+
+ /**
+ * An id you can use to link Zendesk Support tickets to local records
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_EXTERNAL_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String externalId;
+
+ /**
+ * The ids of agents currently following the ticket. Ignored when CCs and followers is not enabled
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_FOLLOWER_IDS)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private List<@NotNull Long> followerIds;
+
+ /**
+ * Write only. An array of objects that represents agent followers to add or delete from the ticket. See Setting followers. Ignored when CCs and followers is not enabled
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_FOLLOWERS)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Object followers;
+
+ /**
+ * The ids of the followups created from this ticket. Ids are only visible once the ticket is closed
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_FOLLOWUP_IDS)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private List<@NotNull Long> followupIds;
+
+ /**
+ * The topic in the Zendesk Web portal this ticket originated from, if any. The Web portal is deprecated
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_FORUM_TOPIC_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long forumTopicId;
+
+ /**
+ * If true, the ticket's via type is a messaging channel.
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_FROM_MESSAGING_CHANNEL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Boolean fromMessagingChannel;
+
+ /**
+ * A Unix timestamp that represents the most accurate reading of when this record was last updated. It is updated for all ticket updates, including system updates
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_GENERATED_TIMESTAMP)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long generatedTimestamp;
+
+ /**
+ * The group this ticket is assigned to
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_GROUP_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long groupId;
+
+ /**
+ * Is true if a ticket is a problem type and has one or more incidents linked to it. Otherwise, the value is false.
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_HAS_INCIDENTS)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Boolean hasIncidents;
+
+ /**
+ * Automatically assigned when the ticket is created
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long id;
+
+ /**
+ * Is true if any comments are public, false otherwise
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_IS_PUBLIC)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Boolean isPublic;
+
+ /**
+ * Write only. A macro ID to be recorded in the ticket audit
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_MACRO_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long macroId;
+
+ /**
+ * POST requests only. List of macro IDs to be recorded in the ticket audit
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_MACRO_IDS)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private List<@NotNull Long> macroIds;
+
+ /**
+ * Write only. Metadata for the audit. In the audit object, the data is specified in the custom property of the metadata object. See Setting Metadata
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_METADATA)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Object metadata;
+
+ /**
+ * The organization of the requester. You can only specify the ID of an organization associated with the requester. See Organization Memberships
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_ORGANIZATION_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long organizationId;
+
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_PRIORITY)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private TicketPriority priority;
+
+ /**
+ * For tickets of type \"incident\", the ID of the problem the incident is linked to
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_PROBLEM_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long problemId;
+
+ /**
+ * The dynamic content placeholder, if present, or the \"subject\" value, if not. See Dynamic Content Items
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_RAW_SUBJECT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String rawSubject;
+
+ /**
+ * The original recipient e-mail address of the ticket. Notification emails for the ticket are sent from this address
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_RECIPIENT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String recipient;
+
+ /**
+ * Write only. See Creating a ticket with a new requester
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_REQUESTER)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Object requester;
+
+ /**
+ * Write only. Optional boolean. When true and an update_stamp date is included, protects against ticket update collisions and returns a message to let you know if one occurs. See Protecting against ticket update collisions. A value of false has the same effect as true. Omit the property to force the updates to not be safe
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_SAFE_UPDATE)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Boolean safeUpdate;
+
+ /**
+ * The satisfaction rating of the ticket, if it exists, or the state of satisfaction, \"offered\" or \"unoffered\". The value is null for plan types that don't support CSAT
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_SATISFACTION_RATING)
+ @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
+ private Mapsafe_update property
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_UPDATED_STAMP)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String updatedStamp;
+
+ /**
+ * The API url of this ticket
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_URL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String url;
+
+ @Nullable
+ @Valid
+ @JsonProperty(JSON_PROPERTY_VIA)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private TicketVia via;
+
+ /**
+ * POST requests only. The id of a closed ticket when creating a follow-up ticket. See Creating a follow-up ticket
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_VIA_FOLLOWUP_SOURCE_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long viaFollowupSourceId;
+
+ /**
+ * Write only. For more information, see the Via object reference
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_VIA_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long viaId;
+
+ /**
+ * Write only. See Creating voicemail ticket
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_VOICE_COMMENT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Object voiceComment;
+
+ public Ticket(Long requesterId) {
+ this.requesterId = requesterId;
+ }
+
+ /**
+ * Add an item to the attributeValueIds property in a chainable fashion.
+ *
+ * @return The same instance of Ticket for chaining.
+ */
+ public Ticket addAttributeValueIdsItem(Long attributeValueIdsItem) {
+ if (attributeValueIds == null) {
+ attributeValueIds = new ArrayList<>();
+ }
+ attributeValueIds.add(attributeValueIdsItem);
+ return this;
+ }
+
+ /**
+ * Add an item to the collaboratorIds property in a chainable fashion.
+ *
+ * @return The same instance of Ticket for chaining.
+ */
+ public Ticket addCollaboratorIdsItem(Long collaboratorIdsItem) {
+ if (collaboratorIds == null) {
+ collaboratorIds = new ArrayList<>();
+ }
+ collaboratorIds.add(collaboratorIdsItem);
+ return this;
+ }
+
+ /**
+ * Add an item to the collaborators property in a chainable fashion.
+ *
+ * @return The same instance of Ticket for chaining.
+ */
+ public Ticket addCollaboratorsItem(Collaborator collaboratorsItem) {
+ if (collaborators == null) {
+ collaborators = new ArrayList<>();
+ }
+ collaborators.add(collaboratorsItem);
+ return this;
+ }
+
+ /**
+ * Add an item to the customFields property in a chainable fashion.
+ *
+ * @return The same instance of Ticket for chaining.
+ */
+ public Ticket addCustomFieldsItem(TicketCustomFieldsInner customFieldsItem) {
+ if (customFields == null) {
+ customFields = new ArrayList<>();
+ }
+ customFields.add(customFieldsItem);
+ return this;
+ }
+
+ /**
+ * Add an item to the emailCcIds property in a chainable fashion.
+ *
+ * @return The same instance of Ticket for chaining.
+ */
+ public Ticket addEmailCcIdsItem(Long emailCcIdsItem) {
+ if (emailCcIds == null) {
+ emailCcIds = new ArrayList<>();
+ }
+ emailCcIds.add(emailCcIdsItem);
+ return this;
+ }
+
+ /**
+ * Add an item to the followerIds property in a chainable fashion.
+ *
+ * @return The same instance of Ticket for chaining.
+ */
+ public Ticket addFollowerIdsItem(Long followerIdsItem) {
+ if (followerIds == null) {
+ followerIds = new ArrayList<>();
+ }
+ followerIds.add(followerIdsItem);
+ return this;
+ }
+
+ /**
+ * Add an item to the macroIds property in a chainable fashion.
+ *
+ * @return The same instance of Ticket for chaining.
+ */
+ public Ticket addMacroIdsItem(Long macroIdsItem) {
+ if (macroIds == null) {
+ macroIds = new ArrayList<>();
+ }
+ macroIds.add(macroIdsItem);
+ return this;
+ }
+
+ /**
+ * Add an item to the sharingAgreementIds property in a chainable fashion.
+ *
+ * @return The same instance of Ticket for chaining.
+ */
+ public Ticket addSharingAgreementIdsItem(Long sharingAgreementIdsItem) {
+ if (sharingAgreementIds == null) {
+ sharingAgreementIds = new ArrayList<>();
+ }
+ sharingAgreementIds.add(sharingAgreementIdsItem);
+ return this;
+ }
+
+ /**
+ * Add an item to the tags property in a chainable fashion.
+ *
+ * @return The same instance of Ticket for chaining.
+ */
+ public Ticket addTagsItem(String tagsItem) {
+ if (tags == null) {
+ tags = new ArrayList<>();
+ }
+ tags.add(tagsItem);
+ return this;
+ }
+
+}
diff --git a/src/main/java/lol/pbu/z4j/model/TicketAuditVia.java b/src/main/java/lol/pbu/z4j/model/TicketAuditVia.java
new file mode 100644
index 0000000..ae9d644
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/model/TicketAuditVia.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package lol.pbu.z4j.model;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import io.micronaut.core.annotation.Nullable;
+import io.micronaut.serde.annotation.Serdeable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.util.Map;
+
+/**
+ * Describes how the object was created. See the Via object reference
+ *
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
+ */
+@Accessors(chain = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@Data
+@JsonPropertyOrder({
+ TicketAuditVia.JSON_PROPERTY_CHANNEL,
+ TicketAuditVia.JSON_PROPERTY_SOURCE,
+})
+@Serdeable
+public class TicketAuditVia {
+
+ public static final String JSON_PROPERTY_CHANNEL = "channel";
+ public static final String JSON_PROPERTY_SOURCE = "source";
+
+ /**
+ * This tells you how the ticket or event was created. Examples: \"web\", \"mobile\", \"rule\", \"system\"
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_CHANNEL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String channel;
+
+ /**
+ * For some channels a source object gives more information about how or why the ticket or event was created
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_SOURCE)
+ @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
+ private Mapdescription value if not. See Dynamic Content
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_RAW_DESCRIPTION)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String rawDescription;
+
+ /**
+ * The dynamic content placeholder if present, or the title value if not. See Dynamic Content
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_RAW_TITLE)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String rawTitle;
+
+ /**
+ * The dynamic content placeholder if present, or the \"title_in_portal\" value if not. See Dynamic Content
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_RAW_TITLE_IN_PORTAL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String rawTitleInPortal;
+
+ /**
+ * For \"regexp\" fields only. The validation pattern for a field value to be deemed valid
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_REGEXP_FOR_VALIDATION)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String regexpForValidation;
+
+ /**
+ * A filter definition that allows your autocomplete to filter down results
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_RELATIONSHIP_FILTER)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Object relationshipFilter;
+
+ /**
+ * A representation of what type of object the field references. Options are \"zen:user\", \"zen:organization\", \"zen:ticket\", or \"zen:custom_object:{key}\" where key is a custom object key. For example \"zen:custom_object:apartment\".
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_RELATIONSHIP_TARGET_TYPE)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String relationshipTargetType;
+
+ /**
+ * If false, this field is a system field that must be present on all tickets
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_REMOVABLE)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Boolean removable;
+
+ /**
+ * If true, agents must enter a value in the field to change the ticket status to solved
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_REQUIRED)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Boolean required;
+
+ /**
+ * If true, end users must enter a value in the field to create the request
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_REQUIRED_IN_PORTAL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Boolean requiredInPortal;
+
+ /**
+ * For system ticket fields of type \"priority\" and \"status\". Defaults to 0. A \"priority\" sub type of 1 removes the \"Low\" and \"Urgent\" options. A \"status\" sub type of 1 adds the \"On-Hold\" option
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_SUB_TYPE_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Integer subTypeId;
+
+ /**
+ * Presented for a system ticket field of type \"tickettype\", \"priority\" or \"status\"
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_SYSTEM_FIELD_OPTIONS)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private List<@Valid SystemFieldOptionObject> systemFieldOptions;
+
+ /**
+ * For \"checkbox\" fields only. A tag added to tickets when the checkbox field is selected
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_TAG)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String tag;
+
+ /**
+ * The title of the ticket field for end users in Help Center
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_TITLE_IN_PORTAL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String titleInPortal;
+
+ /**
+ * The time the custom ticket field was last updated
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_UPDATED_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private ZonedDateTime updatedAt;
+
+ /**
+ * The URL for this resource
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_URL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String url;
+
+ /**
+ * Whether this field is visible to end users in Help Center
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_VISIBLE_IN_PORTAL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Boolean visibleInPortal;
+
+ public TicketField(String title, String type) {
+ this.title = title;
+ this.type = type;
+ }
+
+ /**
+ * Add an item to the customFieldOptions property in a chainable fashion.
+ *
+ * @return The same instance of TicketFieldObject for chaining.
+ */
+ public TicketField addCustomFieldOptionsItem(CustomFieldOption customFieldOptionsItem) {
+ if (customFieldOptions == null) {
+ customFieldOptions = new ArrayList<>();
+ }
+ customFieldOptions.add(customFieldOptionsItem);
+ return this;
+ }
+
+}
diff --git a/src/main/java/lol/pbu/z4j/model/TicketFieldCreateRequest.java b/src/main/java/lol/pbu/z4j/model/TicketFieldCreateRequest.java
new file mode 100644
index 0000000..6365d4b
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/model/TicketFieldCreateRequest.java
@@ -0,0 +1,16 @@
+package lol.pbu.z4j.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+
+@Accessors(chain = true)
+@EqualsAndHashCode
+@ToString
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class TicketFieldCreateRequest {
+ @JsonProperty("ticket_field")
+ private TicketField ticketField;
+}
diff --git a/src/main/java/lol/pbu/z4j/model/TicketFieldCustomStatusObject.java b/src/main/java/lol/pbu/z4j/model/TicketFieldCustomStatusObject.java
new file mode 100644
index 0000000..adfb061
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/model/TicketFieldCustomStatusObject.java
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package lol.pbu.z4j.model;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import io.micronaut.core.annotation.Nullable;
+import io.micronaut.serde.annotation.Serdeable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.time.ZonedDateTime;
+
+/**
+ * TicketFieldCustomStatusObject
+ *
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
+ */
+@Accessors(chain = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@Data
+@JsonPropertyOrder({
+ TicketFieldCustomStatusObject.JSON_PROPERTY_ACTIVE,
+ TicketFieldCustomStatusObject.JSON_PROPERTY_AGENT_LABEL,
+ TicketFieldCustomStatusObject.JSON_PROPERTY_CREATED_AT,
+ TicketFieldCustomStatusObject.JSON_PROPERTY_DEFAULT,
+ TicketFieldCustomStatusObject.JSON_PROPERTY_DESCRIPTION,
+ TicketFieldCustomStatusObject.JSON_PROPERTY_END_USER_DESCRIPTION,
+ TicketFieldCustomStatusObject.JSON_PROPERTY_END_USER_LABEL,
+ TicketFieldCustomStatusObject.JSON_PROPERTY_ID,
+ TicketFieldCustomStatusObject.JSON_PROPERTY_STATUS_CATEGORY,
+ TicketFieldCustomStatusObject.JSON_PROPERTY_UPDATED_AT,
+})
+@Serdeable
+public class TicketFieldCustomStatusObject {
+
+ public static final String JSON_PROPERTY_ACTIVE = "active";
+ public static final String JSON_PROPERTY_AGENT_LABEL = "agent_label";
+ public static final String JSON_PROPERTY_CREATED_AT = "created_at";
+ public static final String JSON_PROPERTY_DEFAULT = "default";
+ public static final String JSON_PROPERTY_DESCRIPTION = "description";
+ public static final String JSON_PROPERTY_END_USER_DESCRIPTION = "end_user_description";
+ public static final String JSON_PROPERTY_END_USER_LABEL = "end_user_label";
+ public static final String JSON_PROPERTY_ID = "id";
+ public static final String JSON_PROPERTY_STATUS_CATEGORY = "status_category";
+ public static final String JSON_PROPERTY_UPDATED_AT = "updated_at";
+
+ /**
+ * If true, if the custom status is set to active. If false, the custom status is set to inactive
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_ACTIVE)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Boolean active;
+
+ /**
+ * The label displayed to agents
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_AGENT_LABEL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String agentLabel;
+
+ /**
+ * The date and time at which the custom ticket status was created
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_CREATED_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private ZonedDateTime createdAt;
+
+ /**
+ * If true, the custom status is set to default. If false, the custom status is set to non-default
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_DEFAULT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Boolean isDefault;
+
+ /**
+ * The description of when the user should select this custom ticket status
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_DESCRIPTION)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String description;
+
+ /**
+ * The description displayed to end users
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_END_USER_DESCRIPTION)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String endUserDescription;
+
+ /**
+ * The label displayed to end users
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_END_USER_LABEL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String endUserLabel;
+
+ /**
+ * Automatically assigned when the custom ticket status is created
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long id;
+
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_STATUS_CATEGORY)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private TicketFieldCustomStatusObjectStatusCategory statusCategory;
+
+ /**
+ * The date and time at which the custom ticket status was last updated
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_UPDATED_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private ZonedDateTime updatedAt;
+
+}
diff --git a/src/main/java/lol/pbu/z4j/model/TicketFieldCustomStatusObjectStatusCategory.java b/src/main/java/lol/pbu/z4j/model/TicketFieldCustomStatusObjectStatusCategory.java
new file mode 100644
index 0000000..b457f9c
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/model/TicketFieldCustomStatusObjectStatusCategory.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package lol.pbu.z4j.model;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonValue;
+import io.micronaut.serde.annotation.Serdeable;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+/**
+ * The status category the custom ticket status belongs to
+ *
+ * @author Jonathan-Zollinger
+ * @since 0.1.1
+ */
+@RequiredArgsConstructor
+@Getter(onMethod_ = {@JsonValue})
+@Serdeable
+public enum TicketFieldCustomStatusObjectStatusCategory {
+
+ @JsonProperty("new")
+ NEW("new"),
+
+ @JsonProperty("open")
+ OPEN("open"),
+
+ @JsonProperty("pending")
+ PENDING("pending"),
+
+ @JsonProperty("hold")
+ HOLD("hold"),
+
+ @JsonProperty("solved")
+ SOLVED("solved"),
+ ;
+
+ public static final MapNote: Tags can't be re-used across custom ticket fields. For example, if you configure + * a tag for a checkbox field, you can't use that tag value for a dropdown (tagger) field option. The use of tags + * isn't validated and can prevent editing in the future.
+ * + * @author Jonathan-Zollinger + * @since 0.1.1 + */ +@RequiredArgsConstructor +@Getter(onMethod_ = {@JsonValue}) +@Serdeable +public enum TicketFieldTypeEnum { + + /** + *Default custom field type when type is not specified.
For multi-line text.
+ */ + @JsonProperty("textarea") TEXT_AREA("textarea"), + + /** + *To capture a boolean value. Allowed values are true or false.
+ *Optionally, you can specify a tag to be added to the ticket when the value is true.
+ */ + @JsonProperty("checkbox") CHECKBOX("checkbox"), + + /** + *String composed of numbers.
+ */ + @JsonProperty("integer") INTEGER("integer"), + + /** + *For numbers containing decimals.
+ */ + @JsonProperty("decimal") DECIMAL("decimal"), + + /** + *Matches the Regex pattern found in the custom field settings.
A credit card number. Only the last 4 digits are retained.
+ */ + @JsonProperty("partial_credit_card") PARTIAL_CREDIT_CARD("partial_credit_card"), + + /** + *It contains one or more tag values belonging to the field's options. {@see #TAGGER}
+ */ + @JsonProperty("multi-select") MULTI_SELECT("multi-select"), + + /** + *It contains one or more tag values belonging to the field's options. {@see #MULTI_SELECT}
+ *A field to create a relationship (see lookup relationships) to + * another object such as a user, ticket, or organization.
+ *The manageable_by attribute takes one of the following values:
| Value | Users |
|---|---|
| staff | agents and managers |
| managers | only Help Center managers |
Note that manageable_by is only displayed to users who can manage the topic.
The user_type attribute takes one of the following values:
| Value | Users |
|---|---|
| signed_in_users | only authenticated users |
| staff | only agents and Help Center managers |
For group_ids, organization_ids, tags, and or_tags, an empty array means that access is not restricted by the attribute. For example, if no group ids are specified, then users don't have to be in any specific group to have access.
For tags, a user must have all the listed tags to have access. For or_tags, a user must have at least one of the listed tags to have access.
WARNING: Every section and all articles in the category will also be deleted.
*Translations are embedded within the category because they're not shared between resources.
*This only updates category-level metadata such as the sorting position. This doesn't update category translations.
*body or author_id. Note that only edits made after May 17, 2021 will be reflected in this field. If no non-author edits have occured since May 17, 2021, then this field will be null.
+ * body or
+ * author_id. Note that only edits made after May 17, 2021, will be reflected in this field.
+ * If no non-author edits have occurred since May 17, 2021, then this field will benull.
*/
@Nullable
@JsonProperty(JSON_PROPERTY_NON_AUTHOR_EDITOR_ID)
@@ -184,9 +187,4 @@ public class Comment {
@JsonInclude(JsonInclude.Include.USE_DEFAULTS)
private Long voteSum;
- public Comment(String body, String locale) {
- this.body = body;
- this.locale = locale;
- }
-
}
diff --git a/src/main/java/lol/pbu/z4j/model/ContentSubscription.java b/src/main/java/lol/pbu/z4j/model/ContentSubscription.java
index 729c9d6..f8976da 100644
--- a/src/main/java/lol/pbu/z4j/model/ContentSubscription.java
+++ b/src/main/java/lol/pbu/z4j/model/ContentSubscription.java
@@ -67,7 +67,7 @@ public class ContentSubscription {
@Nullable
@JsonProperty(JSON_PROPERTY_LOCALE)
@JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private String locale;
+ private LocaleAbbreviation localeAbbreviation;
/**
* The id of the subscribed item
diff --git a/src/main/java/lol/pbu/z4j/model/HelpCenterLocalesResponse.java b/src/main/java/lol/pbu/z4j/model/HelpCenterLocalesResponse.java
index 2fdff06..818dc70 100644
--- a/src/main/java/lol/pbu/z4j/model/HelpCenterLocalesResponse.java
+++ b/src/main/java/lol/pbu/z4j/model/HelpCenterLocalesResponse.java
@@ -47,18 +47,18 @@ public class HelpCenterLocalesResponse {
@Nullable
@JsonProperty(JSON_PROPERTY_LOCALES)
@JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private List<@NotNull String> locales;
+ private List<@NotNull LocaleAbbreviation> localeAbbreviations;
/**
* Add an item to the locales property in a chainable fashion.
*
* @return The same instance of HelpCenterLocalesResponse for chaining.
*/
- public HelpCenterLocalesResponse addLocalesItem(String localesItem) {
- if (locales == null) {
- locales = new ArrayList<>();
+ public HelpCenterLocalesResponse addLocalesItem(LocaleAbbreviation localeAbbreviation) {
+ if (localeAbbreviations == null) {
+ localeAbbreviations = new ArrayList<>();
}
- locales.add(localesItem);
+ localeAbbreviations.add(localeAbbreviation);
return this;
}
diff --git a/src/main/java/lol/pbu/z4j/model/Locale.java b/src/main/java/lol/pbu/z4j/model/Locale.java
index 0c3dd46..46672e8 100644
--- a/src/main/java/lol/pbu/z4j/model/Locale.java
+++ b/src/main/java/lol/pbu/z4j/model/Locale.java
@@ -77,7 +77,7 @@ public class Locale {
@Nullable
@JsonProperty(JSON_PROPERTY_LOCALE)
@JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private String localeName;
+ private LocaleAbbreviation localeAbbreviation;
/**
* The name of the language
diff --git a/src/main/java/lol/pbu/z4j/model/LocaleAbbreviation.java b/src/main/java/lol/pbu/z4j/model/LocaleAbbreviation.java
new file mode 100644
index 0000000..518c3c2
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/model/LocaleAbbreviation.java
@@ -0,0 +1,170 @@
+/*
+ * Copyright 2026 Peanut Butter Unicorn, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package lol.pbu.z4j.model;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonValue;
+import io.micronaut.serde.annotation.Serdeable;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+/**
+ * The locale of the translation
+ */
+@RequiredArgsConstructor
+@Getter(onMethod = @__(@JsonValue))
+@Serdeable
+public enum LocaleAbbreviation {
+
+ @JsonProperty("ar")
+ ARABIC("ar"),
+
+ @JsonProperty("pt-br")
+ PORTUGUESE_BRAZIL("pt-br"),
+
+ @JsonProperty("bg")
+ BULGARIAN("bg"),
+
+ @JsonProperty("cs")
+ CZECH("cs"),
+
+ @JsonProperty("da")
+ DANISH("da"),
+
+ @JsonProperty("nl")
+ DUTCH("nl"),
+
+ @JsonProperty("en-gb")
+ ENGLISH_UNITED_KINGDOM("en-gb"),
+
+ @JsonProperty("en-us")
+ ENGLISH_UNITED_STATES("en-us"),
+
+ @JsonProperty("fa-af")
+ DARI_PERSIAN_AFGHANISTAN("fa-af"),
+
+ @JsonProperty("fil")
+ FILIPINO("fil"),
+
+ @JsonProperty("fi")
+ FINNISH("fi"),
+
+ @JsonProperty("fr")
+ FRENCH("fr"),
+
+ @JsonProperty("fr-ca")
+ FRENCH_CANADA("fr-ca"),
+
+ @JsonProperty("de")
+ GERMAN("de"),
+
+ @JsonProperty("el")
+ GREEK("el"),
+
+ @JsonProperty("he")
+ HEBREW("he"),
+
+ @JsonProperty("hi")
+ HINDI("hi"),
+
+ @JsonProperty("hu")
+ HUNGARIAN("hu"),
+
+ @JsonProperty("id")
+ INDONESIAN("id"),
+
+ @JsonProperty("it")
+ ITALIAN("it"),
+
+ @JsonProperty("ja")
+ JAPANESE("ja"),
+
+ @JsonProperty("ko")
+ KOREAN("ko"),
+
+ @JsonProperty("ms")
+ MALAY("ms"),
+
+ @JsonProperty("false")
+ NORWEGIAN("false"),
+
+ @JsonProperty("pl")
+ POLISH("pl"),
+
+ @JsonProperty("ro")
+ ROMANIAN("ro"),
+
+ @JsonProperty("ru")
+ RUSSIAN("ru"),
+
+ @JsonProperty("zh-cn")
+ SIMPLIFIED_CHINESE("zh-cn"),
+
+ @JsonProperty("es")
+ SPANISH("es"),
+
+ @JsonProperty("sk")
+ SLOVAK("sk"),
+
+ @JsonProperty("sv")
+ SWEDISH("sv"),
+
+ @JsonProperty("th")
+ THAI("th"),
+
+ @JsonProperty("zh-tw")
+ TRADITIONAL_CHINESE("zh-tw"),
+
+ @JsonProperty("tr")
+ TURKISH("tr"),
+
+ @JsonProperty("uk")
+ UKRAINIAN("uk"),
+
+ @JsonProperty("vi")
+ VIETNAMESE("vi"),
+ ;
+
+ public static final Map