# `create_inbox` — Create Ephemeral Webhook Inbox

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

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.

**Why call instead of DIY:** Replaces running ngrok/cloudflared tunnels, deploying temporary webhook servers, and managing TTL cleanup cron jobs.

- **REST Endpoint:** `POST https://hook-sink.apikeg.com/v1/create-inbox`
- **MCP Server:** `https://hook-sink.apikeg.com/mcp` (tool: `create_inbox`)
- **Pricing:** Free ($0.00)
- **Free Dry-Run:** `POST https://hook-sink.apikeg.com/v1/create-inbox?dry_run=true`

## Input JSON Schema
```json
{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "enum": [
        "auto",
        "stripe",
        "github",
        "shopify",
        "slack",
        "linear",
        "generic_sha256"
      ],
      "description": "Optional webhook provider preset for automatic HMAC verification on capture (auto, stripe, github, shopify, slack, linear, generic_sha256)."
    },
    "signingSecret": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "description": "Optional webhook signing secret used to verify inbound webhook signatures automatically as events arrive."
    },
    "signatureHeader": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "description": "Optional custom HTTP header name containing the HMAC signature when using generic_sha256 or linear."
    },
    "ttlSeconds": {
      "type": "integer",
      "minimum": 60,
      "maximum": 86400,
      "default": 3600,
      "description": "Ephemeral inbox retention TTL in seconds (60 to 86400, default 3600)."
    }
  },
  "additionalProperties": false
}
```

## Examples
### Create a Stripe webhook inbox with 1-hour TTL
```bash
curl -X POST "https://hook-sink.apikeg.com/v1/create-inbox" \
  -H "Content-Type: application/json" \
  -d '{"provider":"stripe","ttlSeconds":3600}'
```
Expected output: Returns inboxId, secret readToken, and public webhookUrl ready to paste into Stripe/GitHub/Shopify.
