Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Recover failed deliveries Beta

POST/api/v1/trigger-delivery/endpoints/{endpoint_id}:recover

This endpoint is in beta. Its request and response may change.

Resends every event whose delivery to this endpoint failed between since and until, once your endpoint is working again. Leave out until to recover up to now. The window is at most 14 days, and one call recovers at most 10,000 events, so cover a long outage with several narrower windows. The recovery runs in the background; the response only confirms it started. Calling again resends events that are still failed. Up to 6 requests a minute per environment.

Authorization

Authorization: Bearer $TOKEN, an access token from the client credentials grant. See Authentication.

Path parameters

endpoint_idstringrequired
ID of your delivery endpoint (ep_...), the URL on your server that you added under Developers > Trigger Delivery. Look up a delivery returns it as endpoint_id on each attempt.

Body

sincestringrequired
Start of the window, inclusive: events with a failed attempt to this endpoint at or after this instant are recovered. Must not be in the future, and must be at most 14 days before until, or before now when until is omitted.
untilstring
End of the window, exclusive. Omit it to recover up to now. Must be after since, must not be in the future, and must be at most 14 days after since.

Response 200

statusstring
The recovery's state when this call returned. running in practice: the recovery continues after the response, and its later state is not reported.
task_idstring
Identifies this recovery in Scalekit's logs; quote it when contacting support. It cannot be looked up or polled through the API.

Errors

Every error has the same body: code, message and details. See Errors and rate limits.

400Invalid request, no recovery started - endpoint_id is not an endpoint ID (ep_ followed by 1 to 64 letters or digits); since is missing, or since or until is not a valid timestamp; since is in the future; until is in the future; until is not after since; or until is more than 14 days after since, measured to now when until is omitted, so the period must be split into several calls
404Not found - the endpoint is not one of this environment's trigger delivery endpoints, or Triggers isn't turned on for your environment. No recovery started
429Too many requests - this environment has started too many recoveries in a short period, or requests are being refused for volume. No recovery started; retry after a short wait
500Internal error - the recovery was not confirmed. Either it could not be started, or the request timed out or failed after it may already have been accepted, in which case the error message says it may be running. In that case look for new manual attempts with List deliveries before calling again, because a second call can queue a second attempt for the same event