← Back to docs
Recipe

Webhook doc design

A clean, scannable layout for documenting webhook endpoints — payloads, headers, retries, and security.

Structure

  • Endpoint URL — method, path, base URL substitution
  • Headers — Content-Type, X-Signature, User-Agent
  • Request body — JSON schema with types and descriptions
  • Response codes — 200, 400, 401, 429, 500
  • Retry policy — exponential backoff, max attempts, dead-letter
  • Signature verification — HMAC-SHA256, timestamp tolerance

Payload example

{
  "event": "license.activated",
  "timestamp": "2026-05-26T14:30:00Z",
  "data": {
    "license_key": "NMB-XXXX-XXXX-XXXX",
    "user_id": "usr_abc123",
    "product": "meridian"
  }
}

Design notes

Use a two-column layout on desktop: navigation sidebar with event type anchors, content area with sticky endpoint summary. On mobile, collapse to a single scrollable column.

Color-code HTTP methods — POST in violet, response codes in green (2xx), amber (4xx), red (5xx). Keep the schema table zebra-striped with alternating bg-[#0A0612]/40 rows.

Include a “Test it” panel with a live JSON editor and a send button that fires against a sandbox endpoint. Show the response inline with syntax highlighting.