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

# Export analytics data

> Export analytics data for a product with optional filtering. See [Platform Overview](https://docs.galtea.ai/introduction).



## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /analytics/export
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /analytics/export:
    post:
      tags:
        - analytics
      summary: Export analytics data
      description: >-
        Export analytics data for a product with optional filtering. See
        [Platform Overview](https://docs.galtea.ai/introduction).
      operationId: exportAnalytics
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - productId
              properties:
                productId:
                  type: string
                  description: Product ID (required)
                  example: prod_123
                versionIds:
                  type: array
                  items:
                    type: string
                  description: Filter by version IDs
                testIds:
                  type: array
                  example:
                    - test_123
                    - test_456
                  items:
                    type: string
                  description: Filter by test IDs
                metricIds:
                  type: array
                  example:
                    - metric_123
                    - metric_456
                  items:
                    type: string
                  description: Filter by metric IDs
                languages:
                  type: array
                  items:
                    type: string
                  description: Filter by language codes
                from:
                  type: string
                  format: date-time
                  description: Start date for filtering
                to:
                  type: string
                  format: date-time
                  description: End date for filtering
                isProduction:
                  type: boolean
                  description: >-
                    When set, exports only production (true) or only development
                    (false) data. Omit to include both.
      responses:
        '200':
          description: Analytics data exported successfully
          content:
            application/json:
              schema:
                type: object
                description: Exported analytics data
        '400':
          description: Missing required productId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````