> ## Documentation Index
> Fetch the complete documentation index at: https://segmentflow.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Segments

> Read saved audience segments by stable developer key.

Use `segments.retrieve` to get a read-safe Segment status and membership count. Use `segments.preview` when you need a fresh matched-profile count before scheduling a Broadcast.

```ts theme={null}
import Segmentflow from "@segmentflow/segmentflow-typescript";

const client = new Segmentflow({ apiKey: process.env.SEGMENTFLOW_API_KEY });

const segment = await client.v1.segments.retrieve("vip-customers");
const preview = await client.v1.segments.preview("vip-customers");
```
