What does HTTP status code 428 mean?
The 428 Precondition Required status code indicates that the server requires the request to be conditional (using headers like If-Match or If-Modified-Since).
When to use it in APIs
Used to prevent the “lost update” problem. The server refuses updates unless the client explicitly sends a version header constraint, forcing them to acknowledge the version state.
How it compares to other codes
- 412 Precondition Failed: Returned when the precondition check fails. 428 is returned when the precondition check was omitted entirely.