createWebhookEventCatalog()
Creates a reusable event catalog that webhook apps can attach via
event_catalog_slug.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 createWebhookEventCatalog() { const client = await wachtClient(); return client.webhooks.createWebhookEventCatalog({ slug: 'default-events', name: 'Default Events', events: [{ name: 'user.created', description: 'Triggered when a user is created' }], });}Signature
function createWebhookEventCatalog( request: CreateWebhookEventCatalogRequest,): Promise<WebhookEventCatalog>Behavior
- Creates a new resource and returns the created object from the backend.
- Validate required fields before calling to avoid predictable request failures.