From 60069ed0cb21b542d4be3a309404d6b818049826 Mon Sep 17 00:00:00 2001
From: Kody Krauss <49570642+KKrauss8@users.noreply.github.com>
Date: Tue, 3 Mar 2026 14:56:05 -0700
Subject: [PATCH 1/9] feat: added "listTicketEmailCCs" path.
---
src/main/resources/z4j.yaml | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/src/main/resources/z4j.yaml b/src/main/resources/z4j.yaml
index 9e71288..6548d69 100644
--- a/src/main/resources/z4j.yaml
+++ b/src/main/resources/z4j.yaml
@@ -244,6 +244,33 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TicketUpdateResponse'
+ /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'
/api/v2/locales:
get:
operationId: ListLocales
@@ -293,7 +320,7 @@ paths:
- name: start_time
in: query
required: false
- description: |
+ description: |
You can use the incremental article endpoint to list all the articles that were updated since a certain date and time.
This time is given as a Unix epoch timeStamp
schema:
@@ -1378,6 +1405,9 @@ components:
type: array
items:
type: string
+ ListTicketEmailCCsResponse:
+ type: object
+ additionalProperties: true
PostComment:
type: object
properties:
From 2516837297b0d1da8a2a4f04297d765ceeb757d1 Mon Sep 17 00:00:00 2001
From: Kody Krauss <49570642+KKrauss8@users.noreply.github.com>
Date: Tue, 31 Mar 2026 13:21:07 -0700
Subject: [PATCH 2/9] feat: added endpoint listTicketIncidents. refactor:
changed listTicketEmailCCs description from markdown to html.
---
src/main/resources/z4j.yaml | 44 +++++++++++++++++++++++++++----------
1 file changed, 32 insertions(+), 12 deletions(-)
diff --git a/src/main/resources/z4j.yaml b/src/main/resources/z4j.yaml
index 6548d69..1eb5b0d 100644
--- a/src/main/resources/z4j.yaml
+++ b/src/main/resources/z4j.yaml
@@ -248,20 +248,17 @@ paths:
get:
operationId: ListTicketEmailCCs
tags:
- - Tickets
+ - Ticket
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
+
Returns any users cc'd on the ticket.
+ Availability
+ The CCs and Followers feature must be enabled in Zendesk Support.
+ If the feature is not enabled, the default CC functionality is used. In that case, use {@link TicketsClient#listCollaborators(String) List Collaborators} to list the users cc'ed on the ticket.
+ Allowed For
+
parameters:
- $ref: '#/components/parameters/TicketId'
responses:
@@ -271,6 +268,26 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ListTicketEmailCCsResponse'
+ /api/v2/tickets/{ticket_id}/incidents:
+ get:
+ operationId: ListTicketIncidents
+ tags:
+ - Ticket
+ summary: List Ticket Incidents
+ description: |-
+ Allowed For
+
+ parameters:
+ - $ref: '#/components/parameters/TicketId'
+ responses:
+ "200":
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ListTicketIncidentsResponse'
/api/v2/locales:
get:
operationId: ListLocales
@@ -1408,6 +1425,9 @@ components:
ListTicketEmailCCsResponse:
type: object
additionalProperties: true
+ ListTicketIncidentsResponse:
+ type: object
+ additionalProperties: true
PostComment:
type: object
properties:
From 341b7f32fa344783b06f2aa2a0aa234541834a1e Mon Sep 17 00:00:00 2001
From: Kody Krauss <49570642+KKrauss8@users.noreply.github.com>
Date: Fri, 3 Apr 2026 14:01:47 -0700
Subject: [PATCH 3/9] feat: added ticketsShowMany endpoint.
---
src/main/resources/z4j.yaml | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/src/main/resources/z4j.yaml b/src/main/resources/z4j.yaml
index 1eb5b0d..9110e93 100644
--- a/src/main/resources/z4j.yaml
+++ b/src/main/resources/z4j.yaml
@@ -204,6 +204,28 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TicketCountResponse'
+ /api/v2/tickets/show_many:
+ get:
+ operationId: TicketsShowMany
+ tags:
+ - Ticket
+ 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
+
+ parameters:
+ - $ref: '#/components/parameters/TicketIds'
+ responses:
+ "200":
+ description: List tickets
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketsResponse'
/api/v2/tickets/{ticket_id}:
get:
operationId: ShowTicket
From 120cbf74decbd67099b9013309a148ea5f12c1d1 Mon Sep 17 00:00:00 2001
From: Kody Krauss <49570642+KKrauss8@users.noreply.github.com>
Date: Mon, 6 Apr 2026 13:44:02 -0700
Subject: [PATCH 4/9] feat: added ticketsShowMany endpoint.
---
src/main/resources/z4j.yaml | 161 ++++++++++++++++++++++++++++++++++++
1 file changed, 161 insertions(+)
diff --git a/src/main/resources/z4j.yaml b/src/main/resources/z4j.yaml
index 9110e93..db92b20 100644
--- a/src/main/resources/z4j.yaml
+++ b/src/main/resources/z4j.yaml
@@ -204,6 +204,31 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TicketCountResponse'
+ /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 endpoint.
+ This endpoint returns a job_status JSON object and queues a background job to do the work. Use the Show Job Status endpoint to check for the job's completion. Only a certain number of jobs can be queued or running at the same time. See Job limit for more information.
+ Allowed For
+
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TicketsCreateRequest'
+ responses:
+ "200":
+ description: Create many tickets
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobStatusResponse'
/api/v2/tickets/show_many:
get:
operationId: TicketsShowMany
@@ -1172,6 +1197,18 @@ components:
type: string
size:
type: number
+ CreateResourceResult:
+ type: object
+ properties:
+ id:
+ type: integer
+ description: the id of the new resource
+ index:
+ type: integer
+ description: the index number of the result
+ required:
+ - id
+ - index
CustomField:
type: object
allOf:
@@ -1200,6 +1237,30 @@ components:
type: text
updated_at: "2022-09-07T23:22:00Z"
url: https://company.zendesk.com/api/v2/custom_objects/car/fields/4398096842879.json
+ FailedResult:
+ type: object
+ properties:
+ action:
+ type: string
+ description: 'The action the job attempted (`"action": "update"`)'
+ details:
+ type: string
+ description: The details of the error
+ error:
+ type: string
+ description: The error message
+ id:
+ type: integer
+ description: The id of the resource the job attempted to update
+ success:
+ type: boolean
+ description: 'Whether the action was successful or not (`"success": true`)'
+ required:
+ - id
+ - action
+ - error
+ - success
+ - details
TicketFieldCustomStatusObject:
type: object
properties:
@@ -1345,6 +1406,83 @@ components:
properties:
current_session:
$ref: '#/components/schemas/HelpCenterSession'
+ JobStatusObject:
+ type: object
+ properties:
+ id:
+ type: string
+ description: Automatically assigned when the job is queued
+ readOnly: true
+ job_type:
+ type: string
+ description: The type of the job
+ readOnly: true
+ message:
+ type: string
+ description: Message from the job worker, if any
+ nullable: true
+ readOnly: true
+ progress:
+ type: integer
+ description: Number of tasks that have already been completed
+ nullable: true
+ readOnly: true
+ results:
+ description: Result data from processed tasks. See [Results](#results) below
+ oneOf:
+ - type: array
+ items:
+ $ref: '#/components/schemas/JobStatusResultObject'
+ nullable: true
+ - type: object
+ properties:
+ success:
+ type: boolean
+ description: Whether the action was successful or not
+ readOnly: true
+ required:
+ - success
+ readOnly: true
+ status:
+ type: string
+ description: 'The current status. One of the following: "queued", "working", "failed", "completed"'
+ readOnly: true
+ total:
+ type: integer
+ description: The total number of tasks this job is batching through
+ nullable: true
+ readOnly: true
+ url:
+ type: string
+ description: The URL to poll for status updates
+ readOnly: true
+ example:
+ id: 82de0b044094f0c67893ac9fe64f1a99
+ message: Completed at 2018-03-08 10:07:04 +0000
+ progress: 2
+ results:
+ - action: update
+ id: 244
+ status: Updated
+ success: true
+ - action: update
+ id: 245
+ status: Updated
+ success: true
+ status: completed
+ total: 2
+ url: https://example.zendesk.com/api/v2/job_statuses/82de0b0467893ac9fe64f1a99
+ JobStatusResponse:
+ type: object
+ properties:
+ job_status:
+ $ref: '#/components/schemas/JobStatusObject'
+ JobStatusResultObject:
+ oneOf:
+ - $ref: '#/components/schemas/CreateResourceResult'
+ - $ref: '#/components/schemas/UpdateResourceResult'
+ - $ref: '#/components/schemas/FailedResult'
+ additionalProperties: true
Label:
type: object
properties:
@@ -2779,6 +2917,29 @@ components:
type: array
items:
$ref: '#/components/schemas/UnifiedSearchResult'
+ UpdateResourceResult:
+ type: object
+ properties:
+ action:
+ type: string
+ description: |
+ the action the job attempted (`"action": "update"`)
+ id:
+ type: integer
+ description: the id of the resource the job attempted to update
+ status:
+ type: string
+ description: |
+ the status (`"status": "Updated"`)
+ success:
+ type: boolean
+ description: |
+ whether the action was successful or not (`"success": true`)
+ required:
+ - id
+ - action
+ - success
+ - status
UserSegment:
type: object
description: |
From 89cc03845f7ad5d80f88c004aad15881141e3248 Mon Sep 17 00:00:00 2001
From: Kody Krauss <49570642+KKrauss8@users.noreply.github.com>
Date: Fri, 10 Apr 2026 14:27:09 -0700
Subject: [PATCH 5/9] feat: add passing and failing tests for
"listTicketEmailCCs" path.
---
.../pbu/z4j/client/TicketClientSpec.groovy | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/src/test/groovy/lol/pbu/z4j/client/TicketClientSpec.groovy b/src/test/groovy/lol/pbu/z4j/client/TicketClientSpec.groovy
index 856bd6d..f931542 100644
--- a/src/test/groovy/lol/pbu/z4j/client/TicketClientSpec.groovy
+++ b/src/test/groovy/lol/pbu/z4j/client/TicketClientSpec.groovy
@@ -194,4 +194,26 @@ class TicketClientSpec extends Z4jSpec {
clientTestMatrix.findAll { !it.shouldSucceed && it.clientType != "simple user"}, [true, false, null], accountLocales
].combinations()
}
+
+ def "calling listTicketEmailCCs() succeeds when using a(n) #clientType"(TicketClient client, String clientType, Boolean ignored, String alsoIgnored) {
+ when:
+ client.listTicketEmailCCs(tickets.get(0).getId()).block()
+
+ then:
+ noExceptionThrown()
+
+ where:
+ [client, clientType, ignored, alsoIgnored] << clientTestMatrix.findAll { it.shouldSucceed }
+ }
+
+ def "calling listTicketEmailCCs() fails when using a(n) #clientType"(TicketClient client, String clientType, Boolean ignored, String alsoIgnored) {
+ when:
+ client.listTicketEmailCCs(tickets.get(0).getId()).block()
+
+ then:
+ thrown(HttpClientException)
+
+ where:
+ [client, clientType, ignored, alsoIgnored] << clientTestMatrix.findAll { !it.shouldSucceed }
+ }
}
From 8efb02313ef30d3499551342f17744efff42b44f Mon Sep 17 00:00:00 2001
From: Kody Krauss <49570642+KKrauss8@users.noreply.github.com>
Date: Tue, 14 Apr 2026 10:01:10 -0700
Subject: [PATCH 6/9] feat: add passing and failing tests for
"listTicketIncidents" path.
---
.../pbu/z4j/client/TicketClientSpec.groovy | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/src/test/groovy/lol/pbu/z4j/client/TicketClientSpec.groovy b/src/test/groovy/lol/pbu/z4j/client/TicketClientSpec.groovy
index f931542..6244bc8 100644
--- a/src/test/groovy/lol/pbu/z4j/client/TicketClientSpec.groovy
+++ b/src/test/groovy/lol/pbu/z4j/client/TicketClientSpec.groovy
@@ -216,4 +216,26 @@ class TicketClientSpec extends Z4jSpec {
where:
[client, clientType, ignored, alsoIgnored] << clientTestMatrix.findAll { !it.shouldSucceed }
}
+
+ def "calling listTicketIncidents() succeeds when using a(n) #clientType"(TicketClient client, String clientType, Boolean ignored, String alsoIgnored) {
+ when:
+ client.listTicketIncidents(tickets.get(0).getId()).block()
+
+ then:
+ noExceptionThrown()
+
+ where:
+ [client, clientType, ignored, alsoIgnored] << clientTestMatrix.findAll { it.shouldSucceed }
+ }
+
+ def "calling listTicketIncidents() fails when using a(n) #clientType"(TicketClient client, String clientType, Boolean ignored, String alsoIgnored) {
+ when:
+ client.listTicketIncidents(tickets.get(0).getId()).block()
+
+ then:
+ thrown(HttpClientException)
+
+ where:
+ [client, clientType, ignored, alsoIgnored] << clientTestMatrix.findAll { !it.shouldSucceed }
+ }
}
From 8f8c439edf00b4fb052f4815a2edc1536163df09 Mon Sep 17 00:00:00 2001
From: Kody Krauss <49570642+KKrauss8@users.noreply.github.com>
Date: Tue, 28 Apr 2026 13:51:30 -0700
Subject: [PATCH 7/9] refactor: change SonarQube testing conditions.
refactor: add "Ticket-Feature" to branches.
---
.github/workflows/Test.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml
index 89d3442..a551b50 100644
--- a/.github/workflows/Test.yml
+++ b/.github/workflows/Test.yml
@@ -3,6 +3,7 @@ on:
pull_request:
branches:
- "main"
+ - "Ticket-Feature"
- "[0-9]+.[0-9]+.[0-9]+" # release branches
jobs:
build-and-analyze:
@@ -33,7 +34,7 @@ jobs:
if: ${{ github.event.pull_request.base.ref != 'main' && github.event.action != 'closed' }}
run: ./gradlew build
- name: Sonar Scan
- if: ${{ github.event.pull_request.base.ref == 'main' && github.event.action != 'closed' }} # Only run SonarQube on PRs to main
+ if: ${{ github.event.action != 'closed' }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew build sonar
From 3c39e4a8795f671f65cdbc6277dcff8d359ae89f Mon Sep 17 00:00:00 2001
From: Jonathan Zollinger
<62955101+Jonathan-Zollinger@users.noreply.github.com>
Date: Wed, 29 Apr 2026 14:58:21 +0000
Subject: [PATCH 8/9] fix(build): add properties file
---
src/main/resources/application.yml | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 src/main/resources/application.yml
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
new file mode 100644
index 0000000..35d5517
--- /dev/null
+++ b/src/main/resources/application.yml
@@ -0,0 +1,9 @@
+micronaut:
+ application:
+ name: z4j
+ http:
+ services:
+ zendesk:
+ url: ${:Z4J_URL}
+ email: ${:Z4J_EMAIL}
+ token: ${:Z4J_TOKEN}
\ No newline at end of file
From b999a4505432b4140c913ff411c7ac5873a606f4 Mon Sep 17 00:00:00 2001
From: Jonathan Zollinger
<62955101+Jonathan-Zollinger@users.noreply.github.com>
Date: Wed, 29 Apr 2026 15:11:56 +0000
Subject: [PATCH 9/9] ci: run PR tests in target branch
---
.github/workflows/Test.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml
index a551b50..230e703 100644
--- a/.github/workflows/Test.yml
+++ b/.github/workflows/Test.yml
@@ -1,6 +1,6 @@
name: Test
on:
- pull_request:
+ pull_request_target:
branches:
- "main"
- "Ticket-Feature"