Create Insight

Creates a saved reporting insight that queries call data and presents the results as a bar chart, pie chart, line chart, or text value.

Authentication

AuthorizationBearer
Authenticate server-side requests with a private Vapi API key. Create or copy a key from the [Vapi Dashboard](https://dashboard.vapi.ai) and send it in the `Authorization` header as `Bearer <token>`. Keep private API keys out of client-side code and public repositories.

Request

This endpoint expects an object.
barobjectRequired

Configuration used to create a bar-chart insight from call data using metric queries, formulas, grouping, and a stepped time range.

OR
pieobjectRequired

Configuration used to create a pie-chart insight from call data using metric queries, formulas, grouping, and a time range.

OR
lineobjectRequired

Configuration used to create a line-chart insight from call data using metric queries, formulas, grouping, and a stepped time range.

OR
textobjectRequired

Configuration used to create a text-value insight from call data using metric queries, a formula, and a time range.

Response

barobject

A saved bar-chart insight containing its call-data queries, formulas, grouping, stepped time range, metadata, and lifecycle information.

OR
pieobject

A saved pie-chart insight containing its call-data queries, formulas, grouping, time range, and lifecycle information.

OR
lineobject

A saved line-chart insight containing its call-data queries, formulas, grouping, stepped time range, metadata, and lifecycle information.

OR
textobject

A saved text-value insight containing its call-data queries, formula, time range, and lifecycle information.