{
  "x402Version": 2,
  "service": "hook-sink",
  "title": "HookSink Webhook Inbox & Signature Verifier API",
  "version": "1.0.0",
  "mcpEndpoint": "https://hook-sink.apikeg.com/mcp",
  "freeDiscovery": [
    "https://hook-sink.apikeg.com/llms.txt",
    "https://hook-sink.apikeg.com/llms-full.txt",
    "https://hook-sink.apikeg.com/openapi.json",
    "https://hook-sink.apikeg.com/.well-known/mcp.json",
    "https://hook-sink.apikeg.com/.well-known/api-catalog"
  ],
  "resources": [
    {
      "name": "inspect_inbox_events",
      "title": "Inspect Captured Webhook Events",
      "url": "https://hook-sink.apikeg.com/v1/inspect-inbox-events",
      "method": "POST",
      "description": "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. Why call instead of DIY: Provides structured raw-body + parsed-JSON payloads with constant-time HMAC verification in a single call. Pricing: $0.002 USD per inbox inspection query (x402 instant micropayment). Pass ?dry_run=true on REST to validate schema free.",
      "accepts": [
        {
          "scheme": "exact",
          "network": "eip155:8453",
          "amount": "2000",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0x000000000000000000000000000000000000dEaD",
          "maxTimeoutSeconds": 60,
          "extra": {
            "priceUsd": "0.002",
            "unitDescription": "per inbox inspection query",
            "dryRunQueryParam": "?dry_run=true"
          }
        }
      ],
      "extensions": {
        "bazaar": {
          "discoverable": true,
          "category": [
            "developer-tools",
            "webhook-testing",
            "security-verification",
            "agent-infra"
          ],
          "info": {
            "input": {
              "type": "http",
              "method": "POST",
              "bodyType": "json",
              "example": {
                "inboxId": "inb_0123456789abcdef01234567",
                "readToken": "hsk_0123456789abcdef0123456789abcdef0123456789abcdef",
                "limit": 20
              }
            },
            "output": {
              "type": "json"
            }
          },
          "schema": {
            "inputSchema": {
              "type": "object",
              "properties": {
                "inboxId": {
                  "type": "string",
                  "minLength": 4,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9_-]+$",
                  "description": "Ephemeral inbox identifier returned by create_inbox."
                },
                "readToken": {
                  "type": "string",
                  "minLength": 8,
                  "maxLength": 256,
                  "description": "Secret read token returned by create_inbox."
                },
                "limit": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 100,
                  "default": 50,
                  "description": "Maximum number of captured webhook events to return (1–100, default 50)."
                },
                "sinceEventId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "description": "Cursor pagination: return only events captured strictly after this eventId."
                },
                "signingSecret": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512,
                  "description": "Optional ad-hoc HMAC signing secret to retroactively verify captured webhook events."
                },
                "provider": {
                  "type": "string",
                  "enum": [
                    "auto",
                    "stripe",
                    "github",
                    "shopify",
                    "slack",
                    "linear",
                    "generic_sha256"
                  ],
                  "description": "Optional provider preset override for retroactive signature verification (auto, stripe, github, shopify, slack, linear, generic_sha256)."
                },
                "signatureHeader": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "description": "Optional custom header name for retroactive generic_sha256 verification."
                },
                "toleranceSeconds": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 86400,
                  "description": "Optional timestamp tolerance window in seconds (evaluated against each event's receivedAt timestamp)."
                }
              },
              "required": [
                "inboxId",
                "readToken"
              ],
              "additionalProperties": false
            },
            "outputSchema": {
              "type": "object",
              "required": [
                "ok",
                "data",
                "_meta"
              ],
              "properties": {
                "ok": {
                  "type": "boolean",
                  "const": true
                },
                "data": {
                  "type": "object",
                  "description": "Deterministic structured tool result payload."
                },
                "_meta": {
                  "type": "object",
                  "required": [
                    "requestId",
                    "durationMs",
                    "chargedUsd",
                    "dryRun"
                  ],
                  "properties": {
                    "requestId": {
                      "type": "string"
                    },
                    "durationMs": {
                      "type": "number"
                    },
                    "chargedUsd": {
                      "type": "string"
                    },
                    "dryRun": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    {
      "name": "verify_webhook_signature",
      "title": "Verify Webhook HMAC Signature",
      "url": "https://hook-sink.apikeg.com/v1/verify-webhook-signature",
      "method": "POST",
      "description": "Statelessly verifies webhook HMAC-SHA256 signatures and replay timestamps across Stripe, GitHub, Shopify, Slack, Linear, or custom headers using constant-time Web Crypto comparison. Why call instead of DIY: Prevents subtle raw-body serialization bugs, hex vs. base64 mismatches, timing side channels, and Stripe/Slack timestamp replay vulnerabilities. Pricing: $0.001 USD per stateless signature verification (x402 instant micropayment). Pass ?dry_run=true on REST to validate schema free.",
      "accepts": [
        {
          "scheme": "exact",
          "network": "eip155:8453",
          "amount": "1000",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0x000000000000000000000000000000000000dEaD",
          "maxTimeoutSeconds": 60,
          "extra": {
            "priceUsd": "0.001",
            "unitDescription": "per stateless signature verification",
            "dryRunQueryParam": "?dry_run=true"
          }
        }
      ],
      "extensions": {
        "bazaar": {
          "discoverable": true,
          "category": [
            "developer-tools",
            "webhook-testing",
            "security-verification",
            "agent-infra"
          ],
          "info": {
            "input": {
              "type": "http",
              "method": "POST",
              "bodyType": "json",
              "example": {
                "provider": "stripe",
                "rawBody": "{\"id\":\"evt_123\",\"type\":\"checkout.session.completed\"}",
                "headers": {
                  "Stripe-Signature": "t=1700000000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                },
                "secret": "whsec_test_secret",
                "toleranceSeconds": 300
              }
            },
            "output": {
              "type": "json"
            }
          },
          "schema": {
            "inputSchema": {
              "type": "object",
              "properties": {
                "provider": {
                  "type": "string",
                  "enum": [
                    "auto",
                    "stripe",
                    "github",
                    "shopify",
                    "slack",
                    "linear",
                    "generic_sha256"
                  ],
                  "default": "auto",
                  "description": "Webhook signature provider preset (auto, stripe, github, shopify, slack, linear, generic_sha256)."
                },
                "rawBody": {
                  "type": "string",
                  "maxLength": 262144,
                  "description": "Exact raw UTF-8 HTTP request body string as delivered by the webhook sender."
                },
                "headers": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "HTTP request headers map containing the webhook signature header(s)."
                },
                "secret": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512,
                  "description": "Webhook HMAC signing secret (e.g., whsec_... for Stripe)."
                },
                "toleranceSeconds": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 86400,
                  "default": 300,
                  "description": "Timestamp replay-window tolerance in seconds for Stripe and Slack (default 300)."
                },
                "signatureHeader": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "description": "Optional custom signature header name when provider is generic_sha256 or linear."
                },
                "nowSeconds": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Optional Unix epoch timestamp (seconds) override for deterministic replay checks."
                }
              },
              "required": [
                "rawBody",
                "headers",
                "secret"
              ],
              "additionalProperties": false
            },
            "outputSchema": {
              "type": "object",
              "required": [
                "ok",
                "data",
                "_meta"
              ],
              "properties": {
                "ok": {
                  "type": "boolean",
                  "const": true
                },
                "data": {
                  "type": "object",
                  "description": "Deterministic structured tool result payload."
                },
                "_meta": {
                  "type": "object",
                  "required": [
                    "requestId",
                    "durationMs",
                    "chargedUsd",
                    "dryRun"
                  ],
                  "properties": {
                    "requestId": {
                      "type": "string"
                    },
                    "durationMs": {
                      "type": "number"
                    },
                    "chargedUsd": {
                      "type": "string"
                    },
                    "dryRun": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    {
      "name": "replay_event",
      "title": "Replay Captured Webhook Event",
      "url": "https://hook-sink.apikeg.com/v1/replay-event",
      "method": "POST",
      "description": "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. Why call instead of DIY: Safely redelivers exact byte-for-byte webhook payloads with original signatures intact without risking SSRF against internal networks. Pricing: $0.003 USD per SSRF-guarded webhook replay (x402 instant micropayment). Pass ?dry_run=true on REST to validate schema free.",
      "accepts": [
        {
          "scheme": "exact",
          "network": "eip155:8453",
          "amount": "3000",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0x000000000000000000000000000000000000dEaD",
          "maxTimeoutSeconds": 60,
          "extra": {
            "priceUsd": "0.003",
            "unitDescription": "per SSRF-guarded webhook replay",
            "dryRunQueryParam": "?dry_run=true"
          }
        }
      ],
      "extensions": {
        "bazaar": {
          "discoverable": true,
          "category": [
            "developer-tools",
            "webhook-testing",
            "security-verification",
            "agent-infra"
          ],
          "info": {
            "input": {
              "type": "http",
              "method": "POST",
              "bodyType": "json",
              "example": {
                "inboxId": "inb_0123456789abcdef01234567",
                "readToken": "hsk_0123456789abcdef0123456789abcdef0123456789abcdef",
                "eventId": "evt_000001_a1b2c3d4e5f6",
                "targetUrl": "https://staging.example.com/webhooks/stripe",
                "timeoutMs": 10000
              }
            },
            "output": {
              "type": "json"
            }
          },
          "schema": {
            "inputSchema": {
              "type": "object",
              "properties": {
                "inboxId": {
                  "type": "string",
                  "minLength": 4,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9_-]+$",
                  "description": "Inbox identifier containing the captured event."
                },
                "readToken": {
                  "type": "string",
                  "minLength": 8,
                  "maxLength": 256,
                  "description": "Secret read token returned by create_inbox."
                },
                "eventId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "description": "Identifier of the captured webhook event to replay."
                },
                "targetUrl": {
                  "type": "string",
                  "minLength": 8,
                  "maxLength": 2048,
                  "description": "Publicly routable http:// or https:// URL to receive the replayed webhook."
                },
                "overrideHeaders": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Optional additional or overridden HTTP headers to send on replay."
                },
                "timeoutMs": {
                  "type": "integer",
                  "minimum": 500,
                  "maximum": 15000,
                  "default": 10000,
                  "description": "Outbound replay request timeout in milliseconds (500–15000, default 10000)."
                }
              },
              "required": [
                "inboxId",
                "readToken",
                "eventId",
                "targetUrl"
              ],
              "additionalProperties": false
            },
            "outputSchema": {
              "type": "object",
              "required": [
                "ok",
                "data",
                "_meta"
              ],
              "properties": {
                "ok": {
                  "type": "boolean",
                  "const": true
                },
                "data": {
                  "type": "object",
                  "description": "Deterministic structured tool result payload."
                },
                "_meta": {
                  "type": "object",
                  "required": [
                    "requestId",
                    "durationMs",
                    "chargedUsd",
                    "dryRun"
                  ],
                  "properties": {
                    "requestId": {
                      "type": "string"
                    },
                    "durationMs": {
                      "type": "number"
                    },
                    "chargedUsd": {
                      "type": "string"
                    },
                    "dryRun": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  ]
}