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

# Retrieve a segment

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

## Request

- Base URL: `https://api.sendly.now`
- URL: `https://api.sendly.now/api/v1/segments/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `better-auth.session_token`
  - OAuth 2 (authorization code, authorization URL `https://app.sendly.now/api/auth/oauth2/authorize`, token URL `https://app.sendly.now/api/auth/oauth2/token`, scopes: `segments:read`)

Fetch one segment, including its saved `condition` and materialized `member_count`.

Requires the `segments:read` scope — View your segments and who belongs to them.

## Path parameters

- `id` string, uuid, required: Resource id.

## Response `200`

The segment

- SegmentV1: A segment as exposed on the v1 API.
  - `condition` FilterConditionV1, required: A filter condition: one or more groups combined with `logic`.
    - `groups` FilterGroupV1[], required
      - `conditions` FilterConditionV1 (recursive)
      - `filters` SegmentFilterV1[], required
        - `field` string, required
        - `operator` 'equals' | 'notEquals' | 'contains' | 'notContains' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqual' | 'lessThanOrEqual' | 'exists' | 'notExists' | 'within' | 'olderThan' | 'triggered' | 'triggeredWithin' | 'triggeredOlderThan' | 'notTriggered' | 'notTriggeredWithin' | 'isMemberOf', required
        - `unit` 'days' | 'hours' | 'minutes'
        - `value` unknown
    - `logic` 'AND' | 'OR', required
  - `created_at` string, date-time, required
  - `description` string, nullable, required
  - `id` string, uuid, required
  - `member_count` integer, required
  - `name` string, required
  - `track_membership` boolean, required
  - `type` 'DYNAMIC' | 'STATIC', required
  - `updated_at` string, date-time, required

## Other responses

- `401`: `invalid_api_key` or `invalid_session` — missing or invalid credentials.
- `403`: `scope_missing`, `project_access_denied`, or `project_disabled`.
- `404`: `resource_not_found` — no segment with this id belongs to the authenticated project.
- `422`: `validation_error` — query, path, or body parameters did not match the schema.
- `429`: `rate_limited` — see `Retry-After` and the `RateLimit` headers.
- `500`: `internal_error`.

---

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