---
title: "Merge multiple tickets into one"
method: PUT
path: "/tickets/merge"
tags: ["Ticket"]
---

# Merge multiple tickets into one

`PUT /tickets/merge`

Merges `ticketsToMergeIds` into a target ticket and returns the resulting main ticket. `targetTicketId`
is required unless `shouldCreateNewTicket` is `true`, in which case a fresh main ticket is created (and an
existing target ticket, if given, is archived too). Merged tickets are archived and linked to the main
ticket. `shouldMergeTasks` re-parents linked sub-tickets; `shouldMergeContacts` merges the contacts of the
merged tickets.

## Headers

- `project` string, required

## Request body

- object
  - `shouldMergeContacts` boolean, required
  - `shouldMergeTasks` boolean, required
  - `shouldCreateNewTicket` boolean, required
  - `ticketsToMergeIds` string[], required
  - `targetTicketId` string

## Response `200`

Ok

- unknown

---

[API](https://skmtc.net/gleap/apis/gleap-server.md) · [All operations](https://skmtc.net/gleap/apis/gleap-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gleap/gleap-server/revisions/2bfe054193b5/schema)
