Your customer fixed their destination, and a delivery that failed yesterday should go through now. Or an event arrived late and its delivery is held. A resend gives one delivery one more attempt.
Before you start
You need:
- An API key with the
deliveries:readanddeliveries:writescopes, inPAYLOADPUFFIN_API_KEY. - A destination that can accept the request now. A resend that fails isn't retried.
In the console, open the event, expand the delivery, and press Resend. The rest of this page uses the API.
A resend runs the destination's transform as it's published now, like every retry does. If a transform bug failed the delivery, publish the fix first, then resend. If you removed the transform, the resend sends the payload unchanged. If the destination was deleted, the delivery fails.
The delivery keeps its webhook-id, but a resend with new transform code can send a different body. A receiver that already accepted that ID may drop it as a duplicate, so resend to recover deliveries the receiver never accepted.
Find the delivery
List the deliveries that need attention. Use status=failed for deliveries that used up their retries, or status=held for deliveries that were never attempted:
curl "https://api.payloadpuffin.com/v1/deliveries?status=failed&limit=10" \
-H "Authorization: Bearer $PAYLOADPUFFIN_API_KEY"Each row has an id that starts with dlv_. Copy the ID of the delivery you want to resend into DELIVERY_ID:
DELIVERY_ID=dlv_01jbsw8qbee008000000000008To find the deliveries of one event instead, use Get an event with a key that also has events:read.
Resend it
Send POST /v1/deliveries/{deliveryId}/resend with no body:
curl -X POST "https://api.payloadpuffin.com/v1/deliveries/$DELIVERY_ID/resend" \
-H "Authorization: Bearer $PAYLOADPUFFIN_API_KEY"PayloadPuffin answers 202 Accepted:
/v1/deliveries/{deliveryId}/resendReturnsFull referenceA new attempt was queued for the delivery.202
dataobject RequiredReceipt for one re-queued delivery. The delivery gains exactly one further attempt and keeps every attempt already recorded; it does not restart the retry schedule, so a delivery that has exhausted its retries fires once and settles.
deliveryIdstring RequiredThe delivery that was re-queued.
attemptNumbernumber RequiredThe attempt number this resend will make. One more than the attempts already recorded.
At least 1
attemptNumber is the number this attempt will have, one more than the attempts already recorded. The 202 means the attempt is queued, not that it succeeded.
Check the result
Read the delivery again after a few seconds:
curl "https://api.payloadpuffin.com/v1/deliveries/$DELIVERY_ID" \
-H "Authorization: Bearer $PAYLOADPUFFIN_API_KEY"The new attempt is last in attempts. The delivery is delivered if the attempt got a 2xx, and failed if it didn't. While the attempt waits or runs, the delivery is retrying or delivering.
If the resend is refused
| Status | Code | What to do |
|---|---|---|
404 | not_found | Check the ID and the API key's app. The delivery doesn't exist in this app, or its event's retention has ended. |
409 | conflict | An attempt for this delivery is running now. Wait for it to finish, read the delivery, and resend only if it failed. |
409 | conflict | The destination is paused for failing. Resume it, then resend. |
403 | permission_denied | Add the deliveries:write scope to the key. |
429 | rate_limited | You resent this delivery less than 30 seconds ago. Wait the seconds in the Retry-After header, then resend. |
What a resend does and doesn't do
A resend makes exactly one attempt. If that attempt fails, the delivery is failed straight away. The retry schedule doesn't start again and the attempt counter doesn't reset, so attemptCount can go past 8. Every earlier attempt stays in the history.
A resend of a delivery that is still retrying replaces its remaining scheduled retries with this one attempt. To keep the automatic schedule, let it run.
You asked for a resend, so the waits that protect a failing destination don't hold it:
- During a pause the destination asked for with
Retry-After, the resend goes out anyway. If it gets a2xx, the pause ends. New deliveries go out at once, and the ones already waiting go out when their own wait ends. - An open circuit breaker doesn't hold it either. The resend goes out at once as the circuit's test, unless another test is already on its way. Its response decides whether the circuit closes or stays open, using the same rules as any probe.
The destination's concurrency and rate limit still apply. When they're full, the resend waits for room. Retries describes these waits.
A resend works on a delivered delivery too, and sends the event again with the same webhook-id. A receiver that records the webhook-id values it processed skips this request, so resend a delivered delivery only when the receiver can process it again.
A resend never extends the event's retention. Once the event expires, its deliveries can't be resent.