> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracklysms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk Replay Deliveries

> Enqueue up to 100 stored deliveries for asynchronous re-delivery, selected by filter.

**Enqueues** up to **100** matching deliveries (oldest first) for **asynchronous** re-delivery and returns `202 Accepted` — the request itself never performs outbound POSTs. The retry sweep re-delivers them at its own paced rate. Provide **at least one** filter. Each re-delivery keeps its original `event_id`, so receivers dedupe.

## Body Parameters

Provide at least one:

<ParamField body="event_id" type="string">Re-deliver all deliveries of one logical event (across endpoints).</ParamField>
<ParamField body="endpoint_id" type="string">Re-deliver deliveries for one endpoint.</ParamField>
<ParamField body="state" type="string">Re-deliver deliveries in a state: `pending`, `delivered`, `failed`, `dead`.</ParamField>
<ParamField body="date_from" type="string">Lower bound on `created_at` (ISO-8601, timezone-aware).</ParamField>
<ParamField body="date_to" type="string">Upper bound on `created_at` (ISO-8601, timezone-aware).</ParamField>

A delivery whose endpoint is inactive is **skipped** (not an error). Re-running the same filter is **idempotent**: a delivery that already has a live scheduled retry is reported as `skipped`, never double-fired.

## Examples

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.tracklysms.com/api/v2/webhooks/deliveries/replay \
    -H "X-Api-Key: trk_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{ "endpoint_id": "66b0f7c84a1d4b2e9c3a1f2e", "state": "dead" }'
  ```
</RequestExample>

<ResponseExample>
  ```json 202 — Accepted theme={null}
  {
    "requested": 42,
    "requeued": 40,
    "skipped": 2,
    "failed": 0,
    "truncated": false,
    "last_created_at": "2026-07-27T18:04:11.512000Z"
  }
  ```
</ResponseExample>

`truncated` is `true` when more than 100 deliveries matched. `last_created_at` is the `created_at` of the last delivery this call selected — pass it as the next call's `date_from` to advance past the page you just enqueued.

<Note>
  Bulk replay is capped at 100 per call and rate-limited per account. To back-fill a large range, walk it with `date_from = last_created_at` while `truncated` is `true`. Repeating the *same* filter is safe but does not advance: selection is oldest-first and a requeued delivery keeps its `created_at`, so the same page is re-selected and reported as `skipped` until the sweep delivers it.
</Note>

## Error Codes

| HTTP Status | Error Code            | Description                                  |
| ----------- | --------------------- | -------------------------------------------- |
| 400         | `validation_failed`   | No filter provided, or a bad parameter.      |
| 429         | `rate_limit_exceeded` | Too many replay requests; see `Retry-After`. |
