Merge tickets
Merge one ticket into another and close the source ticket.
POST https://cotlet.dev/api/v1/zendesk/target-tickets/{target_ticket_id}/tickets/merge
Merges the source ticket into the target ticket. A merge is permanent and cannot be undone. Both tickets must be below solved, but you can merge into a solved target without reopening it. The source's most recent public comment is carried to the target with a link, other comments are not, and fields such as tags and priority are not carried over. The source is closed and gets the tag closed_by_merge. Without CCs enabled in your Zendesk, both tickets must have the same requester. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| target_ticket_id integer required | integer | Ticket that stays open and receives the merge. |
| source_ticket_id integer required | integer | Ticket that is closed by the merge. |
Request
curl -X POST https://cotlet.dev/api/v1/zendesk/target-tickets/1/tickets/merge \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"source_ticket_id":1}' result = client.call("zendesk", "merge_tickets", {"target_ticket_id":1,"source_ticket_id":1}) const result = await cotlet.call('zendesk', 'merge_tickets', {"target_ticket_id":1,"source_ticket_id":1}); cotlet call zendesk merge_tickets --data '{"target_ticket_id":1,"source_ticket_id":1}' Example response
{
"target_ticket_id": 48102,
"source_ticket_id": 48260,
"source_status": "closed",
"source_tags": [
"closed_by_merge"
]
}