{"uid":"cap_JmmFEWWbDa3Pr9mCgPsAA","slug":"once-key-idempotency-claim-endpoint-7123ba51","name":"Once-Key Idempotency Claim Endpoint","description":"Atomic idempotency witness — claim an action exactly once, record its result, and replay that result to every later caller","url":"https://agentic-endpoints-testnet.oliver-835.workers.dev/once-key","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"ttl":{"type":"number","description":"Claim lifetime in seconds (default 86400)"},"lease_ttl":{"type":"number","description":"Seconds you have to call /once-key/complete before the claim is treated as abandoned and another caller may take it over. Omit to hold the claim for its full ttl."},"namespace":{"type":"string","description":"Isolation scope for the claimed key"},"action_key":{"type":"string","description":"Unique key to claim exactly once"},"payload_sha256":{"type":"string","description":"Optional hash of the payload for conflict detection"},"namespace_token":{"type":"string","description":"Owner token issued on the first claim in a namespace; required on every later request"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_r7chjmi0urnaWQOY81n9d","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x036CbD53842c5426634e7929541eC2318f3dCF7e","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Atomically claims a unique action key exactly once, preventing duplicate execution and replaying the recorded result to all subsequent callers","exampleAgentPrompt":"Claim the idempotency key 'send-invoice-2024-06-01-acme' in the namespace 'billing' with a 3600-second TTL and a 120-second lease so no other agent can trigger the same invoice send while I'm working on it.","exampleUseCases":[{"title":"Preventing duplicate payment dispatch","prompt":"Before I send the wire transfer for order #98234, claim the key 'wire-98234' in the 'payments' namespace with a 7200-second TTL and a 60-second lease so no other agent accidentally fires a second transfer for the same order."},{"title":"Exactly-once email notification in multi-agent pipeline","prompt":"I need to make sure only one agent sends the welcome email to user@example.com — can you claim the key 'welcome-email-user-12345' in namespace 'notifications' with a 24-hour TTL so every other agent that tries the same key just gets the already-recorded result?"},{"title":"Distributed task lock for scheduled job","prompt":"Claim the action key 'nightly-report-2024-07-15' in the 'reports' namespace with a 3600-second TTL and a 300-second lease so only one worker runs tonight's report generation even if multiple agents wake up at the same time."}],"resultDescription":"Returns either a successful claim record (indicating this caller now holds the lock) including a namespace_token for future requests, or replays the previously recorded result if the key was already claimed and completed — allowing safe retries without re-execution.","failureModes":["Key already claimed by another caller — returns the previously recorded result instead of a new claim","Missing or invalid namespace_token on a subsequent request to an existing namespace — returns 401/403","Lease expired before /once-key/complete was called — claim abandoned and key becomes reclaimable","Invalid or missing action_key — returns 400 bad request","payload_sha256 mismatch detected — returns conflict error to signal differing payloads for same key","Network timeout causing uncertainty about whether claim was registered — agent should retry and check replay response"],"whenToPreferThis":"Choose this endpoint when you need atomic exactly-once semantics for a side-effectful action in a distributed or multi-agent system — especially for payments, notifications, or task dispatch where duplicate execution is harmful. Prefer it over application-level deduplication when you need cross-agent coordination, replay of recorded results to late callers, and optional lease-based abandonment recovery.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-16T00:45:48.255Z","isFirstParty":false}