Merge tickets

Merge a duplicate ticket into another ticket.

POST https://cotlet.dev/api/v1/zammad/source-tickets/{source_ticket_id}/tickets/merge

write Confirm

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

Parameters: merge_tickets
NameTypeDescription
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
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}'
Python
result = client.call("zammad", "merge_tickets", {"source_ticket_id":4821,"target_ticket_id":4790})
Node.js
const result = await cotlet.call('zammad', 'merge_tickets', {"source_ticket_id":4821,"target_ticket_id":4790});
CLI
cotlet call zammad merge_tickets --data '{"source_ticket_id":4821,"target_ticket_id":4790}'

Example response

JSON

{
  "target_ticket_id": 4790,
  "target_number": "31004790",
  "source_ticket_id": 4821,
  "source_state": "merged"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.