---
title: "POST /v1/{+location}:generativeInsights"
method: POST
path: "/v1/{+location}:generativeInsights"
tags: ["projects"]
---

# POST /v1/{+location}:generativeInsights

`POST /v1/{+location}:generativeInsights`

Natural language based Insights which powers the next generation of dashboards in Insights. Next generation of QueryMetrics.

## Path parameters

- `location` string, required

## Request body

- GoogleCloudContactcenterinsightsV1GenerativeInsightsRequest — The request for generative insights.
  - `sessionId` string — Optional. The session id of the conversation. If the session id is not specified, backend will generate a random session id. If the session id is specified, will associate user-provided user_query with the provided session id.
  - `userProvidedChartSpec` object — Optional. The user provided chart spec for the chart. This will be used to override the visual spec generated by the LLM.
  - `revisionId` string — Optional. The revision id that maps to the state of the chart state revision. When specified, the backend will reload the chart with the sql and visual spec from that revision.
  - `filter` string — Filter for the data that can be specified in addition to the natural language query. Users are encouraged to use this field to populate time-windows.
  - `naturalLanguageQuery` string — The natural language query specified by the user. If this field is specified, `sql_query` will be ignored.
  - `chart` string — The full name of the chart resource this request corresponds to. Format: projects/{project}/locations/{location}/dashboards/{dashboard}/charts/{chart}
  - `comparisonFilter` string — Optional. Filter for the data that can be specified in addition to the natural language query. This `filter` is specifically used for charts where comparisons are possible. For example, "compare to last month" or "compare to previous quarter".
  - `sqlQuery` string — Optional. The SQL query specified by the user. This query must be in BigQuery SQL dialect. The `filter` field will also be ignored, as it is assumed that any filtering is already included in the SQL query.
  - `sqlComparisonKey` string — Optional. For charts with comparison, this key will determine the metric that will be compared between the current and another dataset.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/contactcenterinsights.md) · [All operations](https://skmtc.net/google/apis/contactcenterinsights/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/contactcenterinsights/revisions/e071ddf4dfc3/schema)
