---
title: "Lock a post from being edited"
method: PUT
path: "/posts/{id}/locked.json"
tags: ["Posts"]
---

# Lock a post from being edited

`PUT /posts/{id}/locked.json`

## Path parameters

- `id` string, required

## Headers

- `Api-Key` string, required
- `Api-Username` string, required

## Request body

- object
  - `locked` string, required — Whether to lock the post (true/false)

## Response `200`

post updated

- object
  - `locked` boolean, required — Whether the post is locked

---

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