> ## 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 analytics insights

> Returns AI-generated insights for the project over the last `period` days.
Responses are cached on the upstream; pass `force=true` to regenerate.
The `insights[]` array groups observations by type (`critical`, `positive`,
`tip`, `info`) — each item has a short `title`, a longer `body`, and a
suggested `action`.




## OpenAPI

````yaml /api-reference/rest-api-v4.yaml get /analytics/insights
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/insights:
    get:
      tags:
        - Analytics
      summary: Get analytics insights
      description: >
        Returns AI-generated insights for the project over the last `period`
        days.

        Responses are cached on the upstream; pass `force=true` to regenerate.

        The `insights[]` array groups observations by type (`critical`,
        `positive`,

        `tip`, `info`) — each item has a short `title`, a longer `body`, and a

        suggested `action`.
      operationId: v4GetAnalyticsInsights
      parameters:
        - name: period
          in: query
          required: false
          description: Look-back window in days. Must be between 1 and 365.
          schema:
            type: integer
            minimum: 1
            maximum: 365
            default: 30
        - name: force
          in: query
          required: false
          description: >-
            Bypass the server-side cache and regenerate insights. Expensive —
            avoid polling.
          schema:
            type: boolean
            default: false
        - name: cached_only
          in: query
          required: false
          description: >-
            Return only already-cached results; never trigger a fresh
            generation. Use for fast UI reads.
          schema:
            type: boolean
            default: false
        - name: environment
          in: query
          required: false
          description: 'Environment: `0` = sandbox, `1` = production.'
          schema:
            type: integer
            enum:
              - 0
              - 1
            default: 1
      responses:
        '200':
          description: Insights payload.
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-cache
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4AnalyticsInsights'
              example:
                object: analytics_insights
                url: /v4/analytics/insights
                generated_at: '2026-04-21T13:05:05+00:00'
                period_days: 30
                health: critical
                health_score: 8
                is_cached: true
                is_stale: false
                summary: >-
                  The app is acquiring users at a modest pace (1,745 this
                  period, +4.4%), but there is a complete absence of
                  monetization activity.
                insights:
                  - type: critical
                    metric: mrr
                    title: Zero Revenue Across Both Periods
                    body: >-
                      MRR, Sales and Proceeds are $0 in both the current and
                      previous 30-day periods.
                    action: >-
                      Audit your in-app purchase configuration in the App Store
                      / Google Play console.
                  - type: positive
                    metric: new_users
                    title: New User Acquisition Growing Steadily
                    body: >-
                      New users grew from 1,672 to 1,745 (+4.4%)
                      period-over-period.
                    action: >-
                      Preserve and document current acquisition channels so this
                      momentum is not disrupted.
        '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:
    V4AnalyticsInsights:
      type: object
      required:
        - object
        - url
        - generated_at
        - period_days
        - health
        - summary
        - insights
      properties:
        object:
          type: string
          enum:
            - analytics_insights
        url:
          type: string
        generated_at:
          type: string
          format: date-time
          nullable: true
          description: ISO 8601 timestamp of when the insights were generated.
        period_days:
          type: integer
          minimum: 1
          maximum: 365
          description: Window the insights cover, echoed from the `period` query param.
        health:
          type: string
          nullable: true
          enum:
            - healthy
            - watch
            - critical
            - null
          description: One-word project health label.
        health_score:
          type: integer
          minimum: 0
          maximum: 10
          description: Integer score — lower is worse.
        summary:
          type: string
          description: One-paragraph plain-English synthesis.
        insights:
          type: array
          items:
            $ref: '#/components/schemas/V4AnalyticsInsight'
        is_cached:
          type: boolean
          description: True when the payload came from the upstream cache.
        is_stale:
          type: boolean
          description: >-
            True when a background refresh is in progress and the returned data
            is an older snapshot.
        is_empty:
          type: boolean
          description: True when the project has insufficient data to generate insights.
    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
    V4AnalyticsInsight:
      type: object
      required:
        - type
        - metric
        - title
        - body
        - action
      properties:
        type:
          type: string
          enum:
            - critical
            - positive
            - tip
            - info
          description: Severity / category — drives UI coloring.
        metric:
          type: string
          description: >-
            Metric the insight is about (e.g. `mrr`, `new_users`,
            `user_to_paid_conversion`).
        title:
          type: string
        body:
          type: string
          description: Longer-form observation, 1–3 sentences.
        action:
          type: string
          description: Suggested next step for the operator.
  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.

````