---
title: "Select Patch Candidate"
method: POST
path: "/api/v2/issues/selectPatchCandidate"
tags: ["Issues"]
---

# Select Patch Candidate

`POST /api/v2/issues/selectPatchCandidate`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v2/issues/selectPatchCandidate`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Promote one patch candidate from a multi-variant regeneration (`issues.regeneratePatch` with `variantCount` > 1) into the issue patch and delete the remaining candidates. Candidate ids come from the issue detail response (`patchCandidates`). The promoted patch still requires approval before a pull request is created. Fails if the issue already has a patch.

## Request body

- object
  - `organizationId` string
  - `issueId` string, required
  - `candidateId` string, required: Id of the patch candidate to promote, from the issue detail `patchCandidates` array.

## Response `200`

Candidate promoted into the issue patch

- object
  - `ok` boolean, required

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api/revisions/126e9c80ba0d?raw)
