Skip to main content
import { createClient } from "@mailsai/sdk";

const client = createClient(); // reads MAILS_API_KEY

const result = await client.webhooks.replayDelivery(
  "whd_01JZX8K3M9Q4P7VN2YB6RTDC0E",
);
console.log(result);
{
  "delivery_id": "whd_01JZX8K3M9Q4P7VN2YB6RTDC0E",
  "event_id": "evt_01JZX8K3M9Q4P7VN2YB6RTDC0E",
  "scheduled": ["<scheduled>"],
  "scheduled_at": "2026-10-04T12:00:00.000Z"
}

Replay a delivery

Re-sends the event behind a previous delivery attempt to that delivery's endpoint only.
POST/v1/webhook-deliveries/{id}/replayscope · manage
import { createClient } from "@mailsai/sdk";

const client = createClient(); // reads MAILS_API_KEY

const result = await client.webhooks.replayDelivery(
  "whd_01JZX8K3M9Q4P7VN2YB6RTDC0E",
);
console.log(result);
{
  "delivery_id": "whd_01JZX8K3M9Q4P7VN2YB6RTDC0E",
  "event_id": "evt_01JZX8K3M9Q4P7VN2YB6RTDC0E",
  "scheduled": ["<scheduled>"],
  "scheduled_at": "2026-10-04T12:00:00.000Z"
}

Path Parameters

idstringrequired

Webhook delivery id (whd_…).

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.

Response

delivery_idstring

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_idstring

The event behind that delivery, which is what was sent again.

scheduledstring[]

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_atstring

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.

Was this page helpful?