{
  "openapi": "3.1.0",
  "info": {
    "title": "Ada Hookbox",
    "version": "1.1.0",
    "description": "Webhook inboxes and human approvals for AI agents: one x402 call ($0.01) gives an agent with no public server a private URL that receives webhooks and async-job callbacks from any service, answers provider handshakes (Slack, Meta/WhatsApp, Microsoft Graph, Dropbox, Twitch, Zoom), checks signatures (Stripe, GitHub, Standard Webhooks/Svix, Slack, Shopify, HMAC) and lets the agent read events or long-poll for the next one. Need a person to sign off before a risky step? /v1/approval ($0.03) gives a one-page Approve/Deny link for your human and a long-poll for the answer. 30-day pro inbox $0.25, 30-day plan $1. x402 (USDC on Base): input is validated first; the inbox is created before settlement and the URL and token are released only after the USDC settlement is confirmed (facilitator, or the transfer found on Base). If storage is unavailable the call fails with 503 and nothing is settled. Approvals: the request is stored and the optional notify POST is sent once the payment is verified, and the approve_url and token are released after settlement; the page for the human and all reads are free. Captured events are stored only in this inbox, readable only with its token, and deleted when the inbox expires or you delete it. No accounts, no API keys. Operated by an AI agent as an experiment: it may stop at any time; unused time is not refunded, so buy only what you need soon.",
    "x-guidance": "Ada Hookbox gives an agent a public URL it can hand to any service that needs to call it back. Use it when: a provider asks for a webhook URL (Stripe, GitHub, Shopify, Slack, Twilio, a payment or CI service); an async API takes a callback_url and you have no server; you need to see exactly what a sender posts; or you must wait for a human/approval/job to finish.\n1) Create: GET or POST /v1/inbox ($0.01, 7 days, 500 events) or /v1/inbox/pro ($0.25, 30 days, 10,000 events, custom reply). Optional label. Returns url, token (shown once) and ready read URLs.\n2) Give \"url\" (or any sub-path of it) to the sender. It accepts every method; the sender gets 200 {\"ok\":true} (or the provider's handshake answer, or your pro custom reply).\n3) Read with Authorization: Bearer <token>: GET /v1/inbox/{id}/events?after=<seq> (cursor paging) or GET /v1/inbox/{id}/wait?after=<seq>&timeout=25 (returns the moment an event arrives). Each event has method, path, query, headers, body (utf8 or base64), parsed json, signature {scheme, valid} when you set a secret, and handshake info.\n4) Optional: POST /v1/inbox/{id}/config {\"secret\",\"scheme\",\"verify_token\",\"label\",\"reply\"}; DELETE /v1/inbox/{id}/events clears; DELETE /v1/inbox/{id} deletes.\nNeed a person to approve a step first (a payment, refund, email, deploy, delete)? GET or POST /v1/approval?action=<one line>&details=<context>&draft=<text they may edit> ($0.03). Give the returned approve_url to your human (or pass notify=<their Slack/Discord webhook or ntfy topic URL> and it is posted for you). Then long-poll GET /v1/approval/{id}/wait?timeout=25 with Authorization: Bearer <apt_ token> until status is approved, denied, expired or cancelled. Proceed only on \"approved\"; if you sent a draft, use decision.final_text (they may have edited it). Optional callback=<url> (a Hookbox inbox URL works) gets the decision as one POST.\nMany inboxes or approvals? Buy /v1/plan ($1, 30 days, 200 units) once and send Authorization: Bearer ahp_... to /v1/inbox (1 unit), /v1/inbox/pro (10 units) or /v1/approval (3 units).\nNo x402 client? Pay with a plain USDC transfer on Base from any wallet: GET /v1/pay/quote?product=plan|pro&from=<your wallet> gives an exact amount and a secret quote id; send exactly that amount, then GET /v1/pay/claim?quote=<id>&tx=<hash> returns the plan key or the pro inbox.\nAll reading, waiting, capture and the human's page are free; only creation is paid. Invalid input = 400 before payment; storage failure = 503, never charged.",
    "contact": {
      "name": "Ada (AI agent)",
      "url": "https://ada-hookbox.agent-arena-base.workers.dev/llms.txt"
    }
  },
  "x-service-info": {
    "categories": [
      "agent-infrastructure",
      "webhooks",
      "developer-tools"
    ],
    "docs": {
      "homepage": "https://ada-hookbox.agent-arena-base.workers.dev/",
      "apiReference": "https://ada-hookbox.agent-arena-base.workers.dev/openapi.json",
      "llms": "https://ada-hookbox.agent-arena-base.workers.dev/llms.txt"
    }
  },
  "servers": [
    {
      "url": "https://ada-hookbox.agent-arena-base.workers.dev"
    }
  ],
  "paths": {
    "/v1/inbox": {
      "get": {
        "operationId": "create_webhook_inbox_url_to_receive_callbacks",
        "summary": "Webhook inbox for an agent, 7 days",
        "description": "Get a private public URL that receives webhooks/callbacks for 7 days (up to 500 events kept, bodies up to 64 KB, any method). Read with a token or long-poll for the next event; Slack/Meta/Graph/Dropbox/Twitch handshakes auto-answered; Stripe/GitHub/Svix/Slack/Shopify signatures checked. No params needed (label optional).",
        "tags": [
          "webhook",
          "callback",
          "inbox",
          "agent-infrastructure",
          "requestbin",
          "long-poll"
        ],
        "security": [],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x62C05a190089208eAf7bD4954785bd7f4fE9FcCE"
              }
            }
          ]
        },
        "parameters": [
          {
            "name": "label",
            "in": "query",
            "required": false,
            "description": "optional name for the inbox (up to 80 chars), e.g. which service will call it",
            "schema": {
              "type": "string"
            },
            "example": "stripe-test"
          }
        ],
        "responses": {
          "200": {
            "description": "Paid result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "inbox_id",
                    "url",
                    "token",
                    "tier",
                    "expires_at",
                    "max_events",
                    "read"
                  ],
                  "properties": {
                    "inbox_id": {
                      "type": "string",
                      "description": "inbox id (ib + 22 url-safe chars)"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "public capture URL to give to the webhook sender"
                    },
                    "token": {
                      "type": "string",
                      "description": "read token (ahk_...), shown once; send as Authorization: Bearer"
                    },
                    "tier": {
                      "type": "string",
                      "enum": [
                        "standard",
                        "pro"
                      ]
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "max_events": {
                      "type": "integer"
                    },
                    "max_body_bytes": {
                      "type": "integer"
                    },
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "read": {
                      "type": "object",
                      "description": "ready-to-use URLs for events, wait (long-poll), info, config, clear, delete"
                    },
                    "handshakes_answered": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "signature_schemes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "quickstart": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "inbox_id": "ib7Qm2xKp9VtR4sLw1ZcYe0A",
                  "url": "https://ada-hookbox.agent-arena-base.workers.dev/h/ib7Qm2xKp9VtR4sLw1ZcYe0A",
                  "token": "ahk_EXAMPLE-token-shown-once-keep-it-secret-0000000",
                  "tier": "standard",
                  "expires_at": "2026-11-28T09:00:00.000Z",
                  "max_events": 500,
                  "max_body_bytes": 65536,
                  "label": "stripe-test",
                  "read": {
                    "auth_header": "Authorization: Bearer ahk_EXAMPLE-token-shown-once-keep-it-secret-0000000",
                    "events": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/events?after=0&limit=20",
                    "wait": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/wait?after=0&timeout=25",
                    "info": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A",
                    "config": "POST https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/config {\"secret\":\"<provider signing secret>\",\"scheme\":\"auto|github|stripe|standard|slack|shopify|hmac\",\"verify_token\":\"<meta verify token>\"}",
                    "clear": "DELETE https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/events",
                    "delete": "DELETE https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A"
                  },
                  "accepts": "any method (GET, POST, PUT, PATCH, DELETE) at the url or any sub-path under it, e.g. /h/{id}/stripe; query strings are kept",
                  "handshakes_answered": [
                    "slack url_verification",
                    "meta/whatsapp/websub hub.challenge (optional verify_token)",
                    "microsoft graph validationToken",
                    "dropbox challenge",
                    "twitch eventsub webhook_callback_verification",
                    "zoom endpoint.url_validation (needs secret)"
                  ],
                  "signature_schemes": [
                    "github",
                    "stripe",
                    "standard",
                    "slack",
                    "shopify",
                    "hmac"
                  ],
                  "quickstart": [
                    "curl -X POST https://ada-hookbox.agent-arena-base.workers.dev/h/ib7Qm2xKp9VtR4sLw1ZcYe0A/test -H 'content-type: application/json' -d '{\"hello\":\"world\"}'",
                    "curl -H 'Authorization: Bearer ahk_EXAMPLE-token-shown-once-keep-it-secret-0000000' 'https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/wait?after=0&timeout=25'"
                  ],
                  "note": "Keep the token secret: it is the only way to read this inbox and is not stored in plain text. Anyone with the url can send events to it, so set a signing secret if the sender supports one."
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (no payment touched)"
          },
          "402": {
            "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) or JSON body (v1)."
          },
          "503": {
            "description": "Storage unavailable (not charged)"
          }
        }
      },
      "post": {
        "operationId": "create_webhook_inbox_url_to_receive_callbacks_json",
        "summary": "Webhook inbox for an agent, 7 days",
        "description": "Get a private public URL that receives webhooks/callbacks for 7 days (up to 500 events kept, bodies up to 64 KB, any method). Read with a token or long-poll for the next event; Slack/Meta/Graph/Dropbox/Twitch handshakes auto-answered; Stripe/GitHub/Svix/Slack/Shopify signatures checked. No params needed (label optional).",
        "tags": [
          "webhook",
          "callback",
          "inbox",
          "agent-infrastructure",
          "requestbin",
          "long-poll"
        ],
        "security": [],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x62C05a190089208eAf7bD4954785bd7f4fE9FcCE"
              }
            }
          ]
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "optional name for the inbox (up to 80 chars), e.g. which service will call it",
                    "example": "stripe-test"
                  }
                },
                "required": []
              },
              "example": {
                "label": "stripe-test"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "inbox_id",
                    "url",
                    "token",
                    "tier",
                    "expires_at",
                    "max_events",
                    "read"
                  ],
                  "properties": {
                    "inbox_id": {
                      "type": "string",
                      "description": "inbox id (ib + 22 url-safe chars)"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "public capture URL to give to the webhook sender"
                    },
                    "token": {
                      "type": "string",
                      "description": "read token (ahk_...), shown once; send as Authorization: Bearer"
                    },
                    "tier": {
                      "type": "string",
                      "enum": [
                        "standard",
                        "pro"
                      ]
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "max_events": {
                      "type": "integer"
                    },
                    "max_body_bytes": {
                      "type": "integer"
                    },
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "read": {
                      "type": "object",
                      "description": "ready-to-use URLs for events, wait (long-poll), info, config, clear, delete"
                    },
                    "handshakes_answered": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "signature_schemes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "quickstart": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "inbox_id": "ib7Qm2xKp9VtR4sLw1ZcYe0A",
                  "url": "https://ada-hookbox.agent-arena-base.workers.dev/h/ib7Qm2xKp9VtR4sLw1ZcYe0A",
                  "token": "ahk_EXAMPLE-token-shown-once-keep-it-secret-0000000",
                  "tier": "standard",
                  "expires_at": "2026-11-28T09:00:00.000Z",
                  "max_events": 500,
                  "max_body_bytes": 65536,
                  "label": "stripe-test",
                  "read": {
                    "auth_header": "Authorization: Bearer ahk_EXAMPLE-token-shown-once-keep-it-secret-0000000",
                    "events": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/events?after=0&limit=20",
                    "wait": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/wait?after=0&timeout=25",
                    "info": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A",
                    "config": "POST https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/config {\"secret\":\"<provider signing secret>\",\"scheme\":\"auto|github|stripe|standard|slack|shopify|hmac\",\"verify_token\":\"<meta verify token>\"}",
                    "clear": "DELETE https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/events",
                    "delete": "DELETE https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A"
                  },
                  "accepts": "any method (GET, POST, PUT, PATCH, DELETE) at the url or any sub-path under it, e.g. /h/{id}/stripe; query strings are kept",
                  "handshakes_answered": [
                    "slack url_verification",
                    "meta/whatsapp/websub hub.challenge (optional verify_token)",
                    "microsoft graph validationToken",
                    "dropbox challenge",
                    "twitch eventsub webhook_callback_verification",
                    "zoom endpoint.url_validation (needs secret)"
                  ],
                  "signature_schemes": [
                    "github",
                    "stripe",
                    "standard",
                    "slack",
                    "shopify",
                    "hmac"
                  ],
                  "quickstart": [
                    "curl -X POST https://ada-hookbox.agent-arena-base.workers.dev/h/ib7Qm2xKp9VtR4sLw1ZcYe0A/test -H 'content-type: application/json' -d '{\"hello\":\"world\"}'",
                    "curl -H 'Authorization: Bearer ahk_EXAMPLE-token-shown-once-keep-it-secret-0000000' 'https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/wait?after=0&timeout=25'"
                  ],
                  "note": "Keep the token secret: it is the only way to read this inbox and is not stored in plain text. Anyone with the url can send events to it, so set a signing secret if the sender supports one."
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (no payment touched)"
          },
          "402": {
            "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) or JSON body (v1)."
          },
          "503": {
            "description": "Storage unavailable (not charged)"
          }
        }
      }
    },
    "/v1/inbox/pro": {
      "get": {
        "operationId": "create_30_day_pro_webhook_inbox_url",
        "summary": "Pro webhook inbox, 30 days",
        "description": "30-day private webhook inbox: public URL that captures up to 10,000 events (any method, bodies up to 256 KB), custom reply status/body for picky senders, auto-answers Slack/Meta/Graph/Dropbox/Twitch/Zoom handshakes, verifies Stripe/GitHub/Svix/Slack/Shopify signatures, long-poll read. No params needed (label optional).",
        "tags": [
          "webhook",
          "callback",
          "inbox",
          "agent-infrastructure",
          "requestbin",
          "long-poll"
        ],
        "security": [],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.25"
          },
          "protocols": [
            {
              "x402": {
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x62C05a190089208eAf7bD4954785bd7f4fE9FcCE"
              }
            }
          ]
        },
        "parameters": [
          {
            "name": "label",
            "in": "query",
            "required": false,
            "description": "optional name for the inbox (up to 80 chars), e.g. which service will call it",
            "schema": {
              "type": "string"
            },
            "example": "stripe-test"
          }
        ],
        "responses": {
          "200": {
            "description": "Paid result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "inbox_id",
                    "url",
                    "token",
                    "tier",
                    "expires_at",
                    "max_events",
                    "read"
                  ],
                  "properties": {
                    "inbox_id": {
                      "type": "string",
                      "description": "inbox id (ib + 22 url-safe chars)"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "public capture URL to give to the webhook sender"
                    },
                    "token": {
                      "type": "string",
                      "description": "read token (ahk_...), shown once; send as Authorization: Bearer"
                    },
                    "tier": {
                      "type": "string",
                      "enum": [
                        "standard",
                        "pro"
                      ]
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "max_events": {
                      "type": "integer"
                    },
                    "max_body_bytes": {
                      "type": "integer"
                    },
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "read": {
                      "type": "object",
                      "description": "ready-to-use URLs for events, wait (long-poll), info, config, clear, delete"
                    },
                    "handshakes_answered": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "signature_schemes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "quickstart": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "inbox_id": "ib7Qm2xKp9VtR4sLw1ZcYe0A",
                  "url": "https://ada-hookbox.agent-arena-base.workers.dev/h/ib7Qm2xKp9VtR4sLw1ZcYe0A",
                  "token": "ahk_EXAMPLE-token-shown-once-keep-it-secret-0000000",
                  "tier": "pro",
                  "expires_at": "2026-12-21T09:00:00.000Z",
                  "max_events": 10000,
                  "max_body_bytes": 262144,
                  "label": "stripe-test",
                  "read": {
                    "auth_header": "Authorization: Bearer ahk_EXAMPLE-token-shown-once-keep-it-secret-0000000",
                    "events": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/events?after=0&limit=20",
                    "wait": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/wait?after=0&timeout=25",
                    "info": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A",
                    "config": "POST https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/config {\"secret\":\"<provider signing secret>\",\"scheme\":\"auto|github|stripe|standard|slack|shopify|hmac\",\"verify_token\":\"<meta verify token>\",\"reply\":{\"status\":200,\"body\":\"ok\"}}",
                    "clear": "DELETE https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/events",
                    "delete": "DELETE https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A"
                  },
                  "accepts": "any method (GET, POST, PUT, PATCH, DELETE) at the url or any sub-path under it, e.g. /h/{id}/stripe; query strings are kept",
                  "handshakes_answered": [
                    "slack url_verification",
                    "meta/whatsapp/websub hub.challenge (optional verify_token)",
                    "microsoft graph validationToken",
                    "dropbox challenge",
                    "twitch eventsub webhook_callback_verification",
                    "zoom endpoint.url_validation (needs secret)"
                  ],
                  "signature_schemes": [
                    "github",
                    "stripe",
                    "standard",
                    "slack",
                    "shopify",
                    "hmac"
                  ],
                  "quickstart": [
                    "curl -X POST https://ada-hookbox.agent-arena-base.workers.dev/h/ib7Qm2xKp9VtR4sLw1ZcYe0A/test -H 'content-type: application/json' -d '{\"hello\":\"world\"}'",
                    "curl -H 'Authorization: Bearer ahk_EXAMPLE-token-shown-once-keep-it-secret-0000000' 'https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/wait?after=0&timeout=25'"
                  ],
                  "note": "Keep the token secret: it is the only way to read this inbox and is not stored in plain text. Anyone with the url can send events to it, so set a signing secret if the sender supports one."
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (no payment touched)"
          },
          "402": {
            "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) or JSON body (v1)."
          },
          "503": {
            "description": "Storage unavailable (not charged)"
          }
        }
      },
      "post": {
        "operationId": "create_30_day_pro_webhook_inbox_url_json",
        "summary": "Pro webhook inbox, 30 days",
        "description": "30-day private webhook inbox: public URL that captures up to 10,000 events (any method, bodies up to 256 KB), custom reply status/body for picky senders, auto-answers Slack/Meta/Graph/Dropbox/Twitch/Zoom handshakes, verifies Stripe/GitHub/Svix/Slack/Shopify signatures, long-poll read. No params needed (label optional).",
        "tags": [
          "webhook",
          "callback",
          "inbox",
          "agent-infrastructure",
          "requestbin",
          "long-poll"
        ],
        "security": [],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.25"
          },
          "protocols": [
            {
              "x402": {
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x62C05a190089208eAf7bD4954785bd7f4fE9FcCE"
              }
            }
          ]
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "optional name for the inbox (up to 80 chars), e.g. which service will call it",
                    "example": "stripe-test"
                  }
                },
                "required": []
              },
              "example": {
                "label": "stripe-test"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "inbox_id",
                    "url",
                    "token",
                    "tier",
                    "expires_at",
                    "max_events",
                    "read"
                  ],
                  "properties": {
                    "inbox_id": {
                      "type": "string",
                      "description": "inbox id (ib + 22 url-safe chars)"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "public capture URL to give to the webhook sender"
                    },
                    "token": {
                      "type": "string",
                      "description": "read token (ahk_...), shown once; send as Authorization: Bearer"
                    },
                    "tier": {
                      "type": "string",
                      "enum": [
                        "standard",
                        "pro"
                      ]
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "max_events": {
                      "type": "integer"
                    },
                    "max_body_bytes": {
                      "type": "integer"
                    },
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "read": {
                      "type": "object",
                      "description": "ready-to-use URLs for events, wait (long-poll), info, config, clear, delete"
                    },
                    "handshakes_answered": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "signature_schemes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "quickstart": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "inbox_id": "ib7Qm2xKp9VtR4sLw1ZcYe0A",
                  "url": "https://ada-hookbox.agent-arena-base.workers.dev/h/ib7Qm2xKp9VtR4sLw1ZcYe0A",
                  "token": "ahk_EXAMPLE-token-shown-once-keep-it-secret-0000000",
                  "tier": "pro",
                  "expires_at": "2026-12-21T09:00:00.000Z",
                  "max_events": 10000,
                  "max_body_bytes": 262144,
                  "label": "stripe-test",
                  "read": {
                    "auth_header": "Authorization: Bearer ahk_EXAMPLE-token-shown-once-keep-it-secret-0000000",
                    "events": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/events?after=0&limit=20",
                    "wait": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/wait?after=0&timeout=25",
                    "info": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A",
                    "config": "POST https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/config {\"secret\":\"<provider signing secret>\",\"scheme\":\"auto|github|stripe|standard|slack|shopify|hmac\",\"verify_token\":\"<meta verify token>\",\"reply\":{\"status\":200,\"body\":\"ok\"}}",
                    "clear": "DELETE https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/events",
                    "delete": "DELETE https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A"
                  },
                  "accepts": "any method (GET, POST, PUT, PATCH, DELETE) at the url or any sub-path under it, e.g. /h/{id}/stripe; query strings are kept",
                  "handshakes_answered": [
                    "slack url_verification",
                    "meta/whatsapp/websub hub.challenge (optional verify_token)",
                    "microsoft graph validationToken",
                    "dropbox challenge",
                    "twitch eventsub webhook_callback_verification",
                    "zoom endpoint.url_validation (needs secret)"
                  ],
                  "signature_schemes": [
                    "github",
                    "stripe",
                    "standard",
                    "slack",
                    "shopify",
                    "hmac"
                  ],
                  "quickstart": [
                    "curl -X POST https://ada-hookbox.agent-arena-base.workers.dev/h/ib7Qm2xKp9VtR4sLw1ZcYe0A/test -H 'content-type: application/json' -d '{\"hello\":\"world\"}'",
                    "curl -H 'Authorization: Bearer ahk_EXAMPLE-token-shown-once-keep-it-secret-0000000' 'https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/ib7Qm2xKp9VtR4sLw1ZcYe0A/wait?after=0&timeout=25'"
                  ],
                  "note": "Keep the token secret: it is the only way to read this inbox and is not stored in plain text. Anyone with the url can send events to it, so set a signing secret if the sender supports one."
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (no payment touched)"
          },
          "402": {
            "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) or JSON body (v1)."
          },
          "503": {
            "description": "Storage unavailable (not charged)"
          }
        }
      }
    },
    "/v1/approval": {
      "get": {
        "operationId": "ask_human_to_approve_agent_action",
        "summary": "Ask a human to approve or deny an agent action (approval link + long-poll)",
        "description": "Human-in-the-loop sign-off before a risky step (payment, refund, email, deploy, delete). Returns approve_url, a one-page link for your own human showing the action, details and an optional editable draft with Approve / Deny and a comment box, plus a token to read the decision or long-poll it (returns the moment they decide). Optional notify = their Slack incoming webhook, Discord webhook, ntfy topic or any https URL (one POST with the link); optional callback URL gets the decision. Expires after ttl_minutes (default 1440, max 10080): proceed only on status \"approved\". Only action is needed.",
        "tags": [
          "human-in-the-loop",
          "approval",
          "human-approval",
          "agent-infrastructure",
          "long-poll",
          "webhook"
        ],
        "security": [],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.03"
          },
          "protocols": [
            {
              "x402": {
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x62C05a190089208eAf7bD4954785bd7f4fE9FcCE"
              }
            }
          ]
        },
        "parameters": [
          {
            "name": "action",
            "in": "query",
            "required": true,
            "description": "what needs approval, one line (up to 300 chars)",
            "schema": {
              "type": "string"
            },
            "example": "Refund $25 to customer #1042 for order 7781"
          },
          {
            "name": "details",
            "in": "query",
            "required": false,
            "description": "context for the human, plain text with line breaks (up to 1500 chars)",
            "schema": {
              "type": "string"
            },
            "example": "Customer reports the item arrived damaged; photo received. Policy allows refunds up to $50 without a manager."
          },
          {
            "name": "draft",
            "in": "query",
            "required": false,
            "description": "text the human may edit before approving, e.g. the email or post you will send; returned as decision.final_text (up to 1500 chars)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "notify",
            "in": "query",
            "required": false,
            "description": "https URL that gets one POST with the link: a Slack incoming webhook, Discord webhook, ntfy.sh topic, or any https endpoint (JSON)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "notify_format",
            "in": "query",
            "required": false,
            "description": "auto (by host) | slack | discord | ntfy | json",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "callback",
            "in": "query",
            "required": false,
            "description": "https URL that gets one POST (JSON) when the request is approved, denied, cancelled or expires; a Hookbox inbox URL works",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ttl_minutes",
            "in": "query",
            "required": false,
            "description": "minutes until the request expires (5-10080, default 1440)",
            "schema": {
              "type": "integer"
            },
            "example": 1440
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "description": "optional name shown on the page (up to 80 chars), e.g. your agent or workflow",
            "schema": {
              "type": "string"
            },
            "example": "support-agent"
          }
        ],
        "responses": {
          "200": {
            "description": "Paid result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "approval_id",
                    "status",
                    "action",
                    "expires_at",
                    "approve_url",
                    "token",
                    "read",
                    "outcomes"
                  ],
                  "properties": {
                    "approval_id": {
                      "type": "string",
                      "description": "ap + 22 url-safe chars"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "approved",
                        "denied",
                        "expired",
                        "cancelled"
                      ]
                    },
                    "action": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "approve_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "one-page link for the human who decides"
                    },
                    "send_to_human": {
                      "type": "string"
                    },
                    "token": {
                      "type": "string",
                      "description": "apt_..., shown once; Authorization: Bearer to read or long-poll the decision"
                    },
                    "read": {
                      "type": "object",
                      "description": "status, wait (long-poll), cancel URLs"
                    },
                    "outcomes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "notify": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "result of the one notify POST, if notify was given"
                    },
                    "callback": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "quickstart": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "approval_id": "ap4Hn8qTz2LmW6xRc0VbKs9E",
                  "status": "pending",
                  "action": "Refund $25 to customer #1042 for order 7781",
                  "expires_at": "2026-11-22T12:00:00.000Z",
                  "approve_url": "https://ada-hookbox.agent-arena-base.workers.dev/a/ap4Hn8qTz2LmW6xRc0VbKs9E?k=EXAMPLE-link-key-for-the-human-00",
                  "send_to_human": "Give approve_url to the person who must decide (chat, email, Slack, SMS). They see your action, details and draft, can edit the draft and add a comment, then press Approve or Deny. Link previews and scanners that only open the link cannot decide.",
                  "token": "apt_EXAMPLE-token-shown-once-keep-it-secret-0000000",
                  "read": {
                    "auth_header": "Authorization: Bearer apt_EXAMPLE-token-shown-once-keep-it-secret-0000000",
                    "status": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/approval/ap4Hn8qTz2LmW6xRc0VbKs9E",
                    "wait": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/approval/ap4Hn8qTz2LmW6xRc0VbKs9E/wait?timeout=25",
                    "cancel": "DELETE https://ada-hookbox.agent-arena-base.workers.dev/v1/approval/ap4Hn8qTz2LmW6xRc0VbKs9E"
                  },
                  "outcomes": [
                    "pending",
                    "approved",
                    "denied",
                    "expired",
                    "cancelled"
                  ],
                  "notify": null,
                  "callback": null,
                  "quickstart": [
                    "curl -H 'Authorization: Bearer apt_EXAMPLE-token-shown-once-keep-it-secret-0000000' 'https://ada-hookbox.agent-arena-base.workers.dev/v1/approval/ap4Hn8qTz2LmW6xRc0VbKs9E/wait?timeout=25'   # repeat until status != pending",
                    "when status == \"approved\": proceed (use decision.final_text if you sent a draft); \"denied\", \"expired\" or \"cancelled\": do not proceed"
                  ],
                  "note": "Keep the token secret: it is the only way to read the decision and is stored only as a hash. approve_url lets its holder decide, so send it only to the right person. Proceed only on status \"approved\"."
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (no payment touched)"
          },
          "402": {
            "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) or JSON body (v1)."
          },
          "503": {
            "description": "Storage unavailable (not charged)"
          }
        }
      },
      "post": {
        "operationId": "ask_human_to_approve_agent_action_json",
        "summary": "Ask a human to approve or deny an agent action (approval link + long-poll)",
        "description": "Human-in-the-loop sign-off before a risky step (payment, refund, email, deploy, delete). Returns approve_url, a one-page link for your own human showing the action, details and an optional editable draft with Approve / Deny and a comment box, plus a token to read the decision or long-poll it (returns the moment they decide). Optional notify = their Slack incoming webhook, Discord webhook, ntfy topic or any https URL (one POST with the link); optional callback URL gets the decision. Expires after ttl_minutes (default 1440, max 10080): proceed only on status \"approved\". Only action is needed.",
        "tags": [
          "human-in-the-loop",
          "approval",
          "human-approval",
          "agent-infrastructure",
          "long-poll",
          "webhook"
        ],
        "security": [],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.03"
          },
          "protocols": [
            {
              "x402": {
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x62C05a190089208eAf7bD4954785bd7f4fE9FcCE"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "description": "what needs approval, one line (up to 300 chars)",
                    "example": "Refund $25 to customer #1042 for order 7781"
                  },
                  "details": {
                    "type": "string",
                    "description": "context for the human, plain text with line breaks (up to 1500 chars)",
                    "example": "Customer reports the item arrived damaged; photo received. Policy allows refunds up to $50 without a manager."
                  },
                  "draft": {
                    "type": "string",
                    "description": "text the human may edit before approving, e.g. the email or post you will send; returned as decision.final_text (up to 1500 chars)"
                  },
                  "notify": {
                    "type": "string",
                    "description": "https URL that gets one POST with the link: a Slack incoming webhook, Discord webhook, ntfy.sh topic, or any https endpoint (JSON)"
                  },
                  "notify_format": {
                    "type": "string",
                    "description": "auto (by host) | slack | discord | ntfy | json"
                  },
                  "callback": {
                    "type": "string",
                    "description": "https URL that gets one POST (JSON) when the request is approved, denied, cancelled or expires; a Hookbox inbox URL works"
                  },
                  "ttl_minutes": {
                    "type": "integer",
                    "description": "minutes until the request expires (5-10080, default 1440)",
                    "example": 1440
                  },
                  "label": {
                    "type": "string",
                    "description": "optional name shown on the page (up to 80 chars), e.g. your agent or workflow",
                    "example": "support-agent"
                  }
                },
                "required": [
                  "action"
                ]
              },
              "example": {
                "action": "Refund $25 to customer #1042 for order 7781",
                "details": "Customer reports the item arrived damaged; photo received. Policy allows refunds up to $50 without a manager.",
                "ttl_minutes": 1440,
                "label": "support-agent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "approval_id",
                    "status",
                    "action",
                    "expires_at",
                    "approve_url",
                    "token",
                    "read",
                    "outcomes"
                  ],
                  "properties": {
                    "approval_id": {
                      "type": "string",
                      "description": "ap + 22 url-safe chars"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "approved",
                        "denied",
                        "expired",
                        "cancelled"
                      ]
                    },
                    "action": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "approve_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "one-page link for the human who decides"
                    },
                    "send_to_human": {
                      "type": "string"
                    },
                    "token": {
                      "type": "string",
                      "description": "apt_..., shown once; Authorization: Bearer to read or long-poll the decision"
                    },
                    "read": {
                      "type": "object",
                      "description": "status, wait (long-poll), cancel URLs"
                    },
                    "outcomes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "notify": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "result of the one notify POST, if notify was given"
                    },
                    "callback": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "quickstart": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "approval_id": "ap4Hn8qTz2LmW6xRc0VbKs9E",
                  "status": "pending",
                  "action": "Refund $25 to customer #1042 for order 7781",
                  "expires_at": "2026-11-22T12:00:00.000Z",
                  "approve_url": "https://ada-hookbox.agent-arena-base.workers.dev/a/ap4Hn8qTz2LmW6xRc0VbKs9E?k=EXAMPLE-link-key-for-the-human-00",
                  "send_to_human": "Give approve_url to the person who must decide (chat, email, Slack, SMS). They see your action, details and draft, can edit the draft and add a comment, then press Approve or Deny. Link previews and scanners that only open the link cannot decide.",
                  "token": "apt_EXAMPLE-token-shown-once-keep-it-secret-0000000",
                  "read": {
                    "auth_header": "Authorization: Bearer apt_EXAMPLE-token-shown-once-keep-it-secret-0000000",
                    "status": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/approval/ap4Hn8qTz2LmW6xRc0VbKs9E",
                    "wait": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/approval/ap4Hn8qTz2LmW6xRc0VbKs9E/wait?timeout=25",
                    "cancel": "DELETE https://ada-hookbox.agent-arena-base.workers.dev/v1/approval/ap4Hn8qTz2LmW6xRc0VbKs9E"
                  },
                  "outcomes": [
                    "pending",
                    "approved",
                    "denied",
                    "expired",
                    "cancelled"
                  ],
                  "notify": null,
                  "callback": null,
                  "quickstart": [
                    "curl -H 'Authorization: Bearer apt_EXAMPLE-token-shown-once-keep-it-secret-0000000' 'https://ada-hookbox.agent-arena-base.workers.dev/v1/approval/ap4Hn8qTz2LmW6xRc0VbKs9E/wait?timeout=25'   # repeat until status != pending",
                    "when status == \"approved\": proceed (use decision.final_text if you sent a draft); \"denied\", \"expired\" or \"cancelled\": do not proceed"
                  ],
                  "note": "Keep the token secret: it is the only way to read the decision and is stored only as a hash. approve_url lets its holder decide, so send it only to the right person. Proceed only on status \"approved\"."
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (no payment touched)"
          },
          "402": {
            "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) or JSON body (v1)."
          },
          "503": {
            "description": "Storage unavailable (not charged)"
          }
        }
      }
    },
    "/v1/plan": {
      "get": {
        "operationId": "buy_prepaid_plan_for_webhook_inboxes_and_approvals",
        "summary": "Hookbox plan, 30 days (200 units: inboxes and approvals)",
        "description": "Prepaid 30-day plan key (ahp_...): 200 units to create inboxes and approval requests without paying per call; a 7-day inbox costs 1 unit, a 30-day pro inbox 10, an approval request 3 (half the per-call price). For agents that open one callback URL per async job or ask a human before each risky step. Send Authorization: Bearer ahp_... to /v1/inbox, /v1/inbox/pro or /v1/approval.",
        "tags": [
          "webhook",
          "prepaid",
          "plan",
          "agent-infrastructure"
        ],
        "security": [],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "1"
          },
          "protocols": [
            {
              "x402": {
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x62C05a190089208eAf7bD4954785bd7f4fE9FcCE"
              }
            }
          ]
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Paid result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "plan_key",
                    "units_total",
                    "units_left",
                    "expires_at"
                  ],
                  "properties": {
                    "plan_key": {
                      "type": "string"
                    },
                    "units_total": {
                      "type": "integer"
                    },
                    "units_left": {
                      "type": "integer"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "example": {
                  "plan_key": "ahp_EXAMPLE-key-shown-once-keep-it-secret-00000000",
                  "units_total": 200,
                  "units_used": 0,
                  "units_left": 200,
                  "inboxes_created": 0,
                  "created_at": "2026-11-21T09:00:00.000Z",
                  "expires_at": "2026-12-21T09:00:00.000Z",
                  "use": {
                    "header": "Authorization: Bearer ahp_...",
                    "standard_inbox": "POST https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox (1 unit)",
                    "pro_inbox": "POST https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/pro (10 units)",
                    "approval": "POST https://ada-hookbox.agent-arena-base.workers.dev/v1/approval (3 units)",
                    "status": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/plan/status"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (no payment touched)"
          },
          "402": {
            "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) or JSON body (v1)."
          },
          "503": {
            "description": "Storage unavailable (not charged)"
          }
        }
      },
      "post": {
        "operationId": "buy_prepaid_plan_for_webhook_inboxes_and_approvals_json",
        "summary": "Hookbox plan, 30 days (200 units: inboxes and approvals)",
        "description": "Prepaid 30-day plan key (ahp_...): 200 units to create inboxes and approval requests without paying per call; a 7-day inbox costs 1 unit, a 30-day pro inbox 10, an approval request 3 (half the per-call price). For agents that open one callback URL per async job or ask a human before each risky step. Send Authorization: Bearer ahp_... to /v1/inbox, /v1/inbox/pro or /v1/approval.",
        "tags": [
          "webhook",
          "prepaid",
          "plan",
          "agent-infrastructure"
        ],
        "security": [],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "1"
          },
          "protocols": [
            {
              "x402": {
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x62C05a190089208eAf7bD4954785bd7f4fE9FcCE"
              }
            }
          ]
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "plan_key",
                    "units_total",
                    "units_left",
                    "expires_at"
                  ],
                  "properties": {
                    "plan_key": {
                      "type": "string"
                    },
                    "units_total": {
                      "type": "integer"
                    },
                    "units_left": {
                      "type": "integer"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "example": {
                  "plan_key": "ahp_EXAMPLE-key-shown-once-keep-it-secret-00000000",
                  "units_total": 200,
                  "units_used": 0,
                  "units_left": 200,
                  "inboxes_created": 0,
                  "created_at": "2026-11-21T09:00:00.000Z",
                  "expires_at": "2026-12-21T09:00:00.000Z",
                  "use": {
                    "header": "Authorization: Bearer ahp_...",
                    "standard_inbox": "POST https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox (1 unit)",
                    "pro_inbox": "POST https://ada-hookbox.agent-arena-base.workers.dev/v1/inbox/pro (10 units)",
                    "approval": "POST https://ada-hookbox.agent-arena-base.workers.dev/v1/approval (3 units)",
                    "status": "GET https://ada-hookbox.agent-arena-base.workers.dev/v1/plan/status"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (no payment touched)"
          },
          "402": {
            "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) or JSON body (v1)."
          },
          "503": {
            "description": "Storage unavailable (not charged)"
          }
        }
      }
    },
    "/h/{id}": {
      "post": {
        "summary": "Capture endpoint (give this URL to the sender). Any method, any sub-path. Free.",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "captured"
          },
          "404": {
            "description": "unknown inbox"
          },
          "410": {
            "description": "expired"
          },
          "429": {
            "description": "rate limited"
          }
        }
      }
    },
    "/v1/inbox/{id}": {
      "get": {
        "summary": "Inbox info (free)",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Bearer <inbox token ahk_...>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "summary": "Delete inbox and events (free)",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Bearer <inbox token ahk_...>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "deleted"
          }
        }
      }
    },
    "/v1/inbox/{id}/events": {
      "get": {
        "summary": "List events after a cursor (free)",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Bearer <inbox token ahk_...>",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "events"
          }
        }
      },
      "delete": {
        "summary": "Clear events (free)",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Bearer <inbox token ahk_...>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "cleared"
          }
        }
      }
    },
    "/v1/inbox/{id}/wait": {
      "get": {
        "summary": "Long-poll: returns as soon as an event with seq > after arrives, or after timeout (max 25s). Free.",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Bearer <inbox token ahk_...>",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timeout",
            "in": "query",
            "schema": {
              "type": "integer",
              "maximum": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "events or timed_out"
          }
        }
      }
    },
    "/v1/inbox/{id}/config": {
      "post": {
        "summary": "Set signing secret/scheme, Meta verify_token, label, pro custom reply (free)",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Bearer <inbox token ahk_...>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "secret": {
                    "type": "string"
                  },
                  "scheme": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "github",
                      "stripe",
                      "standard",
                      "slack",
                      "shopify",
                      "hmac"
                    ]
                  },
                  "verify_token": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "reply": {
                    "type": "object",
                    "properties": {
                      "status": {
                        "type": "integer"
                      },
                      "body": {},
                      "content_type": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/pay/quote": {
      "get": {
        "summary": "Plain USDC transfer, step 1 (free): exact amount + secret quote id for product plan ($1) or pro ($0.25), bound to your wallet, 60 minutes",
        "security": [],
        "parameters": [
          {
            "name": "product",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "plan",
                "pro"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "description": "wallet you will pay from",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "quote"
          }
        }
      }
    },
    "/v1/pay/claim": {
      "get": {
        "summary": "Plain USDC transfer, step 2 (free): verify the Base transaction and deliver the plan key or pro inbox; idempotent",
        "security": [],
        "parameters": [
          {
            "name": "quote",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tx",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "delivered"
          },
          "402": {
            "description": "transfer does not match the quote"
          },
          "409": {
            "description": "not mined yet / tx already used"
          },
          "503": {
            "description": "Base RPC unavailable, retry"
          }
        }
      }
    },
    "/v1/approval/{id}": {
      "get": {
        "operationId": "get_human_approval_status",
        "summary": "Approval status and decision (free)",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Bearer <approval token apt_...>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "unknown id or wrong token"
          }
        }
      },
      "delete": {
        "operationId": "cancel_human_approval_request",
        "summary": "Cancel a pending approval request (free); the page then shows cancelled",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Bearer <approval token apt_...>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "cancelled"
          },
          "409": {
            "description": "already decided"
          }
        }
      }
    },
    "/v1/approval/{id}/wait": {
      "get": {
        "operationId": "wait_for_human_approval_decision",
        "summary": "Long-poll: returns as soon as the human decides (or the request expires), or after timeout (max 25s); repeat while status is pending. Free.",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Bearer <approval token apt_...>",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeout",
            "in": "query",
            "schema": {
              "type": "integer",
              "maximum": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{timed_out, approval}"
          }
        }
      }
    },
    "/a/{id}": {
      "get": {
        "summary": "The human's approval page (HTML; needs ?k= from approve_url). Deciding is a POST from this page.",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "k",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTML page"
          },
          "404": {
            "description": "invalid link"
          }
        }
      }
    },
    "/v1/plan/status": {
      "get": {
        "summary": "Plan units left (free)",
        "security": [],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Bearer <plan key ahp_...>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/": {
      "get": {
        "summary": "Free",
        "security": [],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/health": {
      "get": {
        "summary": "Free",
        "security": [],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/health/storage": {
      "get": {
        "summary": "Free",
        "security": [],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "summary": "Free",
        "security": [],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api": {
      "get": {
        "summary": "Free",
        "security": [],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  }
}