updateSegment()
Updates mutable segment fields. Currently this is name-only.
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 renameSegment(segmentId: string) { const client = await wachtClient(); return client.segments.updateSegment(segmentId, { name: 'Enterprise Customers' });}Signature
function updateSegment( segmentId: string, request: UpdateSegmentRequest,): Promise<Segment>Parameters
›segmentId: string;
segmentId: string;Segment id.
›name?: string | undefined;
name?: string | undefined;Updated segment name.
Return value
›result?: Segment | undefined;
result?: Segment | undefined;Operation result payload.
Behavior
- Applies a partial update and returns the server-side updated resource.
- Treat omitted optional fields as unchanged unless explicitly documented otherwise.