---
title: "Create Pr From Result"
method: POST
path: "/api/dedup-scan/results/{result_id}/create-pr"
tags: ["dedup-scan"]
---

# Create Pr From Result

`POST /api/dedup-scan/results/{result_id}/create-pr`

Create a PR to fix a dedup scan issue using the code gen agent.

## Path parameters

- `result_id` string, uuid, required

## Request body

- ApiDedupScanRouterCreatePRRequest — Request to create a PR from a dedup scan result.
  - `repo_name` string, nullable
  - `base_branch` string
  - `action_type` 'fix' | 'silence' | 'add_observability'

## Response `200`

Successful Response

- ApiDedupScanRouterCreatePRResponse — Response after kicking off PR creation.
  - `status` string, required
  - `task_id` string, nullable
  - `mode` string, nullable
  - `message` string, required
  - `target_repo` string, nullable
  - `action_type` string, nullable

## 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/3898f654afba/schema)
