---
title: "Get Segments"
description: "How to call Get Segments (GET /api/segments) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/v2025-01-15/reference/get_segments"
revision: "2025-01-15"
latestUrl: "https://developers.klaviyo.com/en/reference/get_segments"
operationId: "get_segments"
method: "GET"
endpoint: "https://a.klaviyo.com/api/segments"
authentication: "privateKey"
scopes: ["segments:read"]
rateLimits: {"burst":"75/s","steady":"700/m"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
jsonApi: {"include":["flow-triggers","tags"],"fields":{"flow":["name","status","archived","created","updated","trigger_type"],"segment":["name","definition","definition.condition_groups","created","updated","is_active","is_processing","is_starred"],"tag":["name"]},"sort":["created","-created","id","-id","name","-name","updated","-updated"],"pagination":{"style":"cursor"}}
related: ["https://developers.klaviyo.com/en/v2025-01-15/reference/segments/llms.txt","https://developers.klaviyo.com/en/v2025-01-15/reference/get_segment.md","https://developers.klaviyo.com/en/v2025-01-15/reference/create_segment.md","https://developers.klaviyo.com/en/v2025-01-15/reference/update_segment.md","https://developers.klaviyo.com/en/v2025-01-15/reference/delete_segment.md","https://developers.klaviyo.com/en/v2025-01-15/reference/get_tags_for_segment.md","https://developers.klaviyo.com/en/v2025-01-15/reference/get_tag_ids_for_segment.md","https://developers.klaviyo.com/en/v2025-01-15/reference/get_profiles_for_segment.md","https://developers.klaviyo.com/en/v2025-01-15/reference/get_profile_ids_for_segment.md","https://developers.klaviyo.com/en/v2025-01-15/reference/get_flows_triggered_by_segment.md","https://developers.klaviyo.com/en/v2025-01-15/reference/get_ids_for_flows_triggered_by_segment.md"]
---

# Get Segments

> This is the Markdown version of https://developers.klaviyo.com/en/v2025-01-15/reference/get_segments

```http
GET https://a.klaviyo.com/api/segments
```

Get all segments in an account.

Filter to request a subset of all segments. Segments can be filtered by `name`, `created`, and `updated` fields.

Returns a maximum of 10 results per page.

- Revision header: `revision: 2025-01-15` (required)
- Scopes: `segments:read`
- Rate limits: Burst: `75/s`, Steady: `700/m`

## Example request

```bash
curl --request GET \
     --url 'https://a.klaviyo.com/api/segments' \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'revision: 2025-01-15'
```

## Query parameters

- `fields[flow]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/v2025-01-15/reference.md) Allowed values: `name`, `status`, `archived`, `created`, `updated`, `trigger_type`
- `fields[segment]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/v2025-01-15/reference.md) Allowed values: `name`, `definition`, `definition.condition_groups`, `created`, `updated`, `is_active`, `is_processing`, `is_starred`
- `fields[tag]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/v2025-01-15/reference.md) Allowed values: `name`
- `filter` (string): For more information please visit [API overview](https://developers.klaviyo.com/en/v2025-01-15/reference.md)\
  Allowed field(s)/operator(s):\
  `name`: `any`, `equals`\
  `id`: `any`, `equals`\
  `created`: `greater-than`\
  `updated`: `greater-than`\
  `is_active`: `any`, `equals`\
  `is_starred`: `equals` Example: `equals(name,['example'])`
- `include` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/v2025-01-15/reference.md) Allowed values: `flow-triggers`, `tags`
- `page[cursor]` (string): For more information please visit [API overview](https://developers.klaviyo.com/en/v2025-01-15/reference.md)
- `sort` (string): For more information please visit [API overview](https://developers.klaviyo.com/en/v2025-01-15/reference.md) Allowed values: `created`, `-created`, `id`, `-id`, `name`, `-name`, `updated`, `-updated`

## Headers

- `revision` (string, required): API endpoint revision (format: YYYY-MM-DD[.suffix]) Default: `2025-01-15`

## Responses

### 200: Success

Content type: `application/vnd.api+json`

- `data` (object[], required)
  - `relationships` (object)
    - `profiles` (object)
      - `links` (object): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
    - `tags` (object)
      - `data` (object[]): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
      - `links` (RelationshipLinks): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
    - `flow-triggers` (object)
      - `data` (object[]): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
      - `links` (RelationshipLinks): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
  - `type` (string, required): Allowed values: `segment`
  - `id` (string, required)
  - `attributes` (object, required)
    - `name` (string, nullable): A helpful name to label the segment Example: `Repeat Purchasers`
    - `definition` (object)
      - `condition_groups` (object[], required): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
    - `created` (string<date-time>, nullable): Date and time when the segment was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm) Example: `2022-11-08T00:00:00+00:00`
    - `updated` (string<date-time>, nullable): Date and time when the segment was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm) Example: `2022-11-08T00:00:00+00:00`
    - `is_active` (boolean, required)
    - `is_processing` (boolean, required)
    - `is_starred` (boolean, required)
  - `links` (object, required)
    - `self` (string<uri>, required)
- `links` (object)
  - `self` (string<uri>, required)
  - `first` (string<uri>)
  - `last` (string<uri>)
  - `prev` (string<uri>)
  - `next` (string<uri>)
- `included` (oneOf[])
  - One of:
    - Option 1: `FlowResponseObjectResource`
      - `type` (string, required): Allowed values: `flow`
      - `id` (string, required)
      - `attributes` (object, required): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
      - `links` (ObjectLinks, required): Same fields as the first ObjectLinks above.
    - Option 2: `TagResponseObjectResource`
      - `type` (string, required): Allowed values: `tag`
      - `id` (string, required): The Tag ID Example: `abcd1234-ef56-gh78-ij90-abcdef123456`
      - `attributes` (object, required): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
      - `links` (ObjectLinks, required): Same fields as the first ObjectLinks above.

#### Example response body

```json
{
  "data": [
    {
      "relationships": {
        "profiles": {
          "links": {
            "self": "https://www.example.com",
            "related": "https://www.example.com"
          }
        },
        "tags": {
          "data": [
            {
              "type": "tag",
              "id": "string"
            }
          ],
          "links": {
            "self": "https://www.example.com",
            "related": "https://www.example.com"
          }
        },
        "flow-triggers": {
          "data": [
            {
              "type": "flow",
              "id": "string"
            }
          ],
          "links": {
            "self": "https://www.example.com",
            "related": "https://www.example.com"
          }
        }
      },
      "type": "segment",
      "id": "string",
      "attributes": {
        "name": "Repeat Purchasers",
        "definition": {
          "condition_groups": [
            {
              "conditions": [
                {
                  "type": "profile-group-membership",
                  "is_member": true,
                  "group_ids": [
                    "string"
                  ],
                  "timeframe_filter": {
                    "type": "date",
                    "operator": "after",
                    "date": "2022-11-08T00:00:00+00:00"
                  }
                }
              ]
            }
          ]
        },
        "created": "2022-11-08T00:00:00+00:00",
        "updated": "2022-11-08T00:00:00+00:00",
        "is_active": true,
        "is_processing": true,
        "is_starred": true
      },
      "links": {
        "self": "https://www.example.com"
      }
    }
  ],
  "links": {
    "self": "https://www.example.com",
    "first": "https://www.example.com",
    "last": "https://www.example.com",
    "prev": "https://www.example.com",
    "next": "https://www.example.com"
  },
  "included": [
    {
      "type": "flow",
      "id": "string",
      "attributes": {
        "name": "string",
        "status": "string",
        "archived": true,
        "created": "2022-11-08T00:00:00+00:00",
        "updated": "2022-11-08T00:00:00+00:00",
        "trigger_type": "Added to List"
      },
      "links": {
        "self": "https://www.example.com"
      }
    }
  ]
}
```

### 4XX: Client Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```

### 5XX: Server Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```
