PostHog insights API

The insights API from PostHog — 36 operation(s) for insights.

OpenAPI Specification

posthog-insights-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: PostHog actions insights API
  version: 1.0.0
  description: ''
tags:
- name: insights
paths:
  /api/environments/{environment_id}/insights/:
    get:
      operationId: environments_insights_list
      description: 'DRF ViewSet mixin that gates coalesced responses behind permission checks.


        The QueryCoalescingMiddleware attaches cached response data to

        request.META["_coalesced_response"] for followers. This mixin runs DRF''s

        initial() (auth + permissions + throttling) before returning the

        cached response, ensuring the request is authorized.'
      parameters:
      - in: query
        name: basic
        schema:
          type: boolean
        description: Return basic insight metadata only (no results, faster).
      - in: query
        name: created_by
        schema:
          type: string
        description: JSON-encoded array of user IDs. Only returns insights whose `created_by` is in the list, e.g. `[1,42]`.
      - in: query
        name: created_date_from
        schema:
          type: string
        description: Filter by `created_at > created_date_from`. Accepts absolute or relative dates.
      - in: query
        name: created_date_to
        schema:
          type: string
        description: Filter by `created_at < created_date_to`. Accepts absolute or relative dates.
      - in: query
        name: dashboards
        schema:
          type: string
        description: JSON-encoded array of dashboard IDs. Returns insights attached to every listed dashboard (AND).
      - in: query
        name: date_from
        schema:
          type: string
        description: Filter by `last_modified_at > date_from`. Accepts absolute dates (`2025-04-23`) or relative strings (`-7d`, `-1m`).
      - in: query
        name: date_to
        schema:
          type: string
        description: Filter by `last_modified_at < date_to`. Accepts absolute dates or relative strings.
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: favorited
        schema:
          type: boolean
        description: Include this parameter (any value) to restrict results to insights marked as favorited.
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      - in: query
        name: insight
        schema:
          type: string
          enum:
          - FUNNELS
          - JSON
          - LIFECYCLE
          - PATHS
          - RETENTION
          - SQL
          - STICKINESS
          - TRENDS
        description: Restrict to a single insight type. `JSON` matches non-wrapper query insights; `SQL` matches HogQL queries.
      - in: query
        name: last_viewed_date_from
        schema:
          type: string
        description: Filter by `last_viewed_at > last_viewed_date_from`. Accepts absolute or relative dates.
      - in: query
        name: last_viewed_date_to
        schema:
          type: string
        description: Filter by `last_viewed_at < last_viewed_date_to`. Accepts absolute or relative dates.
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - in: query
        name: refresh
        schema:
          type: string
          enum:
          - async
          - async_except_on_cache_miss
          - blocking
          - force_async
          - force_blocking
          - force_cache
          - lazy_async
          default: force_cache
        description: '

          Whether to refresh the retrieved insights, how aggressively, and if sync or async:

          - `''force_cache''` - return cached data or a cache miss; always completes immediately as it never calculates

          - `''blocking''` - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache

          - `''async''` - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache

          - `''lazy_async''` - kick off background calculation, UNLESS there are somewhat fresh results in the cache

          - `''force_blocking''` - calculate synchronously, even if fresh results are already cached

          - `''force_async''` - kick off background calculation, even if fresh results are already cached

          Background calculation can be tracked using the `query_status` response field.'
      - in: query
        name: saved
        schema:
          type: boolean
        description: When truthy, restricts results to insights that are saved (or attached to a visible dashboard). When falsy, only unsaved insights.
      - in: query
        name: search
        schema:
          type: string
        description: Case-insensitive substring match across name, derived_name, description, and tag names.
      - in: query
        name: short_id
        schema:
          type: string
      - in: query
        name: tags
        schema:
          type: string
        description: JSON-encoded array of tag names. Returns insights with any of the listed tags.
      - in: query
        name: user
        schema:
          type: boolean
        description: Include this parameter (any value) to restrict results to insights created by the authenticated user.
      tags:
      - insights
      security:
      - PersonalAPIKeyAuth:
        - insight:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedInsightList'
            text/csv:
              schema:
                $ref: '#/components/schemas/PaginatedInsightList'
          description: ''
      deprecated: true
      x-explicit-tags:
      - product_analytics
    post:
      operationId: environments_insights_create
      description: 'DRF ViewSet mixin that gates coalesced responses behind permission checks.


        The QueryCoalescingMiddleware attaches cached response data to

        request.META["_coalesced_response"] for followers. This mixin runs DRF''s

        initial() (auth + permissions + throttling) before returning the

        cached response, ensuring the request is authorized.'
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      tags:
      - insights
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insight'
      security:
      - PersonalAPIKeyAuth:
        - insight:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Insight'
            text/csv:
              schema:
                $ref: '#/components/schemas/Insight'
          description: ''
      deprecated: true
      x-explicit-tags:
      - product_analytics
  /api/environments/{environment_id}/insights/{insight_id}/sharing/:
    get:
      operationId: environments_insights_sharing_list
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: insight_id
        schema:
          type: integer
        required: true
      tags:
      - insights
      security:
      - PersonalAPIKeyAuth:
        - sharing_configuration:read
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SharingConfiguration'
          description: ''
      deprecated: true
      x-explicit-tags:
      - core
  /api/environments/{environment_id}/insights/{insight_id}/sharing/passwords/:
    post:
      operationId: environments_insights_sharing_passwords_create
      description: Create a new password for the sharing configuration.
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: insight_id
        schema:
          type: integer
        required: true
      tags:
      - insights
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SharingConfiguration'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SharingConfiguration'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SharingConfiguration'
      security:
      - PersonalAPIKeyAuth:
        - sharing_configuration:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharingConfiguration'
          description: ''
      deprecated: true
      x-explicit-tags:
      - core
  /api/environments/{environment_id}/insights/{insight_id}/sharing/passwords/{password_id}/:
    delete:
      operationId: environments_insights_sharing_passwords_destroy
      description: Delete a password from the sharing configuration.
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: insight_id
        schema:
          type: integer
        required: true
      - in: path
        name: password_id
        schema:
          type: string
        required: true
      tags:
      - insights
      security:
      - PersonalAPIKeyAuth:
        - sharing_configuration:write
      responses:
        '204':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - core
  /api/environments/{environment_id}/insights/{insight_id}/sharing/refresh/:
    post:
      operationId: environments_insights_sharing_refresh_create
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: insight_id
        schema:
          type: integer
        required: true
      tags:
      - insights
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SharingConfiguration'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SharingConfiguration'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SharingConfiguration'
      security:
      - PersonalAPIKeyAuth:
        - sharing_configuration:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharingConfiguration'
          description: ''
      deprecated: true
      x-explicit-tags:
      - core
  /api/environments/{environment_id}/insights/{insight_id}/thresholds/:
    get:
      operationId: environments_insights_thresholds_list
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: insight_id
        schema:
          type: integer
        required: true
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      tags:
      - insights
      security:
      - PersonalAPIKeyAuth:
        - alert:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedThresholdWithAlertList'
          description: ''
      deprecated: true
      x-explicit-tags: []
  /api/environments/{environment_id}/insights/{insight_id}/thresholds/{id}/:
    get:
      operationId: environments_insights_thresholds_retrieve
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this threshold.
        required: true
      - in: path
        name: insight_id
        schema:
          type: integer
        required: true
      tags:
      - insights
      security:
      - PersonalAPIKeyAuth:
        - alert:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThresholdWithAlert'
          description: ''
      deprecated: true
      x-explicit-tags: []
  /api/environments/{environment_id}/insights/{id}/:
    get:
      operationId: environments_insights_retrieve
      description: 'DRF ViewSet mixin that gates coalesced responses behind permission checks.


        The QueryCoalescingMiddleware attaches cached response data to

        request.META["_coalesced_response"] for followers. This mixin runs DRF''s

        initial() (auth + permissions + throttling) before returning the

        cached response, ensuring the request is authorized.'
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      - in: query
        name: from_dashboard
        schema:
          type: integer
        description: '

          Only if loading an insight in the context of a dashboard: The relevant dashboard''s ID.

          When set, the specified dashboard''s filters and date range override will be applied.'
      - in: path
        name: id
        schema:
          oneOf:
          - type: integer
          - type: string
        description: Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight.
        required: true
      - in: query
        name: refresh
        schema:
          type: string
          enum:
          - async
          - async_except_on_cache_miss
          - blocking
          - force_async
          - force_blocking
          - force_cache
          - lazy_async
          default: force_cache
        description: '

          Whether to refresh the insight, how aggresively, and if sync or async:

          - `''force_cache''` - return cached data or a cache miss; always completes immediately as it never calculates

          - `''blocking''` - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache

          - `''async''` - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache

          - `''lazy_async''` - kick off background calculation, UNLESS there are somewhat fresh results in the cache

          - `''force_blocking''` - calculate synchronously, even if fresh results are already cached

          - `''force_async''` - kick off background calculation, even if fresh results are already cached

          Background calculation can be tracked using the `query_status` response field.'
      tags:
      - insights
      security:
      - PersonalAPIKeyAuth:
        - insight:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Insight'
            text/csv:
              schema:
                $ref: '#/components/schemas/Insight'
          description: ''
      deprecated: true
      x-explicit-tags:
      - product_analytics
    put:
      operationId: environments_insights_update
      description: 'DRF ViewSet mixin that gates coalesced responses behind permission checks.


        The QueryCoalescingMiddleware attaches cached response data to

        request.META["_coalesced_response"] for followers. This mixin runs DRF''s

        initial() (auth + permissions + throttling) before returning the

        cached response, ensuring the request is authorized.'
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      - in: path
        name: id
        schema:
          oneOf:
          - type: integer
          - type: string
        description: Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight.
        required: true
      tags:
      - insights
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insight'
      security:
      - PersonalAPIKeyAuth:
        - insight:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Insight'
            text/csv:
              schema:
                $ref: '#/components/schemas/Insight'
          description: ''
      deprecated: true
      x-explicit-tags:
      - product_analytics
    patch:
      operationId: environments_insights_partial_update
      description: 'DRF ViewSet mixin that gates coalesced responses behind permission checks.


        The QueryCoalescingMiddleware attaches cached response data to

        request.META["_coalesced_response"] for followers. This mixin runs DRF''s

        initial() (auth + permissions + throttling) before returning the

        cached response, ensuring the request is authorized.'
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      - in: path
        name: id
        schema:
          oneOf:
          - type: integer
          - type: string
        description: Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight.
        required: true
      tags:
      - insights
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedInsight'
      security:
      - PersonalAPIKeyAuth:
        - insight:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Insight'
            text/csv:
              schema:
                $ref: '#/components/schemas/Insight'
          description: ''
      deprecated: true
      x-explicit-tags:
      - product_analytics
    delete:
      operationId: environments_insights_destroy
      description: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      - in: path
        name: id
        schema:
          oneOf:
          - type: integer
          - type: string
        description: Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight.
        required: true
      tags:
      - insights
      security:
      - PersonalAPIKeyAuth:
        - insight:write
      responses:
        '405':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - product_analytics
  /api/environments/{environment_id}/insights/{id}/activity/:
    get:
      operationId: environments_insights_activity_retrieve
      description: 'DRF ViewSet mixin that gates coalesced responses behind permission checks.


        The QueryCoalescingMiddleware attaches cached response data to

        request.META["_coalesced_response"] for followers. This mixin runs DRF''s

        initial() (auth + permissions + throttling) before returning the

        cached response, ensuring the request is authorized.'
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this insight.
        required: true
      tags:
      - insights
      security:
      - PersonalAPIKeyAuth:
        - activity_log:read
      responses:
        '200':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - product_analytics
  /api/environments/{environment_id}/insights/{id}/analyze/:
    get:
      operationId: environments_insights_analyze_retrieve
      description: 'DRF ViewSet mixin that gates coalesced responses behind permission checks.


        The QueryCoalescingMiddleware attaches cached response data to

        request.META["_coalesced_response"] for followers. This mixin runs DRF''s

        initial() (auth + permissions + throttling) before returning the

        cached response, ensuring the request is authorized.'
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this insight.
        required: true
      tags:
      - insights
      responses:
        '200':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - product_analytics
  /api/environments/{environment_id}/insights/{id}/suggestions/:
    get:
      operationId: environments_insights_suggestions_retrieve
      description: 'DRF ViewSet mixin that gates coalesced responses behind permission checks.


        The QueryCoalescingMiddleware attaches cached response data to

        request.META["_coalesced_response"] for followers. This mixin runs DRF''s

        initial() (auth + permissions + throttling) before returning the

        cached response, ensuring the request is authorized.'
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this insight.
        required: true
      tags:
      - insights
      responses:
        '200':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - product_analytics
    post:
      operationId: environments_insights_suggestions_create
      description: 'DRF ViewSet mixin that gates coalesced responses behind permission checks.


        The QueryCoalescingMiddleware attaches cached response data to

        request.META["_coalesced_response"] for followers. This mixin runs DRF''s

        initial() (auth + permissions + throttling) before returning the

        cached response, ensuring the request is authorized.'
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this insight.
        required: true
      tags:
      - insights
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insight'
      responses:
        '200':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - product_analytics
  /api/environments/{environment_id}/insights/activity/:
    get:
      operationId: environments_insights_all_activity_retrieve
      description: 'DRF ViewSet mixin that gates coalesced responses behind permission checks.


        The QueryCoalescingMiddleware attaches cached response data to

        request.META["_coalesced_response"] for followers. This mixin runs DRF''s

        initial() (auth + permissions + throttling) before returning the

        cached response, ensuring the request is authorized.'
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      tags:
      - insights
      security:
      - PersonalAPIKeyAuth:
        - activity_log:read
      responses:
        '200':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - product_analytics
  /api/environments/{environment_id}/insights/bulk_update_tags/:
    post:
      operationId: environments_insights_bulk_update_tags_create
      description: 'Bulk update tags on multiple objects.


        Accepts:

        - {"ids": [...], "action": "add"|"remove"|"set", "tags": ["tag1", "tag2"]}


        Actions:

        - "add": Add tags to existing tags on each object

        - "remove": Remove specific tags from each object

        - "set": Replace all tags on each object with the provided list'
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      tags:
      - insights
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkUpdateTagsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdateTagsResponse'
            text/csv:
              schema:
                $ref: '#/components/schemas/BulkUpdateTagsResponse'
          description: ''
      deprecated: true
      x-explicit-tags:
      - product_analytics
  /api/environments/{environment_id}/insights/cancel/:
    post:
      operationId: environments_insights_cancel_create
      description: 'DRF ViewSet mixin that gates coalesced responses behind permission checks.


        The QueryCoalescingMiddleware attaches cached response data to

        request.META["_coalesced_response"] for followers. This mixin runs DRF''s

        initial() (auth + permissions + throttling) before returning the

        cached response, ensuring the request is authorized.'
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      tags:
      - insights
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insight'
      responses:
        '200':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - product_analytics
  /api/environments/{environment_id}/insights/generate_metadata/:
    post:
      operationId: environments_insights_generate_metadata_create
      description: Generate an AI-suggested name and description for an insight based on its query configuration.
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      tags:
      - insights
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insight'
      security:
      - PersonalAPIKeyAuth:
        - insight:write
      responses:
        '200':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - product_analytics
  /api/environments/{environment_id}/insights/my_last_viewed/:
    get:
      operationId: environments_insights_my_last_viewed_retrieve
      description: Returns basic details about the last 5 insights viewed by this user. Most recently viewed first.
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      tags:
      - insights
      responses:
        '200':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - product_analytics
  /api/environments/{environment_id}/insights/trending/:
    get:
      operationId: environments_insights_trending_retrieve
      description: 'Returns trending insights based on view count in the last N days (default 7).

        Defaults to returning top 10 insights.'
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      tags:
      - insights
      responses:
        '200':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - product_analytics
  /api/environments/{environment_id}/insights/viewed/:
    post:
      operationId: environments_insights_viewed_create
      description: 'Update insight view timestamps.

        Expects: {"insight_ids": [1, 2, 3, ...]}'
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      tags:
      - insights
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insight'
      security:
      - PersonalAPIKeyAuth:
        - insight:read
      responses:
        '200':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - product_analytics
  /api/projects/{project_id}/insights/:
    get:
      operationId: insights_list
      description: 'DRF ViewSet mixin that gates coalesced responses behind permission checks.


        The QueryCoalescingMiddleware attaches cached response data to

        request.META["_coalesced_response"] for followers. This mixin runs DRF''s

        initial() (auth + permissions + throttling) before returning the

        cached response, ensuring the request is authorized.'
      parameters:
      - in: query
        name: basic
        schema:
          type: boolean
        description: Return basic insight metadata only (no results, faster).
      - in: query
        name: created_by
        schema:
          type: string
        description: JSON-encoded array of user IDs. Only returns insights whose `created_by` is in the list, e.g. `[1,42]`.
      - in: query
        name: created_date_from
        schema:
          type: string
        description: Filter by `created_at > created_date_from`. Accepts absolute or relative dates.
      - in: query
        name: created_date_to
        schema:
          type: string
        description: Filter by `created_at < created_date_to`. Accepts absolute or relative dates.
      - in: query
        name: dashboards
        schema:
          type: string
        description: JSON-encoded array of dashboard IDs. Returns insights attached to every listed dashboard (AND).
      - in: query
        name: date_from
        schema:
          type: string
        description: Filter by `last_modified_at > date_from`. Accepts absolute dates (`2025-04-23`) or relative strings (`-7d`, `-1m`).
      - in: query
        name: date_to
        schema:
          type: string
        description: Filter by `last_modified_at < date_to`. Accepts absolute dates or relative strings.
      - in: query
        name: favorited
        schema:
          type: boolean
        description: Include this parameter (any value) to restrict results to insights marked as favorited.
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      - in: query
        name: insight
        schema:
          type: string
          enum:
          - FUNNELS
          - JSON
          - LIFECYCLE
          - PATHS
          - RETENTION
          - SQL
          - STICKINESS
          - TRENDS
        description: Restrict to a single insight type.

# --- truncated at 32 KB (598 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/posthog/refs/heads/main/openapi/posthog-insights-api-openapi.yml