---
title: "Resend several trigger deliveries"
method: POST
path: "/api/v1/trigger-delivery/deliveries:batchResend"
tags: ["Triggers"]
---

# Resend several trigger deliveries

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

## Request

- Base URL: `https://$SCALEKIT_ENVIRONMENT_URL`
- URL: `https://$SCALEKIT_ENVIRONMENT_URL/api/v1/trigger-delivery/deliveries:batchResend`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://$SCALEKIT_ENVIRONMENT_URL/oauth/token`
- TypeScript: <https://skmtc.dev/scalekit/apis/scalekit-api-reference/docs/api/v1/trigger-delivery/deliveries:batchResend/post.ts> (a function with typed inputs; its response is checked against the schema)

Queues a new delivery attempt for up to 50 trigger events, each to one delivery endpoint, and reports what happened to each target separately. Use this to retry deliveries that failed, for example a selection from ListTriggerDeliveriesByEndpoint, instead of resending them one at a time. Pass the targets in the body; each names a message ID and the endpoint to deliver that event to again. QUEUED means a new manual attempt was accepted for delivery, not that the event was delivered: the attempt and its outcome appear in ListTriggerDeliveryAttemptsByMessage as a TRIGGER_DELIVERY_ATTEMPT_TRIGGER_TYPE_MANUAL attempt. The call is best-effort: a target that fails does not undo one that was queued. Resending is not idempotent: each time a target is sent it queues one more attempt, so after a partial failure retry only the targets that came back RATE_LIMITED, FAILED or NOT_ATTEMPTED, never the whole request. A FAILED target whose request timed out may still have been queued, so retrying it can queue a second attempt. A FAILED target whose event payload is no longer stored can never be resent; its reason says so. When a target is rate limited the batch stops: targets not yet started come back NOT_ATTEMPTED, while a target already in flight finishes with its own outcome. Returns one result per target, in the order sent, each with its outcome and a reason, plus queued_count. The event payload is never returned.

## Request body

- TriggersBatchResendTriggerDeliveriesRequest: The deliveries to retry. A repeated msg_id and endpoint_id pair is refused by the service: unique cannot be declared on a list of messages, and sending the pair twice would queue two attempts.
  - `targets` TriggersTriggerDeliveryResendTarget[], required: 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.
    - `endpoint_id` string, required: ID of the delivery endpoint to deliver the event to again: `ep_` followed by 1 to 64 letters or digits.
    - `msg_id` string, required: Message ID of the trigger event to deliver again, as returned in msg_id by ListTriggerDeliveriesByEndpoint: `msg_` followed by 1 to 64 letters or digits.

## Response `200`

Request processed; every target has its own result in results, in the order sent, and queued_count says how many new attempts this call queued

- TriggersBatchResendTriggerDeliveriesResponse
  - `queued_count` integer: How many new delivery attempts this call queued.
  - `results` TriggersBatchResendTriggerDeliveryResult[]: One result per target, in the order the targets were sent, so a client can pair them up positionally.
    - `endpoint_id` string: Endpoint ID of the target, exactly as sent.
    - `msg_id` string: Message ID of the target, exactly as sent.
    - `outcome` 'BATCH_RESEND_OUTCOME_QUEUED' | 'BATCH_RESEND_OUTCOME_NOT_FOUND' | 'BATCH_RESEND_OUTCOME_RATE_LIMITED' | 'BATCH_RESEND_OUTCOME_FAILED' | 'BATCH_RESEND_OUTCOME_NOT_ATTEMPTED': What happened to one target in a batch resend. - BATCH_RESEND_OUTCOME_QUEUED: A new manual delivery attempt was queued. Not yet delivered: its outcome appears with the message's other attempts. - BATCH_RESEND_OUTCOME_NOT_FOUND: The message or the endpoint does not exist in this environment's trigger delivery application. Another environment's IDs are reported exactly like missing ones. - BATCH_RESEND_OUTCOME_RATE_LIMITED: Refused for volume. The batch stops: every target that had not started by then is NOT_ATTEMPTED, wherever it sits in the list. - BATCH_RESEND_OUTCOME_FAILED: No new attempt could be confirmed as queued. A target whose request timed out may still have been queued, so retrying it can queue a second attempt. A target whose event payload is no longer stored is also FAILED, and resending it can never succeed; its reason says so. - 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.
    - `reason` string: 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.

## Other responses

- `400`: Invalid 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
- `404`: Not found - Triggers is not enabled for the 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
- `429`: Too 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
- `500`: Internal error - the environment's trigger deliveries could not be reached, so nothing was queued; retry the request

## Changes

- **2026-10-30** `f47f1022d844`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/scalekit/apis/scalekit-api-reference/changes/api/v1/trigger-delivery/deliveries:batchResend/post.md)

---

[API](https://skmtc.dev/scalekit/apis/scalekit-api-reference.md) - [All operations](https://skmtc.dev/scalekit/apis/scalekit-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/scalekit/apis/scalekit-api-reference/revisions/f47f1022d844?raw)
