Replay a failed webhook
Find a failed delivery, read what your handler got and answered, fix it, and send the same request again.
Try it in the demo.
The situation: a webhook handler in your app returned 500 (or timed out). You want to see exactly what it received, fix it, and try again without making the event happen again.
You need: nothing beyond an endpoint that received a delivery.
Steps
- Notice it: the bell shows a failed delivery, the Overview lists it under Recent failures, or open Webhooks > Deliveries and press Failed.
- Open the delivery. The request (method, URL, headers, body) is on the left and your app's response on the right. Attempts lists every retry.
- Fix your handler. If the delivery is still retrying, you can wait for the next attempt, or press Cancel retries.
- Press Replay > Replay as-is. A new delivery is sent with the same request.
- To test a variation, press Edit and replay, change the body, and Send edited request.
Keep it for next time
Press Save and name it ("Order webhook with null address"). It is now in Webhooks > Saved, ready to Send after every change, and it goes into the seed file.
With the CLI
sendmock webhook deliveries list --failed
sendmock webhook deliveries replay <deliveryId>In your code
A script that finds the newest failed delivery and sends the same request again after you fixed the handler.
The examples call SendMock's REST API with each language's usual HTTP client and test framework. JavaScript, Go, Java, Rust, Ruby and C# use the small call helper shown under Test helper on their page in Connect your app.
failures=$(sendmock webhook deliveries list --status failed --limit 1 --json)
failure=$(jq '.items[0]' <<<"$failures")
replay=$(sendmock webhook deliveries replay "$(jq -r '.id' <<<"$failure")" --no-rerender --json)
jq -e '.trigger == "replay"' <<<"$replay" >/dev/nullWhat you should see
The new delivery with trigger "replay" and, after your fix, a 2xx.
Try it in the demo
- Open Webhooks > Deliveries and press Failed.
- Open the first delivery.
- Press Replay > Replay as-is. The drawer now shows the new delivery, with trigger "replay".
Next
Slack and push
Point your app's Slack webhook and push notification calls at the HTTP Catcher, so nothing reaches real people, and see each one previewed.
Share your setup
Export your endpoints, rules, templates, numbers and settings as a seed file, commit it, and give your team and CI the same SendMock.