---
title: "Create Pr From Investigation"
method: POST
path: "/api/create-pr/from-investigation"
tags: ["create-pr"]
---

# Create Pr From Investigation

`POST /api/create-pr/from-investigation`

## Request

- Base URL: `https://api.deeptrace.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.deeptrace.com/api/create-pr/from-investigation`
- Auth: none declared

Create a PR from an investigation's recommended_pr data.

## Request body

- InvestigationCreatePRRequest: Request to create a PR from an investigation's recommended_pr.
  - `investigation_id` string, required
  - `repo` string, nullable
  - `change` string, nullable
  - `base_branch` string
  - `action_type` 'fix' | 'silence' | 'add_observability'

## Response `200`

Successful Response

- ApiCodeGenRouterCreatePRResponse: Response after kicking off PR creation.
  - `status` string, required
  - `task_id` string, required
  - `message` string, required
  - `target_repo` string, required

## Other responses

- `422`: Validation Error

---

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