---
title: "Replay a delivery"
method: POST
path: "/v1/webhook-deliveries/{id}/replay"
tags: ["Webhooks"]
---

# Replay a delivery

`POST /v1/webhook-deliveries/{id}/replay`

## Request

- Base URL: `https://api.mails.ai`
- URL: `https://api.mails.ai/v1/webhook-deliveries/{id}/replay`
- Auth: HTTP bearer

**Requires scope:** `manage`. Re-sends the event behind a previous delivery attempt to that delivery's endpoint only. Other endpoints subscribed to the event are not sent it again; to re-send an event to every subscribed endpoint, use `POST /v1/events/{id}/redeliver`.

## Path parameters

- `id` string, required

## Response `202`

Replay scheduled.

- object
  - `delivery_id` string, required: The delivery that was replayed: the id in the path. The replay is recorded as a new delivery with its own id, which `GET /v1/webhooks/{id}/deliveries` lists.
  - `event_id` string, required: The event behind that delivery, which is what was sent again.
  - `scheduled` string[], required: The endpoint the replay went to (`whe_…`): one id, or empty when that endpoint is paused or no longer subscribed to the event type.
  - `scheduled_at` string, date-time, required: When the replay finished (ISO 8601, UTC), set even when `scheduled` is empty. The attempt has been made by then, and a failed one is retried like any delivery.

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required scope (`insufficient_scope`), or the token belongs to an app connected by sign-in and this operation is closed to connected apps (`connected_app_not_allowed`).
- `404`: Resource not found in this workspace, or the agent a send names is archived (`agent_archived`).
- `429`: Rate or quota limit exceeded. The body's `resets_at` and `retry_after_seconds` say when the request can succeed. A `Retry-After` header is sent only when that is 60 seconds or less; a longer wait (an hourly, daily or monthly cap) sends none, so retry at `resets_at` or raise the limit instead of sleeping.
- `500`: Internal server error.

---

[API](https://skmtc.dev/mails/apis/mails-ai-api.md) · [All operations](https://skmtc.dev/mails/apis/mails-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mails/apis/mails-ai-api/revisions/4d4930a8c33b?raw)
