NewWacht Bench is live — AI-assisted development for Wacht

deleteSegment()

Deletes a segment and resolves with a backend response object.

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 deleteSegment(segmentId: string) {  const client = await wachtClient();  return client.segments.deleteSegment(segmentId);}

Signature

function deleteSegment(  segmentId: string,): Promise<Record<string, unknown>>

Parameters

segmentId: string;
Segment id to delete.

Return value

result?: Record<string, unknown> | undefined;
Operation result payload.

Behavior

  • Performs a destructive operation against the target resource.
  • Callers should treat this as irreversible unless a separate restore flow exists.

On this page