> ## 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 cohort analytics metadata

> Returns the discrete value sets needed to build a cohort query: available
`mode`s, `grouping`s, `metric`s, `cohort_definition`s, and filter attributes
with their concrete values (pre-scoped to the project).




## OpenAPI

````yaml /api-reference/rest-api-v4.yaml get /analytics/cohorts/meta
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/cohorts/meta:
    get:
      tags:
        - Analytics
      summary: Get cohort analytics metadata
      description: >
        Returns the discrete value sets needed to build a cohort query:
        available

        `mode`s, `grouping`s, `metric`s, `cohort_definition`s, and filter
        attributes

        with their concrete values (pre-scoped to the project).
      operationId: v4GetAnalyticsCohortsMeta
      parameters:
        - name: from
          in: query
          required: false
          schema:
            type: integer
            format: int64
        - name: to
          in: query
          required: false
          schema:
            type: integer
            format: int64
        - name: environment
          in: query
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
            default: 1
      responses:
        '200':
          description: Cohort metadata.
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-cache
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4AnalyticsCohortsMeta'
              example:
                object: analytics_cohorts_meta
                url: /v4/analytics/cohorts/meta
                modes:
                  - code: by_renewals
                    label: By Renewals
                  - code: by_days
                    label: By Days
                groupings:
                  - code: day
                    label: Day
                  - code: week
                    label: Week
                  - code: month
                    label: Month
                  - code: quarter
                    label: Quarter
                  - code: year
                    label: Year
                metrics:
                  - code: revenue
                    label: Revenue
                  - code: subscriptions
                    label: Subscriptions
                  - code: payers
                    label: Payers
                  - code: arpu
                    label: ARPU
                  - code: arppu
                    label: ARPPU
                definitions:
                  - code: new_customers
                    label: New Customers
                  - code: initial_conversions
                    label: Initial Conversions
                  - code: new_paying
                    label: New Paying Customers
                filter_conditions:
                  - attribute: target_platform
                    label: Store
                    persistent: true
                    type: list
                    values:
                      - code: iOS
                        label: Apple App Store
                      - code: Android
                        label: Google Play
                      - code: Stripe
                        label: Stripe
        '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:
    V4AnalyticsCohortsMeta:
      type: object
      required:
        - object
        - url
        - modes
        - groupings
        - metrics
        - definitions
        - filter_conditions
      properties:
        object:
          type: string
          enum:
            - analytics_cohorts_meta
        url:
          type: string
        modes:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                enum:
                  - by_renewals
                  - by_days
              label:
                type: string
        groupings:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                enum:
                  - day
                  - week
                  - month
                  - quarter
                  - year
              label:
                type: string
        metrics:
          type: array
          description: >-
            Allowed `metric` values. (Metric selection is chosen client-side —
            the endpoint returns all five.)
          items:
            type: object
            properties:
              code:
                type: string
                enum:
                  - revenue
                  - subscriptions
                  - payers
                  - arpu
                  - arppu
              label:
                type: string
        definitions:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                enum:
                  - new_customers
                  - initial_conversions
                  - new_paying
              label:
                type: string
        filter_conditions:
          type: array
          items:
            $ref: '#/components/schemas/V4AnalyticsFilterCondition'
    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
    V4AnalyticsFilterCondition:
      type: object
      required:
        - attribute
        - label
        - type
      properties:
        attribute:
          type: string
          description: Filter attribute code — use as `filter[<attribute>][]` query key.
        category:
          type: string
          description: >-
            Optional UI grouping (`Device`, `Customer / ID`, `Experiment`,
            `Attribution`).
        label:
          type: string
        type:
          type: string
          enum:
            - list
            - text
          description: >
            * `list` — value must be one of `values[].code`; supports
            multi-select when `multiple=true`.

            * `text` — free-form single value (e.g. `user_id`, `device_id`,
            `q_user_id`).
        multiple:
          type: boolean
        persistent:
          type: boolean
          description: Hint to the UI that this filter should always be visible.
        values:
          type: array
          description: Allowed values for `list`-type filters.
          items:
            type: object
            required:
              - code
              - label
            properties:
              code:
                type: string
              label:
                type: string
  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.

````