NewWacht Bench is live — AI-assisted development for Wacht

replayWebhookDelivery()

Queues a replay task for one delivery id by calling the replay endpoint with a single-item delivery_ids payload.

Usage

The following example shows a basic usage of the backend client from @wacht/nextjs/server.

import { wachtClient } from '@wacht/nextjs/server';export async function replayDelivery(appSlug: string, deliveryId: string) {  const client = await wachtClient();  return client.webhooks.replayWebhookDelivery(appSlug, deliveryId);}

Signature

function replayWebhookDelivery(  appSlug: string,  deliveryId: string,  options?: {    idempotency_key?: string;  },): Promise<ReplayWebhookDeliveryResponse>

Parameters

appSlug?: string | undefined;
Webhook app slug that owns the delivery.
deliveryId?: string | undefined;
Delivery id to replay.
idempotency_key?: string | undefined;
Optional idempotency key for replay de-duplication.

Return value

status?: string | undefined;
Replay task state returned by backend (for example `queued`).
message?: string | undefined;
Human-readable replay status message.
task_id?: string | null | undefined;
Replay task id when one is created/resolved.

Behavior

  • Wraps the corresponding backend endpoint for this capability.
  • Use the returned payload as canonical backend state for follow-up operations.

Examples

Replay one failed delivery

import { wachtClient } from '@wacht/nextjs/server';export async function replayFailedDelivery(appSlug: string, deliveryId: string) {  const client = await wachtClient();  return client.webhooks.replayWebhookDelivery(appSlug, deliveryId);}

Replay with explicit idempotency key

import { wachtClient } from '@wacht/nextjs/server';export async function replayWithIdempotency(appSlug: string, deliveryId: string) {  const client = await wachtClient();  return client.webhooks.replayWebhookDelivery(appSlug, deliveryId, {    idempotency_key: 'replay-user-created-12345',  });}

On this page