> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.qonversion.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get LTV analytics data

> Returns lifetime-value curves for cohorts in the requested range. `series`
is a list of time-indexed revenue (or ARPU / ARPPU) points; `segment` +
`segments` let you split the curve by an attribute.




## OpenAPI

````yaml /api-reference/rest-api-v4.yaml get /analytics/ltv
openapi: 3.0.3
info:
  title: Qonversion REST API v4
  version: '4.0'
  description: >-
    Qonversion REST API v4 follows REST standards. It has predictable
    resource-oriented URLs, accepts JSON-encoded request bodies, returns
    JSON-encoded responses, and uses standard HTTP response codes,
    authentication, and verbs.
servers:
  - url: https://api.qonversion.io/v4
    description: Production
security:
  - secretAuth: []
tags:
  - name: Users
    description: Retrieve Qonversion users
  - name: User Properties
    description: Manage user-level attributes
  - name: Identities
    description: Link Qonversion users to your own auth IDs
  - name: Entitlements
    description: Entitlement definitions and user grants
  - name: Purchases
    description: A user's purchase history
  - name: Products
    description: Products configured in the Qonversion dashboard
  - name: Customers
    description: Aggregated customer records, properties, permissions, and metrics
  - name: Segments
    description: Dynamic and system segments of users
  - name: Experiments
    description: Paywall and offering A/B experiments
  - name: Screens
    description: No-code paywall screens — CRUD, publish, analytics
  - name: Analytics
    description: Charts, cards, cohorts, LTV, and insights
  - name: Exports
    description: Asynchronous data exports
  - name: Events
    description: Event catalog
  - name: Scheduled Reports
    description: Recurring reports delivered to external destinations
  - name: Integrations
    description: Third-party integrations configuration
  - name: Automations
    description: Event-driven automations
  - name: Project Settings
    description: Project-level configuration, secret, and store credentials
paths:
  /analytics/ltv:
    get:
      tags:
        - Analytics
      summary: Get LTV analytics data
      description: >
        Returns lifetime-value curves for cohorts in the requested range.
        `series`

        is a list of time-indexed revenue (or ARPU / ARPPU) points; `segment` +

        `segments` let you split the curve by an attribute.
      operationId: v4GetAnalyticsLtv
      parameters:
        - name: cohort_from
          in: query
          required: false
          description: >-
            Cohort-range start (Unix timestamp, seconds). Defaults to `now - 90
            days`.
          schema:
            type: integer
            format: int64
        - name: cohort_to
          in: query
          required: false
          description: >-
            Cohort-range end (Unix timestamp, seconds). Defaults to the current
            time.
          schema:
            type: integer
            format: int64
        - name: mode
          in: query
          required: false
          schema:
            type: string
            enum:
              - by_days
              - by_renewals
            default: by_days
        - name: environment
          in: query
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
            default: 1
        - name: segment
          in: query
          required: false
          description: >
            Optional attribute to split the LTV curve into per-value series.

            Allowed values come from `GET /v4/analytics/ltv/meta`
            (`segmentations[].code`).
          schema:
            type: string
          example: target_platform
        - name: revenue_type
          in: query
          required: false
          schema:
            type: string
            enum:
              - gross
              - net
            default: gross
        - name: currency
          in: query
          required: false
          description: ISO 4217 currency code. Defaults to `USD`.
          schema:
            type: string
            pattern: ^[A-Z]{3}$
            default: USD
        - name: filter[<attribute>][]
          in: query
          required: false
          description: >-
            Attribute-scoped filter. Allowed attribute codes come from `GET
            /v4/analytics/ltv/meta` (`filter_conditions[].attribute`).
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
      responses:
        '200':
          description: LTV curves.
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-cache
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4AnalyticsLtv'
              example:
                object: analytics_ltv
                url: /v4/analytics/ltv
                mode: by_days
                cohort_from: 1769000695
                cohort_to: 1776816000
                cohort_users: 4542
                paying_users: 0
                revenue_type: gross
                currency: USD
                measure: usd
                segment: null
                segments: []
                series: []
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
        '403':
          description: Insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
        '502':
          description: Upstream service failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
        '504':
          description: Upstream timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
      security:
        - secretAuth: []
components:
  schemas:
    V4AnalyticsLtv:
      type: object
      required:
        - object
        - url
        - mode
        - cohort_from
        - cohort_to
        - cohort_users
        - paying_users
        - revenue_type
        - currency
        - measure
        - series
      properties:
        object:
          type: string
          enum:
            - analytics_ltv
        url:
          type: string
        mode:
          type: string
          enum:
            - by_days
            - by_renewals
        cohort_from:
          type: integer
          format: int64
        cohort_to:
          type: integer
          format: int64
        cohort_users:
          type: integer
          description: Total users in the selected cohort range.
        paying_users:
          type: integer
          description: Subset of `cohort_users` that made at least one paid transaction.
        revenue_type:
          type: string
          enum:
            - gross
            - net
        currency:
          type: string
        measure:
          type: string
          enum:
            - usd
        segment:
          type: string
          nullable: true
          description: Segmentation attribute used, if any.
        segments:
          type: array
          description: >-
            Per-segmentation-value series breakdown. Empty when `segment` is
            null.
          items:
            type: object
            additionalProperties: true
        series:
          type: array
          items:
            $ref: '#/components/schemas/V4AnalyticsSeriesDataPoint'
    V4Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
          properties:
            type:
              type: string
              enum:
                - request
                - resource
                - logical
                - internal
            code:
              type: string
              description: |
                Machine-readable snake_case error code. Examples include
                `invalid_data`, `invalid_request`, `invalid_product_id`,
                `not_found`, `already_exists`, `offering_already_exists`,
                `product_not_in_project`, `cannot_set_main_directly`,
                `cannot_demote_main`, `cannot_patch_experiment_variant`,
                `cannot_delete_experiment_variant`, and
                `cannot_setmain_experiment_variant`. Resource-specific codes
                are documented on the corresponding reference page.
            message:
              type: string
              description: Human-readable description. May change; do not parse.
            details:
              type: array
              nullable: true
              description: Per-field validation errors, present on 400 validation failures.
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
    V4AnalyticsSeriesDataPoint:
      type: object
      required:
        - start_time
        - value
      properties:
        start_time:
          type: integer
          format: int64
          description: Bucket start (Unix seconds).
        value:
          type: number
          format: double
          description: Metric value in the chart's `measure` unit.
  securitySchemes:
    secretAuth:
      type: http
      scheme: bearer
      bearerFormat: sk_…
      description: >-
        Bearer authentication using the project **Secret Key** (prefixed with
        `sk_`, or `test_sk_` for sandbox). All v4 public endpoints require the
        Secret Key — see [Authentication](/reference/v4/authentication). Never
        expose the Secret Key in client-side code.

````