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

# Get an insight

> Retrieves an insight by ID, including the Markdown body, chart details, a rendered chart image URL, and raw chart data. Requires admin access to the organization.



## OpenAPI

````yaml https://charts.basedash.com/api/public/openapi get /api/public/organizations/{orgId}/insights/{id}
openapi: 3.1.0
info:
  title: Basedash Public API
  version: 0.0.0
  description: >-
    API for programmatic access to Basedash features. Use API keys for
    authentication.
  contact:
    name: Basedash Support
    url: https://basedash.com
    email: support@basedash.com
servers:
  - url: https://charts.basedash.com
    description: Production
security: []
tags:
  - name: Organizations
    description: Manage organizations
  - name: Groups
    description: Manage organization groups and memberships
  - name: Data Sources
    description: Manage database connections and data sources
  - name: MCP servers
    description: Manage MCP server data sources
  - name: Insights
    description: Manage generated insights
  - name: Automations
    description: Manage automations and automation runs
  - name: Skills
    description: Manage organization skills
  - name: Definitions
    description: Manage reusable SQL definitions
paths:
  /api/public/organizations/{orgId}/insights/{id}:
    get:
      tags:
        - Insights
      summary: Get an insight
      description: >-
        Retrieves an insight by ID, including the Markdown body, chart details,
        a rendered chart image URL, and raw chart data. Requires admin access to
        the organization.
      parameters:
        - schema:
            type: string
            description: Organization ID
          required: true
          description: Organization ID
          name: orgId
          in: path
        - schema:
            type: string
            description: Insight ID
          required: true
          description: Insight ID
          name: id
          in: path
        - schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 1000
            description: Maximum raw chart rows to return (1-1000, default 1000)
          required: false
          description: Maximum raw chart rows to return (1-1000, default 1000)
          name: rawDataLimit
          in: query
        - schema:
            type: integer
            minimum: 1
            default: 1
            description: Raw chart data page number
          required: false
          description: Raw chart data page number
          name: rawDataPage
          in: query
      responses:
        '200':
          description: Insight retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicInsightDetailResponse'
              examples:
                revenueGrowth:
                  summary: Revenue growth insight
                  value:
                    data:
                      id: insight_01jvmk3x9r6p8q4n2b7z5c1h0a
                      organizationId: org_01jvmjz0f4m8t9s6r2p3q1n7xb
                      title: Enterprise expansion drove revenue growth
                      chartId: chart_01jvmk1ay8m4n6p2q9r7t3c5hd
                      chart:
                        id: chart_01jvmk1ay8m4n6p2q9r7t3c5hd
                        versionId: chart_version_01jvmk1c2e7f9h4j6m8p0q3r5t
                        name: Monthly recurring revenue by segment
                        type: LINE
                        sqlQuery: >-
                          select date_trunc('month', started_at) as month,
                          segment, sum(mrr) as mrr from subscriptions where
                          status = 'active' group by 1, 2 order by 1
                        databaseConnectionId: db_conn_01jvmhy3v6b9n2p4q8r5t7x1zc
                        imageUrl: >-
                          https://static.basedash.com/chart-screenshots/insights/insight_01jvmk3x9r6p8q4n2b7z5c1h0a/chart_version_01jvmk1c2e7f9h4j6m8p0q3r5t-1400x1000.png
                      createdAt: '2026-05-26T13:42:18.000Z'
                      updatedAt: '2026-05-26T13:42:18.000Z'
                      bodyMarkdown: >-
                        Enterprise MRR increased 18% month over month, outpacing
                        self-serve growth by 11 percentage points. The increase
                        was concentrated in the final week of April, when three
                        annual expansions were booked.


                        This suggests the expansion motion is becoming a larger
                        contributor to new recurring revenue.
                      sourceMeta:
                        model: gpt-5.4
                        generatedAt: '2026-05-26T13:42:18.000Z'
                        chartScreenshot:
                          chartVersionId: chart_version_01jvmk1c2e7f9h4j6m8p0q3r5t
                          key: >-
                            chart-screenshots/insights/insight_01jvmk3x9r6p8q4n2b7z5c1h0a/chart_version_01jvmk1c2e7f9h4j6m8p0q3r5t-1400x1000.png
                          url: >-
                            https://static.basedash.com/chart-screenshots/insights/insight_01jvmk3x9r6p8q4n2b7z5c1h0a/chart_version_01jvmk1c2e7f9h4j6m8p0q3r5t-1400x1000.png
                          width: 700
                          height: 500
                          scale: 2
                          generatedAt: '2026-05-26T13:42:20.000Z'
                      rawData:
                        rows:
                          - month: '2026-02-01T00:00:00.000Z'
                            segment: Self serve
                            mrr: 84200
                          - month: '2026-02-01T00:00:00.000Z'
                            segment: Enterprise
                            mrr: 126500
                          - month: '2026-03-01T00:00:00.000Z'
                            segment: Self serve
                            mrr: 89300
                          - month: '2026-03-01T00:00:00.000Z'
                            segment: Enterprise
                            mrr: 141800
                          - month: '2026-04-01T00:00:00.000Z'
                            segment: Self serve
                            mrr: 95600
                          - month: '2026-04-01T00:00:00.000Z'
                            segment: Enterprise
                            mrr: 167300
                        count: 6
                        page: 1
                        limit: 1000
        '400':
          description: Bad request - Invalid query parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found - Insight not found or no admin access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded - Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    PublicInsightDetailResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PublicInsightDetail'
      required:
        - data
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - error
    RateLimitErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/RateLimitError'
      required:
        - error
    PublicInsightDetail:
      allOf:
        - $ref: '#/components/schemas/PublicInsightListItem'
        - type: object
          properties:
            chart:
              $ref: '#/components/schemas/PublicInsightChart'
            bodyMarkdown:
              type: string
              description: Insight body as Markdown
            sourceMeta:
              description: Insight generation metadata
            rawData:
              $ref: '#/components/schemas/PublicInsightRawData'
          required:
            - bodyMarkdown
            - rawData
    ApiError:
      type: object
      properties:
        title:
          type: string
          description: Error type identifier
        detail:
          type: string
          description: Human-readable error description
      required:
        - title
        - detail
    RateLimitError:
      allOf:
        - $ref: '#/components/schemas/ApiError'
        - type: object
          properties:
            title:
              type: string
              enum:
                - RateLimitExceeded
            retryAfterMs:
              type: number
              description: Milliseconds until the rate limit window resets
          required:
            - retryAfterMs
    PublicInsightListItem:
      type: object
      properties:
        id:
          type: string
          description: Insight ID
        organizationId:
          type: string
          description: Organization ID
        title:
          type: string
          description: Insight title
        chartId:
          type: string
          description: Chart ID
        chart:
          type: object
          properties:
            id:
              type: string
              description: Chart ID
            versionId:
              type:
                - string
                - 'null'
              description: Latest chart version ID
            name:
              type:
                - string
                - 'null'
              description: Latest chart version name
            type:
              type:
                - string
                - 'null'
              description: Chart type
          required:
            - id
            - versionId
            - name
            - type
          description: Basic chart information
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp
        updatedAt:
          type: string
          format: date-time
          description: Last update timestamp
      required:
        - id
        - organizationId
        - title
        - chartId
        - chart
        - createdAt
        - updatedAt
    PublicInsightChart:
      type: object
      properties:
        id:
          type: string
          description: Chart ID
        versionId:
          type:
            - string
            - 'null'
          description: Latest chart version ID
        name:
          type:
            - string
            - 'null'
          description: Latest chart version name
        type:
          type:
            - string
            - 'null'
          description: Chart type
        sqlQuery:
          type:
            - string
            - 'null'
          description: SQL query used by the chart
        databaseConnectionId:
          type:
            - string
            - 'null'
          description: Data source ID used by the chart
        imageUrl:
          type:
            - string
            - 'null'
          format: uri
          description: Public URL for a rendered image of the chart
      required:
        - id
        - versionId
        - name
        - type
        - sqlQuery
        - databaseConnectionId
        - imageUrl
      description: Chart information
    PublicInsightRawData:
      type:
        - object
        - 'null'
      properties:
        rows:
          type: array
          items:
            type: object
            additionalProperties: {}
            description: A raw chart data row
          description: Raw chart rows
        count:
          type: number
          description: Total row count for the chart query
        page:
          type: number
          description: Raw data page number
        limit:
          type: number
          description: Maximum raw rows returned
      required:
        - rows
        - count
        - page
        - limit
      description: Raw data returned by the insight chart query
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authentication using Bearer token format: `Bearer
        <basedash_api_key>`

````