Webhook deliveries overview

How to find a webhook delivery, read what was sent and how your receiver answered, and replay it after a failure.

A delivery is one event sent to one of your endpoints, with its attempts and your receiver's last answer. These calls are how you debug a receiver and recover from downtime. They need a provider key and ignore the partner header.

EndpointWhat it does
GET /webhooks/deliveriesPages through deliveries, newest first.
GET /webhooks/deliveries/{id}Reads one, with its payload and attempts.
POST /webhooks/deliveries/{id}/replaySends it again as a new delivery.

The flow#

Recovering from a receiver outage
Recovering from a receiver outageLocaloyYour receiverYour platform1. Deliver an eventReceiver is down — attempts fail, then FAILEDAfter you fix the receiver2. GET /webhooks/deliveries?status=FAILED3. 200 failed deliveries4. GET /webhooks/deliveries/{id}5. 200 payload, attempts, last answer6. POST …/{id}/replay7. 202 queued as a new delivery8. Same event id, same payload9. 2xx — SUCCEEDED
  1. Localoy → Your receiver: Deliver an event
  2. Note: Receiver is down — attempts fail, then FAILED
  3. — After you fix the receiver —
  4. Your platform → Localoy: GET /webhooks/deliveries?status=FAILED
  5. Localoy → Your platform: 200 failed deliveries
  6. Your platform → Localoy: GET /webhooks/deliveries/{id}
  7. Localoy → Your platform: 200 payload, attempts, last answer
  8. Your platform → Localoy: POST …/{id}/replay
  9. Localoy → Your platform: 202 queued as a new delivery
  10. Localoy → Your receiver: Same event id, same payload
  11. Your receiver → Localoy: 2xx — SUCCEEDED
  1. Find it. Filter the list by partnerId, endpointId, event or status. PENDING is waiting for nextAttemptAt; SUCCEEDED got a 2xx; FAILED ran out of attempts or failed in a way that is not retried. Page with limit and offset.
  2. Inspect it. Retrieve one delivery for the exact payload and the outcome of its latest attempt.
  3. Replay it. The replay is a new delivery through the queue, with the usual retries. The original stays as it was. It carries the same event ID and payload, so deduplicate on the event ID, and it is marked isTest: true because it is not a new occurrence. Follow it with the retrieve call; the replay itself answers 202.

Rules to remember#

  • A replay to a disabled endpoint answers 409 webhook_endpoint_disabled — enable it first.
  • A replay about a partner who has since paused or disconnected you answers 409 webhook_replay_connection_inactive.
  • An unknown delivery answers 404 webhook_delivery_not_found.

Guide: Webhooks for providers and Delivery and retries.