---
title: "Get a segment"
method: GET
path: "/v1/segments/{id}"
tags: ["Segments"]
---

# Get a segment

`GET /v1/segments/{id}`

## Request

- Base URL: `https://api.volanea.com`
- URL: `https://api.volanea.com/v1/segments/{id}`
- Auth: HTTP bearer

One segment: its type, its condition tree if dynamic, and its cached member count.

The count is from the last refresh rather than computed on read. For the actual contacts, use `GET /v1/segments/{id}/members`.

## Path parameters

- `id` string, required

## Response `200`

The segment.

- Segment
  - `segmentId` string, required
  - `projectId` string
  - `name` string, required
  - `description` string, nullable
  - `type` 'dynamic' | 'static', required: Dynamic segments are computed from `conditions`; static segments are managed via the members endpoints.
  - `conditions` SegmentConditions: Nested condition tree evaluated against contacts, their custom `data`, and their activity.
    - `logic` 'and' | 'or', required
    - `groups` object[], required
      - `filters` object[], required
        - `field` string, required: `email`, `subscribed`, `locale`, `createdAt`, `data.<key>`, `event.<name>`, `email.opened`, …
        - `operator` string, required: `equals`, `notEquals`, `contains`, `notContains`, `greaterThan`, `lessThan`, `exists`, `notExists`, `within`, `notWithin`, `triggered`, `notTriggered`, …
        - `value` union
          - string
          - number
          - boolean
        - `days` integer: Time window (days) for activity operators.
  - `memberCount` integer, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `401`: Missing or invalid API key.
- `404`: Not found.
- `422`: Request validation failed (code `validation_error`, 422).

---

[API](https://skmtc.dev/volanea/apis/volanea-api.md) · [All operations](https://skmtc.dev/volanea/apis/volanea-api/llms.txt) · [OpenAPI document](https://skmtc.dev/volanea/apis/volanea-api/revisions/9e187ae84fda?raw)
