---
title: "Run saved Insights report queries"
method: POST
path: "/insights-reports/{reportId}/query"
tags: ["InsightsReports"]
---

# Run saved Insights report queries

`POST /insights-reports/{reportId}/query`

## Request

- Base URL: `https://api.replo.app/v1`
- URL: `https://api.replo.app/v1/insights-reports/{reportId}/query`
- Auth: HTTP bearer

## Path parameters

- `reportId` string, uuid, required: Report file ID from list_insights_reports, or the final UUID in its Insights URL.

## Query parameters

- `projectId` string, uuid, required

## Headers

- `Replo-Api-Version` '2026-10-29', required

## Request body

- object
  - `queryIds` string[]: Query IDs from get_insights_report. Omit to run all queries (at most 30 per call).
  - `scope` object: Override selected report defaults. Filters replace the default filter list; omitted fields retain the report's defaults.
    - `filters` object[]
      - `fieldKey` string, required
      - `op` 'equals' | 'notEquals' | 'in' | 'notIn' | 'contains' | 'notContains' | 'startsWith' | 'isSet' | 'isNotSet' | 'greaterThan' | 'greaterThanOrEqual' | 'lessThan' | 'lessThanOrEqual', required
      - `value` union
        - string
        - number
        - boolean
        - union[]
          - union
            - string
            - number
      - `isProjectDefault` true: Marks an automatically seeded project domain, not a viewer selection.
    - `breakdown` object, nullable
      - `fieldKey` string, required
      - `limit` integer
    - `dateRange` object, nullable
      - `presetId` 'last_7_days' | 'last_14_days' | 'last_30_days' | 'last_90_days' | 'last_16_months' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'year_to_date' | 'custom', required
      - `since` string, date, required
      - `until` string, date, required
      - `comparison` 'previous_period' | 'previous_year' | 'none', required

## Response `200`

Run saved Insights report queries

- object
  - `reportId` string, uuid, required
  - `reportUpdatedAt` string, required
  - `queriedAt` string, date-time, required
  - `scope` object, required
    - `dateRange` object, nullable, required
      - `presetId` 'last_7_days' | 'last_14_days' | 'last_30_days' | 'last_90_days' | 'last_16_months' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'year_to_date' | 'custom', required
      - `since` string, required
      - `until` string, required
      - `comparison` 'previous_period' | 'previous_year' | 'none', required
    - `filters` object[]
      - `fieldKey` string, required
      - `op` 'equals' | 'notEquals' | 'in' | 'notIn' | 'contains' | 'notContains' | 'startsWith' | 'isSet' | 'isNotSet' | 'greaterThan' | 'greaterThanOrEqual' | 'lessThan' | 'lessThanOrEqual', required
      - `value` union
        - string
        - number
        - boolean
        - union[]
          - union
            - string
            - number
      - `isProjectDefault` true: Marks an automatically seeded project domain, not a viewer selection.
    - `breakdown` object, nullable, required
      - `fieldKey` string, required
      - `limit` integer
  - `results` union[], required
    - union
      - object
        - `id` string, required
        - `status` 'success', required
        - `sql` string, required
        - `datasets` string[], required
        - `rowCount` integer, required
        - `data` object[], required
      - object
        - `id` string, required
        - `status` 'error', required
        - `error` string, required
  - `warnings` string[], required

## Other responses

- `400`: Invalid request.
- `401`: Missing or invalid Replo Public API token. Send an active key as `Authorization: Bearer replo_sk_...`; if it was revoked, create a new key in Replo Settings.
- `403`: You are not authorized to access this resource. Ask a workspace owner to perform this action or to grant the key's creator access.
- `404`: Not Found. The resource may not exist, this key may lack the required scope, or the key's creator may have lost access. Check the key's scopes in Replo Settings and the creator's project or workspace access; a workspace owner can grant access.
- `409`: The resource is in a conflicting state.
- `413`: File content exceeds the 10 MiB limit.
- `429`: Too many requests. Please retry after the time indicated by the Retry-After header.
- `500`: An internal error occurred.
- `503`: Service temporarily unavailable.

## Changes

- **2026-11-04** `53d194ba2067`: 9 info
  - added the optional property `error/issues` to the response with the `400` status
  - added the optional property `error/issues` to the response with the `401` status
  - added the optional property `error/issues` to the response with the `403` status
  - added the optional property `error/issues` to the response with the `404` status
  - …5 more
- **2026-10-31** `a50090e0c8d7`: 2 warning
  - added the new `alia` enum value to the `results/items/oneOf[subschema #1]/datasets/items/` response property for the response status `200`
  - added the new `meta-marketing-api` enum value to the `results/items/oneOf[subschema #1]/datasets/items/` response property for the response status `200`
- **2026-10-29** `666c31ceb45c`: 1 breaking, 1 info
  - removed the enum value `2026-10-05` from the `header` request parameter `Replo-Api-Version`
  - added the new enum value `2026-10-29` to the `header` request parameter `Replo-Api-Version`
- **2026-10-26** `48d6a4334e83`: 1 warning
  - added the new `faire` enum value to the `results/items/oneOf[subschema #1]/datasets/items/` response property for the response status `200`
- **2026-10-24** `02ea49a0e6a2`: 1 warning
  - added the new `lifetimely` enum value to the `results/items/oneOf[subschema #1]/datasets/items/` response property for the response status `200`

[Operation history](https://skmtc.dev/replo/apis/replo-public-api/changes/insights-reports/:reportId/query/post.md)

---

[API](https://skmtc.dev/replo/apis/replo-public-api.md) - [All operations](https://skmtc.dev/replo/apis/replo-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/replo/apis/replo-public-api/revisions/53d194ba2067?raw)
