---
title: "Get Segments for Profile"
description: "How to call Get Segments for Profile (GET /api/profiles/{id}/segments) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/reference/get_segments_for_profile"
revision: "2026-10-15"
operationId: "get_segments_for_profile"
aliases: ["get_profile_segments"]
method: "GET"
endpoint: "https://a.klaviyo.com/api/profiles/{id}/segments"
authentication: "privateKey"
scopes: ["profiles:read","segments:read"]
rateLimits: {"burst":"3/s","steady":"60/m"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
openApi: "https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_segments_for_profile.json"
jsonApi: {"fields":{"segment":["created","definition","definition.condition_groups","id","is_active","is_processing","is_starred","name","updated"]}}
related: ["https://developers.klaviyo.com/en/reference/profiles/llms.txt","https://developers.klaviyo.com/en/reference/get_profiles.md","https://developers.klaviyo.com/en/reference/get_profile.md","https://developers.klaviyo.com/en/reference/create_profile.md","https://developers.klaviyo.com/en/reference/update_profile.md","https://developers.klaviyo.com/en/reference/create_or_update_profile.md","https://developers.klaviyo.com/en/reference/merge_profiles.md","https://developers.klaviyo.com/en/reference/get_push_tokens_for_profile.md","https://developers.klaviyo.com/en/reference/get_push_token_ids_for_profile.md","https://developers.klaviyo.com/en/reference/get_lists_for_profile.md","https://developers.klaviyo.com/en/reference/get_list_ids_for_profile.md","https://developers.klaviyo.com/en/reference/get_segment_ids_for_profile.md"]
---

# Get Segments for Profile

> This is the Markdown version of https://developers.klaviyo.com/en/reference/get_segments_for_profile

```http
GET https://a.klaviyo.com/api/profiles/{id}/segments
```

Get segment memberships for a profile with the given profile ID.

- Revision header: `revision: 2026-10-15` (required)
- Scopes: `profiles:read`, `segments:read`
- Rate limits: Burst: `3/s`, Steady: `60/m`
- OpenAPI: [Download this endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_segments_for_profile.json)

## Example request

### curl

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

### CLI

```bash
klaviyo profiles get-segments-for-profile id
```

Sign in first with `klaviyo auth login`. [Install the Klaviyo CLI](https://developers.klaviyo.com/en/docs/klaviyo_cli.md)

### Python

```python
from klaviyo_api import KlaviyoAPI

klaviyo = KlaviyoAPI("your-private-api-key")

response = klaviyo.Profiles.get_segments_for_profile("id")
```

Install it with `pip install klaviyo-api`. [The Python SDK on GitHub](https://github.com/klaviyo/klaviyo-api-python)

### Node.js

```javascript
import { ApiKeySession, ProfilesApi } from 'klaviyo-api'

const session = new ApiKeySession('your-private-api-key')
const profilesApi = new ProfilesApi(session)

const response = await profilesApi.getSegmentsForProfile('id')
```

Install it with `npm install klaviyo-api`. [The Node.js SDK on GitHub](https://github.com/klaviyo/klaviyo-api-node)

### Ruby

```ruby
require 'klaviyo-api-sdk'

KlaviyoAPI.configure do |config|
  config.api_key['Klaviyo-API-Key'] = 'Klaviyo-API-Key your-private-api-key'
end

response = KlaviyoAPI::Profiles.get_segments_for_profile('id')
```

Install it with `gem install klaviyo-api-sdk`. [The Ruby SDK on GitHub](https://github.com/klaviyo/klaviyo-api-ruby)

### PHP

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

use KlaviyoAPI\KlaviyoAPI;

$klaviyo = new KlaviyoAPI('your-private-api-key');

$response = $klaviyo->Profiles->getSegmentsForProfile('id');
```

Install it with `composer require klaviyo/api`. [The PHP SDK on GitHub](https://github.com/klaviyo/klaviyo-api-php)

## Path parameters

- `id` (string, required)

## Query parameters

- `fields[segment]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/reference.md) Allowed values: `created`, `definition`, `definition.condition_groups`, `id`, `is_active`, `is_processing`, `is_starred`, `name`, `updated`

## Headers

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

## Responses

### 200: Success

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

- `data` (object[], required)
  - `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): Condition groups are combined with AND: a profile must match every group to be in the segment. To require several conditions at once, put each condition in its own condition group. Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_segments_for_profile.json).
    - `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): Whether the segment is active. Inactive segments are not processed and their membership does not update.
    - `is_processing` (boolean, required)
    - `is_starred` (boolean, required)
  - `relationships` (object)
    - `profiles` (object)
      - `data` (object[]): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_segments_for_profile.json).
      - `links` (object): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_segments_for_profile.json).
    - `tags` (object)
      - `data` (object[]): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_segments_for_profile.json).
      - `links` (RelationshipLinks): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_segments_for_profile.json).
    - `flow-triggers` (object)
      - `data` (object[]): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_segments_for_profile.json).
      - `links` (RelationshipLinks): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_segments_for_profile.json).
  - `links` (object, required)
    - `self` (string<uri>, required)
- `links` (object)
  - `self` (string<uri>, required)
  - `prev` (string<uri>)
  - `next` (string<uri>)
- `meta` (object): Response-level metadata
  - `agent_hints` (object): Optional hints emitted by the API for agent callers
    - `next_steps` (string[]): Suggested follow-up actions for agents to take after this response

#### Example response body

```json
{
  "data": [
    {
      "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
      },
      "relationships": {
        "profiles": {
          "data": [
            {
              "type": "profile",
              "id": "string"
            }
          ],
          "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"
          }
        }
      },
      "links": {
        "self": "https://www.example.com"
      }
    }
  ],
  "links": {
    "self": "https://www.example.com",
    "prev": "https://www.example.com",
    "next": "https://www.example.com"
  },
  "meta": {
    "agent_hints": {
      "next_steps": [
        "string"
      ]
    }
  }
}
```

### 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"
      }
    }
  ]
}
```
