BETA
Skip to content

Replay

Every event a source receives is persisted with its raw body, headers, and signature-validity flag. You can re-deliver any persisted event to the source's destinations at any time — useful when:

  • a destination was down during the original delivery,
  • you added a new destination after the fact and want to backfill,
  • you fixed a bug in your handler and want to re-process events.

Retention is per-source via retention_days (default 30, max 365). The WebhooksRetentionWorker runs daily at 06:00 UTC and deletes events older than each source's retention window.

Replay to all destinations

bash
curl -X POST \
  "https://app.krafter.dev/api/v1/webhooks/sources/$SOURCE_ID/events/$EVENT_ID/replay" \
  -H "Authorization: Bearer $KRAFTER_KEY"

Response — 202 Accepted:

json
{
  "data": {
    "replayed_to": 2,
    "queued_destination_ids": ["uuid-1", "uuid-2"]
  }
}

This re-queues the event for fan-out using the current matching set of enabled destinations whose event_filter matches the event's type (or has an empty filter).

Replay to a subset

Pass destination_ids in the body to target specific destinations. Krafter validates each ID belongs to the same source as the event.

bash
curl -X POST \
  "https://app.krafter.dev/api/v1/webhooks/sources/$SOURCE_ID/events/$EVENT_ID/replay" \
  -H "Authorization: Bearer $KRAFTER_KEY" \
  -H "content-type: application/json" \
  -d '{ "destination_ids": ["uuid-1"] }'

event_filter is not re-applied when you pass destination_ids explicitly — Krafter assumes you know what you want.

Effect on the original event

Replay does not touch the original event row or its prior deliveries history. Each replay creates its own delivery rows and the event's status flips to forwarding while the new attempts run.

What you cannot replay

Events with signature_valid: false are stored for inspection but cannot be replayed — the assumption is that they did not come from the configured provider. If you need to re-trigger such an event, fix the signing configuration first and POST the raw body to /in/:slug again.

Built by Krafter Studio