HTTP 428 Precondition Required
The server requires a conditional request (If-Match / If-Unmodified-Since) to prevent lost updates, and you didn’t send one.
Seen on:
REST API
Meaning
Where 412 means your condition failed, 428 means you sent no condition at all. APIs that enforce optimistic concurrency (some Microsoft, GitHub-style and custom REST APIs) refuse unconditional PUT/PATCH/DELETE so two clients can’t silently overwrite each other.
Common causes
- PUT/PATCH/DELETE sent without
If-Match - Client discarded the ETag from the earlier GET
- Proxy/CDN stripped the ETag or If-Match header
⚡ Quick fix
- GET the resource first and keep its
ETagheader - Send
If-Match: <etag>on the update - Make sure proxies forward ETag/If-Match unchanged
Detailed fix by platform
REST API
- Conditional update:bash
ETAG=$(curl -sI https://api.example.com/docs/42 | awk -F': ' 'tolower($1)=="etag"{print $2}' | tr -d '\r') curl -X PUT https://api.example.com/docs/42 -H "If-Match: $ETAG" -H 'Content-Type: application/json' -d '{"title":"New"}'
How to diagnose
- Headers — Did the request include If-Match?
- ETag — Did the GET response include one?
- Proxies — Is any hop stripping these headers?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026