---
title: "List segments"
method: GET
path: "/segments"
tags: ["Segments"]
---

# List segments

`GET /segments`

## Request

- Base URL: `https://www.unitpost.com/api/v1`
- URL: `https://www.unitpost.com/api/v1/segments`
- Auth: HTTP bearer

Retrieve a list of the segments in your workspace, cursor-paginated. A segment is a saved group of contacts you can target when sending a campaign. Create one with [Create a segment](#post-segments), or list a segment's members with [List segment members](#get-segments-id-contacts). Requires the `segments:read` capability.

## Query parameters

- `limit` integer
- `after` string
- `before` string

## Response `200`

A page of segments.

- object
  - `object` 'list', required
  - `has_more` boolean, required
  - `data` Segment[], required
    - `object` 'segment', required
    - `id` string, required
    - `name` string, required
    - `description` string, nullable, required
    - `type` 'static' | 'dynamic', required
    - `filter` Schema0, required (unresolved $ref)
    - `created_at` string, required
    - `updated_at` string, required

## Other responses

- `401`: Missing or invalid API key.
- `422`: Invalid pagination params.

---

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