Visitar URL original
Query Campaign Values | Klaviyo API ReferenceSkip to content

This page is available as Markdown at https://developers.klaviyo.com/en/reference/query_campaign_values.md. Its OpenAPI document is at https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/query_campaign_values.json. An index of every page is at https://developers.klaviyo.com/llms.txt.

KlaviyoKlaviyoDevelopers

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

Returns the requested campaign analytics values data

Revision header
revision: 2026-10-15required
Scopes
campaigns:read
Rate limits
Burst: 1/sSteady: 2/mDaily: 225/d

Query parameters

  • fields[campaign-values-report]#string[]

    For more information please visit API overview

    Allowed values:
    • id
    • results
  • page_cursor#string

    For more information please visit API overview

Headers

  • revision#stringrequired

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

    2026-10-15

Request body

Content type: application/vnd.api+jsonrequired

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

        List of statistics to query for. All rate statistics will be returned in fractional form [0.0, 1.0]

        Show 31 allowed values
        • average_order_value
        • bounce_rate
        • bounced
        • bounced_or_failed
        • bounced_or_failed_rate
        • click_rate
        • click_to_open_rate
        • clicks
        • clicks_unique
        • conversion_rate
        • conversion_uniques
        • conversion_value
        • conversions
        • delivered
        • delivery_rate
        • failed
        • failed_rate
        • message_segment_count_sum
        • open_rate
        • opens
        • opens_unique
        • recipients
        • revenue_per_recipient
        • spam_complaint_rate
        • spam_complaints
        • text_message_credit_usage_amount
        • text_message_roi
        • text_message_spend
        • unsubscribe_rate
        • unsubscribe_uniques
        • unsubscribes
      • timeframe#oneOfrequired

        The time frame to pull data from (Max length: 1 year). See available time frames.

        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

            A datetime that represents the start of a custom time frame. Offset is ignored and the company timezone is used.

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

          • end#string<date-time>required

            A datetime that represents the end of a custom time frame. Offset is ignored and the company timezone is used.

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

      • conversion_metric_id#stringrequired

        ID of the metric to be used for conversion statistics

        Example: RESQ6t

      • group_by#string[]nullable

        List of attributes to group the data by. Allowed group-bys are campaign_id, campaign_message_id, campaign_message_name, group, group_name, send_channel, tag_id, tag_name, text_message_format, variation, variation_name. If not passed in, the data will be grouped by campaign_id, campaign_message_id, send_channel. The following group by attributes are required: campaign_id, campaign_message_id

        Show 11 allowed values
        • campaign_id
        • campaign_message_id
        • campaign_message_name
        • group
        • group_name
        • send_channel
        • tag_id
        • tag_name
        • text_message_format
        • variation
        • variation_name
      • filter#stringnullable

        API filter string used to filter the query. Scalar attributes (send_channel, campaign_id, campaign_message_id, campaign_message_name, variation, variation_name, text_message_format): Supported operators: equals, contains-any. List attributes (tag_id, tag_name): Supported operators: contains-any, contains-all. Only one filter can be used per attribute. Only AND can be used as a combination operator. Max of 100 items per list filter. When filtering on send_channel, allowed values are email, sms, push-notification, whatsapp.

        Example: and(equals(campaign_id,"abc123"),contains-any(send_channel,["email","sms"]))

Responses

200Success

Content type: application/vnd.api+json

  • data#objectrequired
    Show 3 fields
    • type#stringrequired
      Allowed values:
      • campaign-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

    • relationships#object
      Show 1 field
      • campaigns#object
        Show 2 fields
        • data#object[]
          Show 2 fields
          • type#stringrequired
            Allowed values:
            • campaign
          • id#stringrequired
  • meta#object

    Response-level metadata

    Show 1 field
    • agent_hints#object

      Optional hints emitted by the API for agent callers

      Show 1 field
      • next_steps#string[]

        Suggested follow-up actions for agents to take after this response

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