---
title: "Link an existing ticket to findings"
method: POST
path: "/api/v1/deployments/{deploymentId}/tickets/link"
tags: ["TicketingService"]
---

# Link an existing ticket to findings

`POST /api/v1/deployments/{deploymentId}/tickets/link`

Link an existing external ticket (e.g. Jira) to one or more Semgrep findings by providing the ticket URL and a list of finding IDs. This does not create a ticket in your issue tracker — it only records the association in Semgrep. If a finding is already linked to a different ticket, the existing link is replaced. Requires a configured ticketing integration.

## Path parameters

- `deploymentId` string, required — Deployment ID. Can be found at /deployments, or in your Settings in the web UI.

## Request body

- ProtosOpenapiV1LinkTicketRequest — Link ticket request
  - `deploymentId` string — Deployment ID. Can be found at /deployments, or in your Settings in the web UI.
  - `issue_ids` string[], required — An array of Semgrep finding IDs to link the ticket to.
  - `ticket_url` string, required — The URL of the external ticket to link (e.g. https://myorg.atlassian.net/browse/SEC-123).

## Response `200`

OK

- ProtosOpenapiV1LinkTicketResponse
  - `external_slug` string — The external slug identifier for the ticket (e.g. SEC-123)
  - `linked_issue_ids` string[] — List of finding IDs that were successfully linked to the ticket
  - `replaced_issue_ids` string[] — List of finding IDs where an existing ticket link was replaced
  - `ticket_id` integer — The internal ID of the linked ticket record
  - `ticket_url` string — The URL of the linked ticket

---

[API](https://skmtc.net/semgrep/apis/semgrep-web-app.md) · [All operations](https://skmtc.net/semgrep/apis/semgrep-web-app/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/semgrep/semgrep-web-app/revisions/6483eeecd582/schema)
