Skip to content

This page is available as Markdown at https://developers.klaviyo.com/en/v2025-01-15/reference/query_segment_values.md. An index of every page is at https://developers.klaviyo.com/llms.txt.

KlaviyoKlaviyoDevelopers
v2025-01-15

You're reading the reference for API revision 2025-01-15. The latest revision is 2026-10-15. See this page in the latest revision.

Query Segment Values

POSThttps://a.klaviyo.com/api/segment-values-reports

Returns the requested segment analytics values data.

Revision header
revision: 2025-01-15required
Scopes
segments:read
Rate limits
Burst: 1/sSteady: 2/mDaily: 225/d

Headers

  • revision#stringrequired

    API endpoint revision (format: YYYY-MM-DD[.suffix])

    2025-01-15

Request body

Content type: application/vnd.api+jsonrequired

  • data#objectrequired
    Show 2 fields
    • type#stringrequired
      Allowed values:
      • segment-values-report
    • attributes#objectrequired
      Show 3 fields
      • statistics#string[]required

        List of statistics to query for.

        Allowed values:
        • members_added
        • members_removed
        • net_members_changed
        • total_members
      • timeframe#oneOfrequired

        The timeframe to query for data within. Data is unavailable before June 1st, 2023. Please use a timeframe after this date. The max length a timeframe can be is 1 year

        One of:

        1. Option 1: Timeframe
          • key#stringrequired

            Pre-defined key that represents a set timeframe

            Show 14 allowed values
            • last_12_months
            • last_30_days
            • last_365_days
            • last_3_months
            • last_7_days
            • last_90_days
            • last_month
            • last_week
            • last_year
            • this_month
            • this_week
            • this_year
            • today
            • yesterday
        2. Option 2: CustomTimeframe
          • start#string<date-time>required

            Example: 2022-11-08T00:00:00+00:00

          • end#string<date-time>required

            Example: 2022-11-08T00:00:00+00:00

      • filter#stringnullable

        API filter string used to filter the query. Allowed filters are segment_id. Allowed operators are equals, any. Only one filter can be used per attribute. Max of 100 messages per ANY filter.

        Example: any(segment_id,["xyz123","ghi456"])

Responses

200Success

Content type: application/vnd.api+json

  • data#objectrequired
    Show 2 fields
    • type#stringrequired
      Allowed values:
      • segment-values-report
    • attributes#objectrequired
      Show 1 field
      • results#object[]required

        An array of all the returned values data. Each object in the array represents one unique grouping and the results for that grouping.

        Show 2 fields
        • groupings#objectrequired

          Applied groupings and the values for this object

        • statistics#objectrequired

          Requested statistics and their values results

4XXClient Error

Content type: application/vnd.api+json

  • errors#object[]required
    Show 5 fields
    • id#stringrequired
    • code#stringrequired
    • title#stringrequired
    • detail#stringrequired
    • source#object
      Show 2 fields
      • pointer#string
      • parameter#string

5XXServer Error

Content type: application/vnd.api+json

  • errors#object[]required
    Show 5 fields
    • id#stringrequired
    • code#stringrequired
    • title#stringrequired
    • detail#stringrequired
    • source#object
      Show 2 fields
      • pointer#string
      • parameter#string