# POST /opportunities/lead-segments/preview

**Resource:** [Opportunities](./opportunities.md)  
**MCP tool:** `preview_lead_segment`  
**Scopes:** `opportunities:read`  
**Write operation:** no

Try segment rules without saving: how many leads match right now, five example leads (highest score first), and how many are already in other active segments.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `rules` | body | object | yes | Who is in it. rules = { "include": [condition, ...], "exclude": [condition, ...] }. A lead is in the segment when it matches EVERY include and NO exclude. At least one include is required.
A condition is { "field", "op", "value" }:
- score \| fit \| interest: op "gte" or "lte", value 1 to 10 (unresearched leads never match).
- band: op "in", value from ["hot","warm","cool","none"] (hot is 8+, warm 5 to 7, cool under 5, none is not scored).
- kind: op "in", value from ["business","person","unknown","none"].
- status: op "in", value from ["open","won","lost"].
- feedback: op "in", value from ["not_a_fit","wrong_person","none"].
- contacted \| replied \| researched: op "is", value true or false.
- age_days: op "gte" (arrived at least N days ago) or "lte" (arrived in the last N days), value 0 to 365.
- quiet_days: op "gte", value 1 to 365 (days since the team last called, texted, emailed or met them, or since arrival).
- source: op "in", value a list of lead source names.
- pipeline \| stage: op "in", value a list of workflow or stage ids.
- assigned: op "in", value a list of user ids, or "none" for nobody assigned.
- custom: { "field": "custom", "key": "<custom field id>", "op": "eq" \| "neq" \| "contains" \| "empty" \| "not_empty", "value": "<text>" } (no value for empty / not_empty). |

## Request example

```bash
curl -X POST   "https://api.trustpager.com/functions/v1/api/v1/opportunities/lead-segments/preview"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"rules":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`