Browse docs (11)

HookRelay User Guide

950 words ยท 5 min read ยท 16 sections

Overview

Webhook receiver, payload inspector, forwarding with retry, and replay.

Subdomain: hooks.microgemlabs.ai

Getting Started

1. Enable HookRelay in the Products page

2. Navigate to hooks.microgemlabs.ai

3. Click + New Endpoint to create a webhook receiver

4. Copy the receiver URL and configure it in your webhook source (GitHub, Stripe, etc.)

What HookRelay Does

HookRelay gives you a stable webhook endpoint that logs every incoming request, optionally forwards it to a destination URL with retry logic, and lets you inspect payloads and replay failed deliveries.

Use cases:
  • Relay: Point GitHub webhooks at HookRelay, which forwards to your backend. If your backend goes down, HookRelay retries automatically.
  • Inspect: Debug webhook payloads from third-party APIs by examining headers, body, and query parameters in the inspector.
  • Buffer: Receive webhooks during deployment downtime and replay them after your service is back up.
  • Fan-out: Multiple internal services need the same webhook โ€” forward to one, inspect the payload for the others.

Endpoint Modes

Forward & Inspect

Incoming webhooks are logged AND forwarded to your destination URL. If forwarding fails, HookRelay retries with configurable delay. You can inspect the full payload and forward result in the dashboard.

Inspect Only

Incoming webhooks are logged but NOT forwarded anywhere. Use this for debugging โ€” see exactly what a webhook source is sending without needing a running backend.

Creating an Endpoint

Name โ€” Descriptive name (e.g., "GitHub Deploy Hooks", "Stripe Payment Events") Forward URL โ€” Where to send the webhook (leave blank for Inspect Only mode) Forward Headers โ€” Additional headers to add when forwarding. JSON format:
{"X-Internal-Auth": "secret-token", "X-Source": "hookrelay"}
Timeout โ€” Seconds before the forward request is aborted (5-120, default: 30) Retries โ€” Number of retry attempts on forward failure (0-5, default: 3) Retry Delay โ€” Seconds between retries (5-600, default: 30) Require Auth โ€” If set, incoming requests must include this exact Authorization header value or they're rejected with 401. Example: Bearer whsec_your_secret

Receiver URL

Each endpoint gets a unique receiver URL:

https://hooks.microgemlabs.ai/api/hook/[uuid]

Configure this URL in your webhook source's settings. HookRelay accepts all HTTP methods (GET, POST, PUT, PATCH, DELETE) on this URL.

What happens on each request:

1. HookRelay captures the full request (method, headers, body, query params, source IP)

2. Returns 200 OK immediately (never blocks the sender)

3. If a forward URL is configured, queues forwarding as a background task

4. The forward task sends the payload to your destination with retry on failure

Payload Inspector

The endpoint detail page provides a two-panel inspector:

Left panel: Scrollable list of all received requests. Each shows the HTTP method, forward status, HTTP code, content type, and timestamp. Click to select. Right panel: Three tabs for the selected request:
  • Body โ€” Query parameters as key=value pairs, request body with auto-formatted JSON
  • Headers โ€” All captured headers in key: value format
  • Forward Response โ€” The destination server's response body (auto-formatted JSON)

The forward result summary shows HTTP status, duration, attempt count, and error message.

Replay

Failed deliveries can be replayed with one click. The Replay button appears on any request with forwardStatus: failed. Replaying:

1. Resets the forward status to "pending"

2. Re-queues the forwarding task

3. HookRelay sends the original payload to the destination again with fresh retry logic

This is useful after fixing a backend issue โ€” replay all the webhooks that arrived during the outage.

Forward Headers

When forwarding, HookRelay adds these headers to help your backend identify the source:

HeaderValue
User-AgentHookRelay/1.0 (https://hooks.microgemlabs.ai)
X-HookRelay-Request-IdUnique ID of the original request
X-HookRelay-Original-MethodThe HTTP method of the original request
Content-TypePreserved from the original request

Plus any custom headers configured in Forward Headers.

Failure Alerting

HookRelay fires an on-call alert when 3 or more forward failures occur within 15 minutes for the same endpoint. This prevents alert fatigue from a single failed request while catching persistent issues quickly.

Alerts are deduplicated โ€” only one active alert per endpoint at a time.

Data Captured Per Request

FieldDescriptionMax Size
MethodHTTP method (GET, POST, etc.)โ€”
PathAny path after the UUIDโ€”
HeadersAll request headers (cookies redacted)โ€”
BodyRequest body100 KB
Content-TypeFrom Content-Type headerโ€”
Query ParamsURL query string as key-valueโ€”
Source IPClient IP addressโ€”
Forward ResponseDestination's response body10 KB

Retention

Webhook request records are retained for 30 days. A daily cleanup job removes older records. Plan your replay strategy accordingly โ€” requests older than 30 days cannot be replayed.

Security

  • Cookie headers are automatically redacted in stored requests
  • Auth requirement rejects unauthorized senders at the edge
  • Paused endpoints accept requests silently (return 200) but don't store or forward them
  • All data is stored in your team's Supabase database โ€” no third-party data sharing

Maintenance Windows

Suppress HookRelay forward failure alerts during planned maintenance (Ops โ†’ Maintenance). Webhook reception and forwarding continue normally โ€” only the failure alerting is suppressed. This is useful when your forwarding destination is intentionally offline during a deployment. Scope suppression globally, to HookRelay only, or to a specific endpoint.

Runbook Actions

Define automated responses to forward failures (Skills โ†’ Runbook (/agent/skills?type=runbook)). Example: create a "Restart Forward Target" template that POSTs to your service management API when HookRelay detects persistent forward failures to a specific endpoint. Three trust levels control whether MicroGemAI can execute automatically.

Postmortems

When forward failure patterns resolve, MicroGemAI auto-generates a postmortem with which webhooks failed, error patterns, forward success rate during the incident window, and action items. Review and publish at Ops โ†’ Postmortems.