428 Precondition Required

The server requires a conditional request so a change cannot be applied against unknown or stale state.

All HTTP status codes

What does HTTP 428 mean?

An API may insist on If-Match before allowing an update. A 428 means the required condition was absent; 412 describes a condition that was supplied but failed. This policy helps prevent lost updates. The client needs to retain the server's validator, attach it to the change and handle a conflict if the representation changes before the write arrives.

An investigation example

Illustrative settings-update investigation
Response: 428 Precondition Required
Client submitted an update without If-Match.
Action: fetch the current settings and attach their validator.
Verify: a matching update succeeds and a stale version cannot overwrite a later change.

Common causes

  • An update endpoint requires If-Match but the caller sent no version condition.
  • An API enforces optimistic concurrency for shared or frequently edited resources.

Diagnose the response

Retrieve the current representation and use the required validator rather than disabling the protection or inventing a token.

  • Read the error contract to identify the required precondition. Do not guess a validator or use a wildcard solely to bypass the concurrency policy.
  • Retrieve the latest representation and its ETag, review the intended edit against that version and submit the condition the endpoint requires.
  • Handle a subsequent 412 as a real state change between reading and writing. Give the user a way to reconcile edits rather than retrying indefinitely.

What it means for website monitoring

Treat the conditional requirement as part of the API contract. Check client updates and concurrency handling when a previously working integration begins receiving 428.

Reference