Merge Tickets into Target Ticket
POST {{baseUrl}}/api/v2/tickets/:ticket_id/merge
Merges one or more tickets into the ticket with the specified id.
See Merging tickets in the Support Help Center for ticket merging rules.
Any attachment to the source ticket is copied to the target ticket.
This endpoint returns a job_status
JSON object and queues a background job to do the work.
Use the Show Job Status endpoint to check for the job's completion.
Allowed For
- Agents
Agents in the Enterprise account must have merge permissions. See Creating custom roles and assigning agents (Enterprise) in the Support Help Center.
Available parameters
The request takes a data object with the following properties:
Name | Type | Required | Comments |
---|---|---|---|
ids | array | yes | Ids of tickets to merge into the target ticket |
target_comment | string | no | Private comment to add to the target ticket |
source_comment | string | no | Private comment to add to the source ticket |
targetcommentis_public | boolean | no | Whether comment in target ticket is public or private |
sourcecommentis_public | boolean | no | Whether comment in source tickets are public or private |
The comments are optional but strongly recommended.
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 Twitter, Facebook or the Channel framework
In any other case, comments default to private but can be modified with the comment privacy parameters.
Request Body
{"ids"=>"<array>", "source_comment"=>"<string>", "source_comment_is_public"=>"<boolean>", "target_comment"=>"<string>", "target_comment_is_public"=>"<boolean>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"job_status":{"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.json"}}