---
title: "Lists all segments (based on params provided)"
method: GET
path: "/v1/segments"
tags: ["segment"]
---

# Lists all segments (based on params provided)

`GET /v1/segments`

This endpoint retrieves a list of segments based on the provided query parameters, including pagination details.

## Query parameters

- `pageToken` string
- `pageSize` string, int64
- `nameContains` string
- `teamId` string
- `retailerTeamIds` string[]

## Response `200`

A list of segments and a pagination token.

- V1ListSegmentsResponse
  - `segments` V1Segment[] — The list of segments based on provided criteria.
    - `id` string
    - `segmentId` string — The identifier of the segment.
    - `sourceId` string — The identifier the source where the segment came from.
    - `name` string — The name of the campaign.
    - `description` string — Meaningful description of the segment.
    - `category` string[] — The category to which segment belongs.
    - `retailerTeamId` string — The identifier of the retailer that owns the segment.
  - `nextPageToken` string — The page token for requesting the next page of the pagination. Should be used as "pageToken" in the request
  - `totalCount` string, int64 — The total number of segments that match provided criteria.

## Other responses

- `400` — There was a problem with input.
- `401` — Login failed or token not valid.
- `403` — Login failed or token not valid.
- `default` — An unexpected error response.

---

[API](https://skmtc.net/citrusad/apis/citrus-auth-api.md) · [All operations](https://skmtc.net/citrusad/apis/citrus-auth-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/citrusad/citrus-auth-api/revisions/a040003c7378/schema)
