NewWacht Bench is live — AI-assisted development for Wacht

removeFromSegment()

Removes a target entity id from a segment.

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

Signature

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

Parameters

segmentId: string;
Segment id.
entityId: string;
Entity id to remove.

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