Docs menu

Replaying deliveries

After an outage on your side, ask for the events you missed instead of rebuilding them.

Find the deliveries

curl "https://api.officehero.io/v1/webhook_endpoints/$ENDPOINT_ID/deliveries?limit=50" \
  -H "Authorization: Bearer $OFFICEHERO_API_KEY"

One row per event sent to the endpoint (and one per replay), newest first, updated with each attempt. Its status:

StatusMeaning
pendingQueued, or waiting for its next attempt (next_attempt_at, attempt).
deliveredYour endpoint answered 2xx.
failedStopped and not retried, with attempts left: your endpoint answered 410 Gone (error_class: gone), the endpoint was paused or disabled when the attempt came up (endpoint_disabled), its URL resolved to a non-public address (ssrf_rejected), the owning key was revoked or lost the scope (api_key_inactive, api_key_scope_insufficient), or the endpoint lost its permission for personal data (pii_capability_blocked).
deadAll 8 attempts failed.

failed and dead deliveries can be replayed. An endpoint that does not exist — or that another API key owns — is a 404.

Replay one delivery

curl -X POST \
  "https://api.officehero.io/v1/webhook_endpoints/$ENDPOINT_ID/deliveries/$DELIVERY_ID/replay" \
  -H "Authorization: Bearer $OFFICEHERO_API_KEY"

The answer is 202 Accepted with the new, queued delivery. It carries the same event — same envelope id and body — with a fresh signature, and replayed_from points at the original. A delivery id that is not this endpoint’s is a 404.

Replay everything that failed

curl -X POST \
  "https://api.officehero.io/v1/webhook_endpoints/$ENDPOINT_ID/deliveries/replay_failed?since=2026-10-09T00:00:00Z" \
  -H "Authorization: Bearer $OFFICEHERO_API_KEY"

This queues a new delivery for every failed or dead delivery created since since and answers 202 with {"enqueued": 3}. since is an RFC 3339 date-time; without it, the last 24 hours. Anything else — a bare date, yesterday — is a 422 (invalid_since).

Each original is replayed at most once: replays, and deliveries that were already replayed, are skipped, and so is a delivery with personal data while the endpoint is not enabled for it. At most 1,000 deliveries per call.

When a replay is refused

AnswerWhy
409 endpoint_not_activeThe endpoint is paused or disabled — a replay could only fail. Resume it first.
403 pii_not_grantedThe delivery carries personal data and the endpoint is not enabled for it.
404No such endpoint for this key, or no such delivery on this endpoint.
429More than 60 single replays a minute, or more than 5 replay_failed calls a minute or 30 an hour, for this key.

Good to know

  • Replays go to the endpoint’s current URL and are signed with its current secret.
  • Your receiver will see event ids it has seen before — that is what deduplication on id is for.
  • Both operations need int:webhooks:manage and accept an Idempotency-Key.