# Atomically write (or release) a key only if its current value equals `expected` - the coordination primitive for distributed locks and optimistic concurrency across agents. Acquire a lock: expected=null + a value + ttlSeconds. Release it: expected=<your token> with no value (deletes on match). Update safely: expected=<old>, value=<new>. Returns whether it swapped and the current value.

Verified by [Verified x402](https://verifiedx402.com).

- URL: https://agent402.tools/api/memory/cas
- Category: other
- Network: eip155:42220
- Advertised price: 1000
- Last checked: 2026-11-25T16:47:55.043Z
- Score: 92.0

This listing passed a recent check: the endpoint is live and the advertised price and terms match. Check before paying, then pay the API yourself.

- HTML: https://verifiedx402.com/v/69a4102cc29fd45380c33a554eef78bc
- Badge: https://verifiedx402.com/badge.svg?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fmemory%2Fcas
- Independent check: [vet402](https://vet402.com/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fmemory%2Fcas)

```json
{
  "checkedAt": null,
  "httpStatus": null,
  "latencyMs": null,
  "priceMatches": null,
  "payToMatches": null
}
```
