Merge tickets
Merge a duplicate ticket into another ticket.
POST https://cotlet.dev/api/v1/zammad/source-tickets/{source_ticket_id}/tickets/merge
Moves all articles of the source ticket into the target ticket. The source stays, with its articles replaced by a merged label, the state merged and a link to the target. Returns both ticket ids and the new state of the source. Merging two tickets from different channels means you answer through the target's channel. A merge is not undone in one call, so check the pair. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| source_ticket_id integer required | integer | The duplicate. It ends up in state merged. |
| target_ticket_id integer required | integer | The original ticket that keeps all the articles. |
Request
curl -X POST https://cotlet.dev/api/v1/zammad/source-tickets/4821/tickets/merge \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"target_ticket_id":4790}' result = client.call("zammad", "merge_tickets", {"source_ticket_id":4821,"target_ticket_id":4790}) const result = await cotlet.call('zammad', 'merge_tickets', {"source_ticket_id":4821,"target_ticket_id":4790}); cotlet call zammad merge_tickets --data '{"source_ticket_id":4821,"target_ticket_id":4790}' Example response
{
"target_ticket_id": 4790,
"target_number": "31004790",
"source_ticket_id": 4821,
"source_state": "merged"
}