NewWacht Bench is live — AI-assisted development for Wacht

archiveWebhookEventInCatalog()

Toggles archived state for a named event inside a webhook event catalog.

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 slug: string = 'slug';  const request: ArchiveWebhookEventInCatalogRequest = {    event_name: 'user.created',    is_archived: true,  };  return client.webhooks.archiveWebhookEventInCatalog(slug, request);}

Signature

function archiveWebhookEventInCatalog(  slug: string,  request: ArchiveWebhookEventInCatalogRequest,  client?: WachtClient,): Promise<WebhookEventCatalog>

Parameters

slug: string;
Slug identifier for the target resource.
request: ArchiveWebhookEventInCatalogRequest;
Request payload object sent to the backend API.
event_name?: string | undefined;
Event name used for archive, trigger, or test operations.
is_archived?: boolean | undefined;
When true, archives the target event; false unarchives it.

Return value

slug?: string | undefined;
Webhook event catalog slug.
name?: string | undefined;
Catalog name.
events?: WebhookEventDefinition[] | undefined;
Event definitions in the catalog.

On this page