{"uid":"cap_L7HldifwJXzwFZfdeGR-D","slug":"payperwork-box-key-wait-long-poll-ef988e21","name":"payperwork Box Key Wait (Long-Poll)","description":"Block until {key} in box {box} has a seq greater than since (query since=, default 0), up to timeout= seconds (max 25). Returns the item, or {\"value\":null,\"timed_out\":true}.","url":"https://payperwork.app/box/:box/:key/wait?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"pathParams":{"type":"object","required":["box","key"],"properties":{"box":{"type":"string"},"key":{"type":"string"}}},"queryParams":{"type":"object","properties":{"since":{"type":"integer"},"timeout":{"type":"number"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.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_-GwaBnZfqS6vY9wEBmUEw","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Long-polls until a specific key in a named box has been updated (seq > since), returning the new item or a timeout signal after up to 25 seconds.","exampleAgentPrompt":"Wait up to 20 seconds for an update to the key 'task-result' in box 'my-workflow-box', starting from sequence 5 — return whatever value appears or let me know if it times out.","exampleUseCases":[{"title":"Agent-to-agent result handoff","prompt":"Block and wait for the key 'image-ready' in box 'pipeline-jobs' to update past sequence 3 — give me up to 15 seconds before timing out."},{"title":"Human approval gate in workflow","prompt":"Wait for the key 'approval' in box 'order-review' to get a new value after sequence 0, holding for up to 25 seconds so I can see the human's decision."},{"title":"Async task completion check","prompt":"Poll the key 'report-output' in box 'analytics-tasks' until its sequence is greater than 2, waiting at most 10 seconds, then give me the result."}],"resultDescription":"Returns a JSON object containing the current value of the key and its sequence number if an update occurred within the timeout window, or {\"value\":null,\"timed_out\":true} if no update arrived in time.","failureModes":["Timeout reached before key updates — returns {\"value\":null,\"timed_out\":true}","Invalid or nonexistent box/key combination — may return null value immediately","timeout parameter exceeds server maximum of 25 seconds — clamped or rejected","Missing required path parameters (box or key) — HTTP 400 or 404","Payment failure via x402 protocol — HTTP 402 response before data is returned"],"whenToPreferThis":"Use this endpoint when an agent needs to synchronize with another process or agent by waiting for a shared key to be written or updated — ideal for event-driven workflows, human-in-the-loop approval gates, or inter-agent result passing where a push/subscribe mechanism isn't available. It is preferable to busy-polling because it holds the connection open server-side and only returns when data is ready or the timeout expires.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T12:30:44.747Z","isFirstParty":false,"canonicalSlug":"payperwork-box-key-wait-long-poll-ef988e21"}