---
title: "Request Investigation"
method: POST
path: "/api/v2/issues/requestInvestigation"
tags: ["Issues"]
---

# Request Investigation

`POST /api/v2/issues/requestInvestigation`

## Request

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

Request on-demand re-evaluation of one or more issues using larger models. Issues that already have a pending or in-progress investigation are skipped. Returns counts of created, skipped, and unauthorized investigations. A definitive verdict closes the issue and its linked ticket, so the caller needs permission to close every requested issue it can view (see the 403 response).

## Request body

- object
  - `issueIds` string[], required: One or more issue IDs to investigate
  - `organizationId` string: Organization ID (optional)
  - `context` string: Optional user-provided context to guide the investigation (e.g. "this endpoint is behind auth middleware")

## Response `200`

Investigation request results

- object
  - `created` number, required: Number of new investigations created
  - `skipped` number, required: Number of issues skipped because they already have a pending investigation
  - `unauthorized` number, required: Number of issue IDs that were not found or not accessible to the caller
  - `investigationIds` string[], required: IDs of all investigations (newly created and already pending)

## Other responses

- `403`: Re-investigation can close findings (a definitive not-exploitable or fixed verdict closes the issue and its linked ticket), so it needs permission to close findings. Returned when the caller acts as a person (a member API token, an MCP or OAuth client) without the Close Issues permission (ISSUE_EDIT_CLOSE) on the repository of at least one requested issue they can view. The whole request is refused and nothing is queued. Issues the caller cannot view take no part in this check: they are counted as unauthorized as before. Service tokens and organization admins are not refused.

---

[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)
