---
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`

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.net/deeptrace/apis/fastapi.md) · [All operations](https://skmtc.net/deeptrace/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deeptrace/fastapi/versions/2e2a6de8aeda/schema)
