getWebhookDelivery()
Loads a single webhook delivery detail record by id, including payload and response metadata when available.
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 getWebhookDelivery(appSlug: string, deliveryId: string) { const client = await wachtClient(); return client.webhooks.getWebhookDelivery(appSlug, deliveryId);}Signature
function getWebhookDelivery( appSlug: string, deliveryId: string, options?: { status?: string; },): Promise<WebhookDeliveryDetails>Parameters
›appSlug?: string | undefined;
appSlug?: string | undefined;Webhook app slug that owns the delivery.
›deliveryId?: string | undefined;
deliveryId?: string | undefined;Delivery identifier to fetch.
›status?: string | undefined;
status?: string | undefined;Optional status hint. Use `pending` to force lookup from pending-delivery storage.
Return value
›delivery_id?: string | undefined;
delivery_id?: string | undefined;Stable delivery identifier.
›deployment_id?: string | undefined;
deployment_id?: string | undefined;Deployment identifier.
›app_slug?: string | undefined;
app_slug?: string | undefined;Webhook app slug for this delivery.
›endpoint_id?: string | undefined;
endpoint_id?: string | undefined;Endpoint identifier that processed the delivery.
›event_name?: string | undefined;
event_name?: string | undefined;Delivered event name.
›status?: string | undefined;
status?: string | undefined;Delivery status.
›http_status_code?: number | null | undefined;
http_status_code?: number | null | undefined;HTTP response status code when available.
›response_time_ms?: number | null | undefined;
response_time_ms?: number | null | undefined;Measured response time when available.
›attempt_number?: number | undefined;
attempt_number?: number | undefined;Current attempt number.
›max_attempts?: number | undefined;
max_attempts?: number | undefined;Maximum allowed attempts.
›payload?: unknown | null | undefined;
payload?: unknown | null | undefined;Delivered payload body when available.
›id?: string | undefined;
id?: string | undefined;Common payload identifier field when present.
›event?: string | undefined;
event?: string | undefined;Event-type marker field when present.
›response_body?: string | null | undefined;
response_body?: string | null | undefined;Raw webhook response body when available.
›response_headers?: Record<string, unknown> | null | undefined;
response_headers?: Record<string, unknown> | null | undefined;Response headers when available.
›content-type?: string | undefined;
content-type?: string | undefined;Destination response content type header when returned.
›x-request-id?: string | undefined;
x-request-id?: string | undefined;Destination request-trace header when returned.
›timestamp?: string | undefined;
timestamp?: string | undefined;Delivery timestamp.
Behavior
- Fetches a single resource by identifier or query context.
- Use this result as the source of truth before update, replay, or delete flows.
Examples
Load one delivery detail
import { wachtClient } from '@wacht/nextjs/server';export async function loadDelivery(appSlug: string, deliveryId: string) { const client = await wachtClient(); return client.webhooks.getWebhookDelivery(appSlug, deliveryId);}Inspect a pending delivery
import { wachtClient } from '@wacht/nextjs/server';export async function loadPendingDelivery(appSlug: string, deliveryId: string) { const client = await wachtClient(); return client.webhooks.getWebhookDelivery(appSlug, deliveryId, { status: 'pending', });}