---
title: "Get segments"
method: GET
path: "/v1/segment"
tags: ["Segment"]
---

# Get segments

`GET /v1/segment`

## Request

- Base URL: `https://app.aptrinsic.com`
- URL: `https://app.aptrinsic.com/v1/segment`
- Auth: none declared
- TypeScript: <https://skmtc.dev/gainsight/apis/gainsight-px-rest-api/docs/v1/segment/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves segments. Supports paging.
Examples: 

| URI   | Results  |
| ----- | -------- |
| GET /v1/segment?pageSize=100 | Get first 100 segments. |
| GET /v1/segment?pageSize=100&pageNumber=1 | Get next 100 segments. |

## Query parameters

- `pageNumber` integer
- `pageSize` integer

## Response `200`

Success

- SegmentsPage
  - `segments` Segment[]: Array of segments
    - `id` string, required
    - `name` string, required
  - `pageNumber` integer: Page number
  - `isLastPage` boolean: True if no more records available on next page

## Other responses

- `400`: Bad request
- `401`: Unauthorized or bad API Key
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/gainsight/apis/gainsight-px-rest-api.md) - [All operations](https://skmtc.dev/gainsight/apis/gainsight-px-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gainsight/apis/gainsight-px-rest-api/revisions/e7b197b373d8?raw)
