{"uid":"cap_zTPuGSeatNMZyQPDXZQPl","slug":"writerslogic-idempotency-registry-ba2174d1","name":"WritersLogic Idempotency Registry","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/idempotency-registry?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"op":{"enum":["begin","complete","abandon","get"],"type":"string"},"key":{"type":"string","pattern":"^[A-Za-z0-9_.:/@+-]{1,200}$","description":"Idempotency key, e.g. refund:ch_123:2026-11-04."},"owner":{"type":"string","maxLength":128,"minLength":1,"description":"Worker id; required for begin, complete and abandon."},"result":{"type":"object","properties":{"digest":{"type":"string","maxLength":128},"pointer":{"type":"string","maxLength":500},"summary":{"type":"string","maxLength":500}},"description":"complete: where the outcome lives (do not store payloads here).","additionalProperties":false},"tenantId":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$","description":"Required for API-key callers (namespaced as key:<tenantId>; keep it unguessable). Ignored when a wallet paid: the payer address is the tenant."},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,128}$","description":"Caller-chosen id for this mutation. A retry with the same id and same input returns the stored response (24 h) instead of applying twice; the same id with different input is rejected. Send one on every mutation you may retry: without it a retry is applied again (fleet-memory record appends a duplicate; a repeated spend-ledger commit or release answers NO_HOLD because the first call already took effect)."},"fingerprint":{"type":"string","maxLength":128,"minLength":1,"description":"Hash of the operation's identity fields; a later begin with a different fingerprint is refused."},"claimSeconds":{"type":"integer","maximum":3600,"minimum":1,"description":"How long a begin claim lasts; default 300."},"retentionHours":{"type":"integer","maximum":168,"minimum":1,"description":"How long a completed key is remembered; default 24."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Sz9SH6E0mGY0YVdyKv9cO","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Provides distributed idempotency coordination for multi-agent workflows via begin/complete/abandon/get operations on named keys with claim-based locking and result storage.","exampleAgentPrompt":"Before processing this refund for charge ch_123, check the idempotency registry with key 'refund:ch_123:2026-11-04' using worker ID 'worker-7' and a 5-minute claim — if another agent is already handling it or it's already done, tell me the status and any stored result pointer.","exampleUseCases":[{"title":"Prevent duplicate payment processing","prompt":"Before we send this payout for order ord_789, register a begin claim on the idempotency registry with key 'payout:ord_789' and worker 'payment-agent-3' for 300 seconds — if it's already completed or another worker is mid-flight, return that status so we don't double-pay."},{"title":"Mark long-running task as done","prompt":"The data export job for key 'export:report-2024-Q4:tenant-acme' just finished — call complete on the idempotency registry with worker 'exporter-1' and store the result pointer 's3://bucket/report-2024-Q4.csv' so any retry knows it's already done."},{"title":"Release stuck claim after crash","prompt":"Worker 'email-agent-2' crashed mid-send for key 'email:welcome:user_555' — call abandon on the idempotency registry with that key and owner so another agent can retry sending the welcome email without being blocked."}],"resultDescription":"Returns a JSON object with a status field indicating one of: 'proceed' (claim granted, caller may execute), 'wait' (another owner holds the claim), 'already_completed' (includes stored result pointer, digest, and summary), or 'fingerprint_mismatch' (key exists with a different fingerprint). For 'get' operations, returns the current state of the key including owner, expiry, and result if completed.","failureModes":["fingerprint_mismatch: same key submitted with a different fingerprint hash — operation rejected","wait: another worker currently holds the claim — caller must poll or back off","claim expiry: claim lapses after claimSeconds if complete/abandon not called — another worker may then proceed","invalid key pattern: key contains disallowed characters or exceeds 200 chars — validation error","missing required fields: owner not provided for begin/complete/abandon — rejected","requestId conflict: same requestId reused with different input within 24h — rejected","tenant not authorized: tenantId missing or mismatched for API-key callers"],"whenToPreferThis":"Use this endpoint when coordinating side-effecting operations (payments, emails, external API writes) across multiple parallel agent instances or retries where exactly-once execution is required. Prefer this over application-level deduplication when agents may crash mid-flight, when claims need automatic expiry to avoid permanent locks, or when you need a distributed shared record of completion that any worker in a fleet can check. Not needed for pure read operations or idempotent-by-nature GET requests.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-18T18:41:05.448Z","isFirstParty":false,"canonicalSlug":"writerslogic-idempotency-registry-ba2174d1"}