Preview Insight

Runs an insight definition without first saving it, returning a preview of the resulting 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

idstring
The unique identifier for the insight run.
insightIdstring
The unique identifier for the insight that was run.
orgIdstring
The unique identifier for the organization that owns the run.
createdAtdatetime
The ISO 8601 timestamp when the insight run was created.
updatedAtdatetime
The ISO 8601 timestamp when the insight run was last updated.