# payperwork Box Key Wait (Long-Poll)

> payperwork Box Key Wait (Long-Poll) is a paid API for AI agents from payperwork.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-02).

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.

## Facts

- Endpoint: GET https://payperwork.app/box/:box/:key/wait?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/payperwork-box-key-wait-long-poll-ef988e21
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_L7HldifwJXzwFZfdeGR-D

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability payperwork-box-key-wait-long-poll-ef988e21
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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}.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/payperwork-box-key-wait-long-poll-ef988e21/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payperwork.app](https://www.zero.xyz/host/payperwork.app/llms.txt)
