What is an If-Match header?
Makes the request conditional on the resource matching one of the given ETags, commonly used to avoid lost updates.
If-Match lets a client say 'only perform this update if the resource still has this exact ETag', which is how a well-built website's API protects against two people or processes overwriting each other's changes without realising it. It's a strong signal of a maturely built concurrency-aware API, and worth including in any monitoring that exercises write endpoints rather than just read-only checks.
Common use case
A document-editing API rejects a PUT with 412 Precondition Failed if the client's If-Match ETag no longer matches the current version, preventing one editor from silently overwriting another's changes.
Example
If-Match: "686897696a7c876b7e"History
Part of the original HTTP/1.1 specification, RFC 2068 (1997).
Did you know?
It's the backbone of optimistic concurrency control on the web - rather than locking a resource while it's being edited, it just checks at write time that nothing changed underneath you.