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.
Precondition RequiredIf-Match header required 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 not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in HTTP
Where this error sits
Origin: Network. Errors that are often confused with or caused by this one (click to open):
🧠 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.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 8 Oct 2026