1. Create the endpoint

vadyl webhook endpoint create \
  --url https://example.com/webhooks/vadyl \
  --filter '{"op":"startsWith","path":"$.type","value":"order."}' \
  --signing-secret WEBHOOK_SIGNING_KEY

{
  "id": "wh_end_123",
  "state": "active"
}

2. Verify before parsing

const raw = await request.arrayBuffer();
const signature = request.headers.get("Vadyl-Signature");
verifyVadylSignature({ raw, signature, secret });
const event = JSON.parse(new TextDecoder().decode(raw));

3. Return quickly

HTTP/1.1 200 OK
{ "received": true }

4. Replay safely

vadyl webhook deliveries list --endpoint wh_end_123 --status dead-lettered
vadyl webhook deliveries replay whdel_123

{
  "deliveryId": "whdel_123",
  "state": "RetryScheduled"
}

5. Operate diagnostics

Watch retry state, attempt history, latency, receiver status codes, signature rotation, and dead-letter reasons. Delivery state is durable; replays do not create duplicate canonical events.