NewWacht Bench is live — AI-assisted development for Wacht

testWebhookEndpoint()

Runs a test delivery against one webhook endpoint and returns probe results.

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 example() {  const client = await wachtClient();  const appSlug: string = 'appslug';  const endpointId: string = 'endpointid-123';  const request: TestWebhookEndpointRequest = {    event_name: 'user.created',    payload: { id: 'user_123' },  };  return client.webhooks.testWebhookEndpoint(appSlug, endpointId, request);}

Signature

function testWebhookEndpoint(  appSlug: string,  endpointId: string,  request: TestWebhookEndpointRequest,): Promise<TestWebhookEndpointResponse>

TestWebhookEndpointRequest

appSlug?: string | undefined;
Webhook app slug.
endpointId?: string | undefined;
Webhook endpoint id.
event_name?: string | undefined;
Event name used for the test dispatch.
payload?: Record<string, unknown> | undefined;
Optional test payload.
id?: string | undefined;
Event entity identifier used during test dispatch.

Return value

result?: TestWebhookEndpointResponse | undefined;
Operation result payload.

On this page