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

# Run saved Insights report queries



## OpenAPI

````yaml /api-reference/openapi.json post /insights-reports/{reportId}/query
openapi: 3.1.0
info:
  title: Replo Public API
  version: '2026-10-05'
servers:
  - url: https://api.replo.app/v1
security: []
paths:
  /insights-reports/{reportId}/query:
    post:
      tags:
        - InsightsReports
      summary: Run saved Insights report queries
      operationId: insightsReports.query
      parameters:
        - name: Replo-Api-Version
          in: header
          required: true
          schema:
            type: string
            enum:
              - '2026-10-05'
          description: The public API version to use for this request.
        - schema:
            type: string
            format: uuid
            description: >-
              Report file ID from list_insights_reports, or the final UUID in
              its Insights URL.
          required: true
          description: >-
            Report file ID from list_insights_reports, or the final UUID in its
            Insights URL.
          name: reportId
          in: path
        - schema:
            type: string
            format: uuid
          required: true
          name: projectId
          in: query
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                queryIds:
                  type: array
                  items:
                    type: string
                    minLength: 1
                  minItems: 1
                  maxItems: 30
                  description: >-
                    Query IDs from get_insights_report. Omit to run all queries
                    (at most 30 per call).
                scope:
                  type: object
                  properties:
                    filters:
                      type: array
                      items:
                        type: object
                        properties:
                          fieldKey:
                            type: string
                            minLength: 1
                            maxLength: 120
                          op:
                            type: string
                            enum:
                              - equals
                              - notEquals
                              - in
                              - notIn
                              - contains
                              - notContains
                              - startsWith
                              - isSet
                              - isNotSet
                              - greaterThan
                              - greaterThanOrEqual
                              - lessThan
                              - lessThanOrEqual
                          value:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                              - type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                              - type: 'null'
                          isProjectDefault:
                            type: boolean
                            enum:
                              - true
                            description: >-
                              Marks an automatically seeded project domain, not
                              a viewer selection.
                        required:
                          - fieldKey
                          - op
                      maxItems: 20
                    breakdown:
                      type:
                        - object
                        - 'null'
                      properties:
                        fieldKey:
                          type: string
                          minLength: 1
                          maxLength: 120
                        limit:
                          type: integer
                          exclusiveMinimum: 0
                          maximum: 200
                      required:
                        - fieldKey
                    dateRange:
                      type:
                        - object
                        - 'null'
                      properties:
                        presetId:
                          type: string
                          enum:
                            - last_7_days
                            - last_14_days
                            - last_30_days
                            - last_90_days
                            - last_16_months
                            - this_week
                            - last_week
                            - this_month
                            - last_month
                            - year_to_date
                            - custom
                        since:
                          type: string
                          format: date
                        until:
                          type: string
                          format: date
                        comparison:
                          type: string
                          enum:
                            - previous_period
                            - previous_year
                            - none
                      required:
                        - presetId
                        - since
                        - until
                        - comparison
                  additionalProperties: false
                  description: >-
                    Override selected report defaults. Filters replace the
                    default filter list; omitted fields retain the report's
                    defaults.
              additionalProperties: false
      responses:
        '200':
          description: Run saved Insights report queries
          content:
            application/json:
              schema:
                type: object
                properties:
                  reportId:
                    type: string
                    format: uuid
                  reportUpdatedAt:
                    type: string
                  queriedAt:
                    type: string
                    format: date-time
                  scope:
                    type: object
                    properties:
                      dateRange:
                        type:
                          - object
                          - 'null'
                        properties:
                          presetId:
                            type: string
                            enum:
                              - last_7_days
                              - last_14_days
                              - last_30_days
                              - last_90_days
                              - last_16_months
                              - this_week
                              - last_week
                              - this_month
                              - last_month
                              - year_to_date
                              - custom
                          since:
                            type: string
                          until:
                            type: string
                          comparison:
                            type: string
                            enum:
                              - previous_period
                              - previous_year
                              - none
                        required:
                          - presetId
                          - since
                          - until
                          - comparison
                      filters:
                        type: array
                        items:
                          type: object
                          properties:
                            fieldKey:
                              type: string
                              minLength: 1
                              maxLength: 120
                            op:
                              type: string
                              enum:
                                - equals
                                - notEquals
                                - in
                                - notIn
                                - contains
                                - notContains
                                - startsWith
                                - isSet
                                - isNotSet
                                - greaterThan
                                - greaterThanOrEqual
                                - lessThan
                                - lessThanOrEqual
                            value:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                                - type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                - type: 'null'
                            isProjectDefault:
                              type: boolean
                              enum:
                                - true
                              description: >-
                                Marks an automatically seeded project domain,
                                not a viewer selection.
                          required:
                            - fieldKey
                            - op
                        maxItems: 20
                        default: []
                      breakdown:
                        type:
                          - object
                          - 'null'
                        properties:
                          fieldKey:
                            type: string
                            minLength: 1
                            maxLength: 120
                          limit:
                            type: integer
                            exclusiveMinimum: 0
                            maximum: 200
                        required:
                          - fieldKey
                    required:
                      - dateRange
                      - breakdown
                  results:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            status:
                              type: string
                              enum:
                                - success
                            sql:
                              type: string
                            datasets:
                              type: array
                              items:
                                type: string
                                enum:
                                  - pixel
                                  - triple-whale
                                  - contentsquare
                                  - mixpanel
                                  - intelligems
                                  - roi
                                  - shopify
                                  - google-analytics
                                  - google-search-console
                            rowCount:
                              type: integer
                            data:
                              type: array
                              items:
                                type: object
                                additionalProperties: {}
                          required:
                            - id
                            - status
                            - sql
                            - datasets
                            - rowCount
                            - data
                        - type: object
                          properties:
                            id:
                              type: string
                            status:
                              type: string
                              enum:
                                - error
                            error:
                              type: string
                          required:
                            - id
                            - status
                            - error
                  warnings:
                    type: array
                    items:
                      type: string
                required:
                  - reportId
                  - reportUpdatedAt
                  - queriedAt
                  - scope
                  - results
                  - warnings
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '401':
          description: Missing or invalid Replo Public API token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '403':
          description: You are not authorized to access this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '409':
          description: The resource is in a conflicting state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '413':
          description: File content exceeds the 10 MiB limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '429':
          description: >-
            Too many requests. Please retry after the time indicated by the
            Retry-After header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '500':
          description: An internal error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '503':
          description: Service temporarily unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
      security:
        - bearerAuth: []
components:
  schemas:
    PublicApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            doc_url:
              type: string
          required:
            - code
            - message
            - doc_url
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.