---
title: "Create a GitHub PR for the generated code fix"
method: POST
path: "/api/v1/code-engine/create-pr/{id}"
tags: ["CodeEngine"]
---

# Create a GitHub PR for the generated code fix

`POST /api/v1/code-engine/create-pr/{id}`

## Request

- Base URL: `http://localhost:5000/api/v1`
- URL: `http://localhost:5000/api/v1/api/v1/code-engine/create-pr/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/scrubbe/apis/scrubbe-api/docs/api/v1/code-engine/create-pr/:id/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` string, required

## Request body

- object
  - `repo` string, required: GitHub repo in owner/repo format
  - `baseBranch` string: Base branch to merge into (default: main)

---

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