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

# List segments

`GET /segments`

## Request

- Base URL: `https://app.amperity.com/api`
- URL: `https://app.amperity.com/api/segments`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/amperity/apis/amperity-api/docs/segments/get.ts> (a function with typed inputs; its response is checked against the schema)

Return a list of segments from your tenant.

## Query parameters

- `api_version` string
- `with_total` boolean
- `limit` integer
- `next_token` string

## Headers

- `Amperity-Tenant` string, required
- `Api-Version` string, required

## Response `200`

List of segments

- SegmentListEnvelope: Paginated list of Segments
  - `data` Segment[], required: Segment items on this page
    - `id` string, required: Segment id
    - `name` string, required: Segment name
    - `status` string, required: The current status of the segment.
  - `next_token` string: The cursor value to use in a subsequent request to return the next page of results.
  - `total` integer: The total count of all results. This property is only returned when `with_total` is set to `true` in a request.

## Other responses

- `400`: Bad Request
- `401`: Authentication Required
- `403`: Not Authorized
- `404`: Not Found
- `405`: Method Not Allowed
- `500`: Internal Error

---

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