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

write Confirm

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

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

Example response

JSON

{
  "target_ticket_id": 48102,
  "source_ticket_id": 48260,
  "source_status": "closed",
  "source_tags": [
    "closed_by_merge"
  ]
}

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.