DestinationsWebhooks

Webhook destinations

A webhook destination asks Causet to HTTP POST each matched committed event to your HTTPS endpoint. This is the supported replacement for the older Settings → Webhooks path.

This page covers outbound webhooks (Causet → your system). For inbound webhooks (Stripe/GitHub → your bridge → submitIntent), see Use Webhooks to Update Existing Flows.


Create a destination

In Settings → Destinations → New → Webhook:

FieldRequiredNotes
NameYesDisplay name
URLYesHTTPS endpoint that accepts JSON POSTs
SecretRecommendedUsed to sign requests; stored encrypted
HeadersNoExtra static headers (auth tokens, etc.)
TimeoutNoPer-attempt HTTP timeout

Attach subscriptions for the event types you care about.


Request shape

Each delivery is a POST with JSON. Default body is the same export envelope as Kafka (export_v1: id, type, data, causet, …). Optional payloadFormat: flat_v1 uses a flatter body (eventId, payload, …) — see that page.

Headers set by realtime:

HeaderPurpose
Content-Typeapplication/json
X-Causet-Event-IdStable id for dedupe (same as body id)
X-Causet-Event-TypeBusiness event type
X-Causet-Delivery-IdThis delivery job
X-Causet-Destination-Id / X-Causet-Subscription-IdProvenance
X-Causet-Delivery-AttemptAttempt number
X-Causet-SignatureHMAC-SHA256 of the body when signing is enabled (X-Verdant-Signature mirrors it)

Treat 2xx as success. Non-2xx and network errors are retried per delivery guarantees.


Handler checklist

  1. Verify X-Causet-Signature when a signing secret is configured.
  2. Dedupe on X-Causet-Event-Id / body id before side effects.
  3. Return 2xx quickly; do heavy work asynchronously if needed.
  4. Prefer idempotent side effects — retries will happen.
// Pseudocode — export_v1 body
app.post('/causet/events', async (req, res) => {
  const id = req.headers['x-causet-event-id'] ?? req.body.id
  if (await alreadyProcessed(id)) return res.status(200).end()
 
  // verifySignature(req)...
  await applySideEffect(req.body) // req.body.type, req.body.data, …
  await markProcessed(id)
  res.status(200).end()
})

Operations

Same control-plane actions as Kafka destinations: Test connection, Pause / resume, Rotate secret, Delivery Log.