---
title: "Execute a synchronous semantic query"
method: POST
path: "/v3/InsightsDomains/Conversations/Query"
tags: ["TwilioInsights"]
---

# Execute a synchronous semantic query

`POST /v3/InsightsDomains/Conversations/Query`

Execute a semantic query against the Conversations domain.
Returns results inline. For long-running queries, use the QueryJobs endpoint.

## Query parameters

- `pageSize` integer

## Request body

- InsightsQueryRequest
  - `domain` string — The business domain to execute the query against
  - `query` QueryDefinition, required — Structured query definition that specifies what data to retrieve and how to filter, group, and order it
    - `measures` string[] — Array of measures to retrieve, representing quantitative values or metrics to be calculated
    - `dimensions` string[] — Array of dimensions to retrieve, representing categorical attributes for grouping and organizing data
    - `filters` object[] — Nested filter conditions. Always use `op` and `expressions`.
      - `op` 'AND' | 'OR' | 'EQ' | 'NE' | 'GT' | 'LT' | 'IN'
      - `expressions` object[], required
        - `op` 'AND' | 'OR' | 'EQ' | 'NE' | 'GT' | 'LT' | 'IN', required
        - `field` string, required
        - `values` string[]
    - `orderBy` object[] — Specifications for sorting the query results by specific fields in ascending or descending order
      - `field` string — Dimension or measure to order by
      - `direction` 'ASC' | 'DESC' — Sort order direction, ascending or descending

## Response `200`

Successful query response

- InsightsQueryResponse
  - `domain` string — Indicates the business domain the query was executed against
  - `items` object[] — Array of result objects containing the query results. Each object contains properties matching the requested measures and dimensions.
  - `meta` PaginationMeta — The pagination metadata containing navigation tokens and result information. By convention, this schema should be added to the response payload's 'meta' attribute.
    - `key` string, required — The key of the list property contains the actual data items. This enables programmatic iteration over paginated results.
    - `pageSize` integer, required — The actual number of items returned in this response. May be less than the requested pageSize for the last page.
    - `previousToken` string, nullable — Token to fetch the previous page of results. Only included if there is a previous page, otherwise omitted.
    - `nextToken` string, nullable — Token to fetch the next page of results. Only included if there is a next page, otherwise omitted.

## Other responses

- `400` — Bad request
- `429` — Too Many requests (rate limit exceeded for request originating from public API)
- `500` — Internal server error

---

[API](https://skmtc.dev/twilio/apis/insights-v3.md) · [All operations](https://skmtc.dev/twilio/apis/insights-v3/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/twilio/insights-v3/revisions/5f8734a5a937/schema)
