# HookSink Webhook Inbox & Signature Verifier API (v1.0.0)

> Provision instant public webhook URLs, verify Stripe/Shopify/GitHub/Slack HMAC signatures, and replay captured events at the edge.

Ephemeral Cloudflare Durable Object webhook capture inboxes, constant-time multi-provider HMAC-SHA256 signature verification (Stripe, GitHub, Shopify, Slack, Linear), and SSRF-guarded webhook replay for autonomous agents.

## Why Agents Use This API Instead of DIY
Eliminates spinning up ngrok tunnels, public servers, or error-prone raw-body HMAC/timestamp parsers when agents test integrations or receive async callbacks.

## Connection & Payment (x402 Default + Optional Bearer API Key)
- **MCP Server (Streamable HTTP):** `https://hook-sink.apikeg.com/mcp` (Registry ID: `com.apikeg/hook-sink` — `initialize`, `tools/list`, `resources/*`, and `prompts/*` are free)
- **OpenAPI 3.1 Spec:** [openapi.json](https://hook-sink.apikeg.com/openapi.json)
- **Full Schema & Examples:** [llms-full.txt](https://hook-sink.apikeg.com/llms-full.txt)
- **RFC 9727 API Catalog:** [.well-known/api-catalog](https://hook-sink.apikeg.com/.well-known/api-catalog)
- **x402 Bazaar Manifest:** [.well-known/x402.json](https://hook-sink.apikeg.com/.well-known/x402.json)
- **MCP Discovery Manifest:** [.well-known/mcp.json](https://hook-sink.apikeg.com/.well-known/mcp.json)
- **A2A Agent Card:** [.well-known/agent-card.json](https://hook-sink.apikeg.com/.well-known/agent-card.json)
- **Primary Payment (Zero Signup):** Cloudflare Monetization Gateway (`HTTP 402` / `x402` v2 with USDC on Base).
- **Optional Monthly API Key:** Pass `Authorization: Bearer ak_live_...` ($5 / $20 / $50 monthly per-product Stripe plans at [apikeg.com/account](https://apikeg.com/account)).
- **Free Preflight:** Append `?dry_run=true` (or header `X-Dry-Run: true`) to validate any request payload at `$0.00` cost.

## Tools & REST Endpoints
- [`create_inbox`](https://hook-sink.apikeg.com/tools/create-inbox.md) (`POST https://hook-sink.apikeg.com/v1/create-inbox`) — Free ($0.00): Provisions a fresh public webhook capture URL (/in/:inboxId) backed by an isolated Durable Object ring buffer (up to 100 events, 128 KiB each) with optional automatic HMAC signature verification.
- [`inspect_inbox_events`](https://hook-sink.apikeg.com/tools/inspect-inbox-events.md) (`POST https://hook-sink.apikeg.com/v1/inspect-inbox-events`) — $0.002 USD per inbox inspection query (x402 instant micropayment): Retrieves captured webhook deliveries from an inbox (headers, raw body, SHA-256 digest, parsed JSON, and cryptographic signature verification), supporting cursor pagination via sinceEventId and retroactive ad-hoc signature checks.
- [`verify_webhook_signature`](https://hook-sink.apikeg.com/tools/verify-webhook-signature.md) (`POST https://hook-sink.apikeg.com/v1/verify-webhook-signature`) — $0.001 USD per stateless signature verification (x402 instant micropayment): Statelessly verifies webhook HMAC-SHA256 signatures and replay timestamps across Stripe, GitHub, Shopify, Slack, Linear, or custom headers using constant-time Web Crypto comparison.
- [`replay_event`](https://hook-sink.apikeg.com/tools/replay-event.md) (`POST https://hook-sink.apikeg.com/v1/replay-event`) — $0.003 USD per SSRF-guarded webhook replay (x402 instant micropayment): Replays a captured webhook event (exact raw body, HTTP method, and signature headers) from an inbox to a public HTTP/HTTPS target URL protected by strict SSRF filtering, returning target status, latency, and response snippet.

## Instant MCP Configuration
```json
{
  "mcpServers": {
    "hook-sink": {
      "type": "streamable-http",
      "url": "https://hook-sink.apikeg.com/mcp"
    }
  }
}
```

## Common Agent Use Cases
- ephemeral webhook inbox API for AI agents
- receive Stripe Shopify GitHub Slack webhooks without ngrok
- verify Stripe-Signature X-Shopify-Hmac-Sha256 X-Slack-Signature MCP tool
- capture and replay webhook payloads API
