Sitelet https://funapi.dev/status/428

HTTP 428 Precondition Required

The server requires this request to be conditional — to carry If-Match or similar — so that a write cannot overwrite a change it has not seen.

Defined in RFC 6585 §3 — 428 Precondition Required · MDN reference

Where you meet HTTP 428 in production

APIs that enforce optimistic concurrency on every write: configuration stores, CMS records, collaborative documents — anywhere a lost update is expensive.

Why you would test it

Send a PUT with no If-Match and expect 428; send it with a stale ETag and expect 412. Testing both proves the server enforces optimistic concurrency rather than merely supporting it.

What your client should do about a 428

Read the resource first, take its ETag, and send it back in If-Match on the write. Do not invent an ETag or send If-Match: * just to get past the check — that disables the protection it exists for.

428 versus the codes it gets confused with

Endpoints that return 428

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

Questions about HTTP 428

What header satisfies a 428?
Usually If-Match with the ETag you last read. Some APIs also accept If-Unmodified-Since.
428 or 412?
428 for a missing precondition, 412 for a precondition that was present but no longer true.

Other client error codes

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

Last updated