> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# 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](https://docs.scalekit.com/agentkit/reference/triggers/list-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.

**Request body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `targets` | array of object | Yes | 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. |
| `targets.endpoint_id` | string | Yes | ID of your delivery endpoint (`ep_...`), the URL on your server that you added under **Developers** > **Trigger Delivery**. [Look up a delivery](https://docs.scalekit.com/agentkit/reference/triggers/look-up-a-delivery/) returns it as `endpoint_id` on each attempt. |
| `targets.msg_id` | string | Yes | Message ID of the trigger event to deliver again, as returned in msg_id by [List deliveries](https://docs.scalekit.com/agentkit/reference/triggers/list-deliveries/): `msg_` followed by 1 to 64 letters or digits. |

**Response (200)**

| Name | Type | Description |
| --- | --- | --- |
| `queued_count` | integer | How many new delivery attempts this call queued. |
| `results` | array of object | One result per target, in the order the targets were sent, so a client can pair them up positionally. |
| `results.endpoint_id` | string | Endpoint ID of the target, exactly as sent. |
| `results.msg_id` | string | Message ID of the target, exactly as sent. |
| `results.outcome` | string (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. One of: `BATCH_RESEND_OUTCOME_QUEUED`, `BATCH_RESEND_OUTCOME_NOT_FOUND`, `BATCH_RESEND_OUTCOME_RATE_LIMITED`, `BATCH_RESEND_OUTCOME_FAILED`, `BATCH_RESEND_OUTCOME_NOT_ATTEMPTED`. |
| `results.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. |

**Errors**

- `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 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
- `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

**Request**

```bash
curl -sS -X POST \
  "$SCALEKIT_ENVIRONMENT_URL/api/v1/trigger-delivery/deliveries:batchResend" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "targets": [
      {
        "msg_id": "msg_2qGvA4uPf2HjQ7zTn5KrW8dCxLb",
        "endpoint_id": "ep_2qGv8XHk3mT5bJr9LwNc7pZeYfA"
      }
    ]
  }'
```

**Response**

```json
{
  "results": [
    {
      "msg_id": "msg_2qGvA4uPf2HjQ7zTn5KrW8dCxLb",
      "endpoint_id": "ep_2qGv8XHk3mT5bJr9LwNc7pZeYfA",
      "outcome": "BATCH_RESEND_OUTCOME_QUEUED",
      "reason": ""
    }
  ],
  "queued_count": 1
}
```

**Python SDK:** `scalekit_client.actions.triggers.batch_resend_deliveries`

Send 1 to 50 messages to endpoints again. Each target makes a real delivery attempt and gets its own outcome in `results` (`QUEUED`, `NOT_FOUND`, `RATE_LIMITED`, `FAILED`, `NOT_ATTEMPTED`), which never raise. Not retried on `UNAVAILABLE`: a retry could deliver the messages twice.

```python
scalekit_client.actions.triggers.batch_resend_deliveries(
    targets: Sequence[TriggerDeliveryResendTarget | TriggerDeliveryResendTargetParam],
) -> BatchResendTriggerDeliveriesResponse
```

Example:

```python
result = scalekit_client.actions.triggers.batch_resend_deliveries(
    targets=[{"msg_id": "msg_2qGvA4uPf2HjQ7zTn5KrW8dCxLb", "endpoint_id": "ep_2qGv8XHk3mT5bJr9LwNc7pZeYfA"}],
)
```

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `targets` | `Sequence[TriggerDeliveryResendTarget \| TriggerDeliveryResendTargetParam]` | Yes | `TriggerDeliveryResendTarget` models or `{"msg_id": "msg_...", "endpoint_id": "ep_..."}` dicts. |

Returns `BatchResendTriggerDeliveriesResponse`: Per-target results and `queued_count`.


Part of [Triggers](https://docs.scalekit.com/agentkit/reference/triggers/) in the [AgentKit API reference](https://docs.scalekit.com/agentkit/reference/). Authentication: https://docs.scalekit.com/agentkit/reference/authentication.md. Errors and rate limits: https://docs.scalekit.com/agentkit/reference/errors.md. Pagination: https://docs.scalekit.com/agentkit/reference/pagination.md


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
