---
title: "Archive a pull request"
method: PUT
path: "/repos/{owner}/{repo}/pulls/{pull_number}/archive"
tags: ["pulls"]
---

# Archive a pull request

`PUT /repos/{owner}/{repo}/pulls/{pull_number}/archive`

Archives a pull request. Closes, locks, and marks the pull request as archived.
Only repository admins can archive pull requests.
Archived pull requests are hidden from non-admin users.

## Path parameters

- `owner` string, required
- `repo` string, required
- `pull_number` integer, required

## Response `204`

Response

## Other responses

- `403` — Forbidden
- `404` — Resource not found
- `422` — Validation failed, or the endpoint has been spammed.

## Changes

- **2026-04-20** (2022-11-28) `de37da78f522` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/github/apis/rest/changes/repos/:owner/:repo/pulls/:pull_number/archive/put.md)

---

[API](https://skmtc.dev/github/apis/rest.md) · [All operations](https://skmtc.dev/github/apis/rest/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/github/rest/revisions/e710bf6cb95b/schema)
