HTTP 423 Locked

The resource is locked, and this request would need the lock it does not hold.

Defined in RFC 4918 §11.3 — 423 Locked · MDN reference

Where you meet HTTP 423 in production

WebDAV servers where files are checked out, document editors with exclusive editing, and APIs that lock a record during a long-running job.

Why you would test it

Test the client's reaction to a resource someone else is editing: does it retry blindly, or tell the user who holds the lock and for how long?

What your client should do about a 423

Do not hammer it. Wait for the lock to be released — the body often says by whom or until when — or ask for the lock first if the API supports it.

423 versus the codes it gets confused with

Endpoints that return 423

1 endpoint in this playground answers with 423. Every one is free, needs no signup, and can be called from the browser or with curl.

Questions about HTTP 423

Is 423 only for WebDAV?
It was defined by WebDAV, but any API with explicit locks can use it, and many do.
Pessimistic or optimistic locking?
423 belongs to pessimistic locking (an explicit lock). Optimistic locking with ETags answers 412 instead.

Other client error codes

All HTTP status codes · All 39 mock REST APIs · Getting started guide

Last updated