# `replay_event` — Replay Captured Webhook Event

> Part of [HookSink Webhook Inbox & Signature Verifier API](https://hook-sink.apikeg.com/llms.txt) (`com.apikeg/hook-sink`)

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.

- **REST Endpoint:** `POST https://hook-sink.apikeg.com/v1/replay-event`
- **MCP Server:** `https://hook-sink.apikeg.com/mcp` (tool: `replay_event`)
- **Pricing:** $0.003 USD per SSRF-guarded webhook replay (x402 instant micropayment)
- **Free Dry-Run:** `POST https://hook-sink.apikeg.com/v1/replay-event?dry_run=true`

## Input JSON Schema
```json
{
  "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
}
```

## Examples
### Replay captured event to staging endpoint
```bash
curl -X POST "https://hook-sink.apikeg.com/v1/replay-event" \
  -H "Content-Type: application/json" \
  -d '{"inboxId":"inb_0123456789abcdef01234567","readToken":"hsk_0123456789abcdef0123456789abcdef0123456789abcdef","eventId":"evt_000001_a1b2c3d4e5f6","targetUrl":"https://staging.example.com/webhooks/stripe","timeoutMs":10000}'
```
