> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.vapi.ai/llms.txt.
> For full documentation content, see https://docs.vapi.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.vapi.ai/_mcp/server.

# Run Insight

POST https://api.vapi.ai/reporting/insight/{id}/run
Content-Type: application/json

Reference: https://docs.vapi.ai/api-reference/insight/insight-controller-run

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: api
  version: 1.0.0
paths:
  /reporting/insight/{id}/run:
    post:
      operationId: insight-controller-run
      summary: Run Insight
      tags:
        - subpackage_insight
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Retrieve your API Key from [Dashboard](dashboard.vapi.ai).
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsightRunResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InsightRunDTO'
servers:
  - url: https://api.vapi.ai
components:
  schemas:
    InsightRunFormatPlanFormat:
      type: string
      enum:
        - raw
        - recharts
      description: >-
        This is the format of the data to return.

        If not provided, defaults to "raw".

        Raw provides the data as fetched from the database, with formulas
        evaluated.

        Recharts provides the data in a format that can is ready to be used by
        recharts.js to render charts.
      title: InsightRunFormatPlanFormat
    InsightRunFormatPlan:
      type: object
      properties:
        format:
          $ref: '#/components/schemas/InsightRunFormatPlanFormat'
          description: >-
            This is the format of the data to return.

            If not provided, defaults to "raw".

            Raw provides the data as fetched from the database, with formulas
            evaluated.

            Recharts provides the data in a format that can is ready to be used
            by recharts.js to render charts.
      title: InsightRunFormatPlan
    InsightTimeRangeWithStepStep:
      type: string
      enum:
        - minute
        - hour
        - day
        - week
        - month
        - quarter
        - year
      description: |-
        This is the group by step for aggregation.

        If not provided, defaults to group by day.
      title: InsightTimeRangeWithStepStep
    InsightTimeRangeWithStepStart:
      type: object
      properties: {}
      description: |-
        This is the start date for the time range.

        Should be a valid ISO 8601 date-time string or relative time string.
        If not provided, defaults to the 7 days ago.

        Relative time strings of the format "-{number}{unit}" are allowed.

        Valid units are:
        - d: days
        - h: hours
        - w: weeks
        - m: months
        - y: years
      title: InsightTimeRangeWithStepStart
    InsightTimeRangeWithStepEnd:
      type: object
      properties: {}
      description: |-
        This is the end date for the time range.

        Should be a valid ISO 8601 date-time string or relative time string.
        If not provided, defaults to now.

        Relative time strings of the format "-{number}{unit}" are allowed.

        Valid units are:
        - d: days
        - h: hours
        - w: weeks
        - m: months
        - y: years
      title: InsightTimeRangeWithStepEnd
    InsightTimeRangeWithStep:
      type: object
      properties:
        step:
          $ref: '#/components/schemas/InsightTimeRangeWithStepStep'
          description: |-
            This is the group by step for aggregation.

            If not provided, defaults to group by day.
        start:
          $ref: '#/components/schemas/InsightTimeRangeWithStepStart'
          description: |-
            This is the start date for the time range.

            Should be a valid ISO 8601 date-time string or relative time string.
            If not provided, defaults to the 7 days ago.

            Relative time strings of the format "-{number}{unit}" are allowed.

            Valid units are:
            - d: days
            - h: hours
            - w: weeks
            - m: months
            - y: years
        end:
          $ref: '#/components/schemas/InsightTimeRangeWithStepEnd'
          description: |-
            This is the end date for the time range.

            Should be a valid ISO 8601 date-time string or relative time string.
            If not provided, defaults to now.

            Relative time strings of the format "-{number}{unit}" are allowed.

            Valid units are:
            - d: days
            - h: hours
            - w: weeks
            - m: months
            - y: years
        timezone:
          type: string
          description: |-
            This is the timezone you want to set for the query.

            If not provided, defaults to UTC.
      title: InsightTimeRangeWithStep
    InsightRunDTO:
      type: object
      properties:
        formatPlan:
          $ref: '#/components/schemas/InsightRunFormatPlan'
        timeRangeOverride:
          $ref: '#/components/schemas/InsightTimeRangeWithStep'
          description: >-
            This is the optional time range override for the insight.

            If provided, overrides every field in the insight's timeRange.

            If this is provided with missing fields, defaults will be used, not
            the insight's timeRange.

            start default - "-7d"

            end default - "now"

            step default - "day"

            For Pie and Text Insights, step will be ignored even if provided.
      title: InsightRunDTO
    InsightRunResponse:
      type: object
      properties:
        id:
          type: string
        insightId:
          type: string
        orgId:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - insightId
        - orgId
        - createdAt
        - updatedAt
      title: InsightRunResponse
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: Retrieve your API Key from [Dashboard](dashboard.vapi.ai).

```

## SDK Code Examples

```python
from vapi import Vapi

client = Vapi(
    token="YOUR_TOKEN_HERE",
)

client.insight.insight_controller_run(
    id="id",
)

```

```go
package example

import (
    context "context"

    serversdkgo "github.com/VapiAI/server-sdk-go"
    client "github.com/VapiAI/server-sdk-go/client"
    option "github.com/VapiAI/server-sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "YOUR_TOKEN_HERE",
        ),
    )
    request := &serversdkgo.InsightRunDto{
        Id: "id",
    }
    client.Insight.InsightControllerRun(
        context.TODO(),
        request,
    )
}

```

```python
from vapi import Vapi

client = Vapi(
    token="YOUR_TOKEN_HERE",
)

client.insight.insight_controller_run(
    id="id",
)

```

```go
package example

import (
    context "context"

    serversdkgo "github.com/VapiAI/server-sdk-go"
    client "github.com/VapiAI/server-sdk-go/client"
    option "github.com/VapiAI/server-sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "YOUR_TOKEN_HERE",
        ),
    )
    request := &serversdkgo.InsightRunDto{
        Id: "id",
    }
    client.Insight.InsightControllerRun(
        context.TODO(),
        request,
    )
}

```