---
title: "Link Run Pull Request"
method: PUT
path: "/api/v1/runs/{id}/pull_request"
tags: ["Runs"]
---

# Link Run Pull Request

`PUT /api/v1/runs/{id}/pull_request`

Links or replaces the GitHub pull request association for a run without modifying the remote pull request.

## Path parameters

- `id` string, required

## Request body

- LinkRunPullRequestRequest — Request body for linking an existing GitHub pull request to a run.
  - `html_url` string, uri, required — GitHub pull request URL to associate with the run. Must use the form `https://github.com/{owner}/{repo}/pull/{number}`.

## Response `200`

Pull request linked

- PullRequestLink — Minimal GitHub pull request link associated with a run.
  - `owner` string, required
  - `repo` string, required
  - `number` integer, required
  - `html_url` string, uri, required — Computed GitHub web URL for the pull request.

## Other responses

- `400` — Pull request link request is invalid
- `404` — Run not found

---

[API](https://skmtc.net/fabro-sh/apis/fabro-run-api.md) · [All operations](https://skmtc.net/fabro-sh/apis/fabro-run-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fabro-sh/fabro-run-api/versions/bee030053823/schema)
