# Segments API

Read saved, live-evaluated audience queries.

## Endpoints

- `GET /v1/segments`
- `GET /v1/segments/{id}`

Segments are saved queries evaluated live, so they're read-only via the API — build them in the dashboard and target a campaign with a `segment_id`.

```bash
curl https://emailbump.com/api/v1/segments \
  -H "Authorization: Bearer ebk_your_key"
```

The list returns `{ "data": [...] }`, and `GET /v1/segments/{id}` returns a single `{ "segment": {...} }`.

```json
{
  "segment": {
    "id": "2b1c9d7e-1f2a-4b3c-8d4e-5f6a7b8c9d0e",
    "name": "Active in 30 days",
    "description": "Opened or clicked recently",
    "definition": { "match": "all", "conditions": [] },
    "created_at": "2026-07-21T19:56:38+00:00",
    "updated_at": "2026-07-21T19:56:38+00:00"
  }
}
```
