revision: a number that goes up by one on every change. Reads return it twice, in the body and as an ETag header:
If-Match. If nobody else changed it in the meantime, the write goes through and you get the new ETag. If someone did, you get 412 revision_conflict and nothing is overwritten.
If-Match accepts "4", W/"4" or a bare 4.
The conflict response
ETag: "5". Read the resource again, reapply your change on top, and send If-Match: "5".
Where it’s required
Missing a required
If-Match returns 428 precondition_required.
A few resources take the revision in the body instead of a header: PATCH /v1/webhooks/{endpoint_id} needs "revision", and PATCH /v1/webchat/widgets/{widget_id} accepts one. A stale revision there is also refused rather than overwriting.
Read, change, write
config in a PATCH replaces the whole draft config, so start from the config you read (as above) rather than sending only the changed field.