Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Resend deliveries Beta

POST/api/v1/trigger-delivery/deliveries:batchResend

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

Queues one more attempt to deliver each event to the endpoint you name, for up to 50 events. BATCH_RESEND_OUTCOME_QUEUED means the attempt was queued, not that it succeeded; check it with List the attempts for a delivery. Each call queues another attempt, so after a partial failure resend only the events that didn't come back QUEUED. Up to 60 requests a minute per environment.

Authorization

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

Body

targetsarray of objectrequired
The deliveries to retry, each a message ID and an endpoint ID: at least 1 and at most 50. A msg_id and endpoint_id pair may appear only once; a repeated pair refuses the whole request rather than queueing two attempts. The same message may appear with different endpoints, and the same endpoint with different messages.
Show 2 child attributes
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.
msg_idstringrequired
Message ID of the trigger event to deliver again, as returned in msg_id by List deliveries: msg_ followed by 1 to 64 letters or digits.

Response 200

queued_countinteger
How many new delivery attempts this call queued.
resultsarray of object
One result per target, in the order the targets were sent, so a client can pair them up positionally.
Show 4 child attributes
endpoint_idstring
Endpoint ID of the target, exactly as sent.
msg_idstring
Message ID of the target, exactly as sent.
outcomestring (enum)
What happened to this target. BATCH_RESEND_OUTCOME_QUEUED — a new manual attempt was queued; it has not been delivered yet. BATCH_RESEND_OUTCOME_NOT_FOUND — the message or the endpoint does not exist in this environment. BATCH_RESEND_OUTCOME_RATE_LIMITED — refused for volume; send this target again shortly. BATCH_RESEND_OUTCOME_FAILED — no new attempt could be confirmed as queued; one whose request timed out may still have been, so a retry can queue a second attempt. A target whose event payload is no longer stored is also FAILED, with a reason saying it cannot be resent; retrying it will not help. BATCH_RESEND_OUTCOME_NOT_ATTEMPTED — not sent, because an earlier target was rate limited or the request ran out of time; nothing was queued for it.
BATCH_RESEND_OUTCOME_QUEUEDBATCH_RESEND_OUTCOME_NOT_FOUNDBATCH_RESEND_OUTCOME_RATE_LIMITEDBATCH_RESEND_OUTCOME_FAILEDBATCH_RESEND_OUTCOME_NOT_ATTEMPTED
reasonstring
One sentence explaining the outcome. Empty for BATCH_RESEND_OUTCOME_QUEUED. Never contains internal error detail. The wording can change: match on outcome, not on this text.

Errors

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

400Invalid request, nothing queued - targets is empty or holds more than 50; a msg_id is not a message ID (msg_ followed by 1 to 64 letters or digits) or an endpoint_id is not an endpoint ID (ep_ followed by 1 to 64 letters or digits); or the same msg_id and endpoint_id pair appears twice, since sending it twice would queue two attempts. A well-formed message or endpoint ID that does not exist in this environment is not this case: it comes back as a NOT_FOUND result with a 200
404Not found - Triggers isn't turned on for your environment. Nothing was queued. A message or endpoint that does not exist is not this case: it is a NOT_FOUND result with a 200
429Too many requests - this environment has sent too many batch resend requests in the last minute. Nothing was queued; retry after a short wait. A rate limit reached partway through a batch is not this case: it is reported per target as RATE_LIMITED, with a 200
500Internal error - the environment's trigger deliveries could not be reached, so nothing was queued; retry the request