---
title: "Lock an issue"
method: PUT
path: "/repos/{owner}/{repo}/issues/{issue_number}/lock"
tags: ["issues"]
---

# Lock an issue

`PUT /repos/{owner}/{repo}/issues/{issue_number}/lock`

Users with push access can lock an issue or pull request's conversation.

Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."

## Path parameters

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

## Request body

- object, nullable
  - `lock_reason` 'off-topic' | 'too heated' | 'resolved' | 'spam' — The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: * `off-topic` * `too heated` * `resolved` * `spam`

## Response `204`

Response

## Other responses

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

---

[API](https://skmtc.net/github/apis/github-v3-rest-api.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api/versions/a367f7028301/schema)
