---
title: "Lock access to a document"
method: PUT
path: "/{judgmentUri}/lock"
tags: ["Writing"]
---

# Lock access to a document

`PUT /{judgmentUri}/lock`

## Request

- Base URL: `https://api.caselaw.nationalarchives.gov.uk/v1`
- URL: `https://api.caselaw.nationalarchives.gov.uk/v1/{judgmentUri}/lock`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/the-national-archives/apis/case-law-privileged-api/docs/:judgmentUri/lock/put.ts> (a function with typed inputs; its response is checked against the schema)

Locks edit access for a document for the current client. Returns the latest version of the locked document, alohg with the new lock state.

## Path parameters

- `judgmentUri` string, required

## Response `201`

A single judgment document, in Akoma Ntoso XML

## Other responses

- `403`: The document was already locked by another client

---

[API](https://skmtc.dev/the-national-archives/apis/case-law-privileged-api.md) - [All operations](https://skmtc.dev/the-national-archives/apis/case-law-privileged-api/llms.txt) - [OpenAPI document](https://skmtc.dev/the-national-archives/apis/case-law-privileged-api/revisions/78e91c464b05?raw)
