---
title: "Query Simple Queries"
method: POST
path: "/preview/simple/queries/query"
tags: ["Queries"]
---

# Query Simple Queries

`POST /preview/simple/queries/query`

## Request body

- SimpleQueryQueryRequest
  - `query` SimpleQueryQuery
    - `flags` QueryQueryFlags
    - `tags` object, nullable
    - `meta` object, nullable
  - `query_refs` AgentaSdkModelsSharedReference[], nullable
    - `version` string, nullable
    - `slug` string, nullable
    - `id` string, uuid, nullable
  - `include_archived` boolean, nullable
  - `windowing` Windowing
    - `newest` string, date-time, nullable
    - `oldest` string, date-time, nullable
    - `next` string, uuid, nullable
    - `limit` integer, nullable
    - `order` 'ascending' | 'descending', nullable
    - `interval` integer, nullable
    - `rate` number, nullable

## Response `200`

Successful Response

- SimpleQueriesResponse
  - `count` integer
  - `queries` SimpleQuery[]
    - `name` string, nullable
    - `description` string, nullable
    - `created_at` string, date-time, nullable
    - `updated_at` string, date-time, nullable
    - `deleted_at` string, date-time, nullable
    - `created_by_id` string, uuid, nullable
    - `updated_by_id` string, uuid, nullable
    - `deleted_by_id` string, uuid, nullable
    - `slug` string, nullable
    - `id` string, uuid, nullable
    - `flags` QueryFlags
    - `tags` object, nullable
    - `meta` object, nullable
    - `data` QueryRevisionDataOutput
      - `windowing` Windowing
        - `newest` string, date-time, nullable
        - `oldest` string, date-time, nullable
        - `next` string, uuid, nullable
        - `limit` integer, nullable
        - `order` 'ascending' | 'descending', nullable
        - `interval` integer, nullable
        - `rate` number, nullable
      - `filtering` FilteringOutput
        - `operator` 'and' | 'or' | 'not' | 'nand' | 'nor'
        - `conditions` union[]
          - union
            - Condition
              - …
            - FilteringOutput — recursive
    - `variant_id` string, uuid, nullable
    - `revision_id` string, uuid, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-02-13** `72fe88316d15` — 1 breaking, 7 info
  - removed `subschema #1` from the `query/anyOf[subschema #1: SimpleQueryQuery]/flags` request property `anyOf` list
  - added `#/components/schemas/QueryQueryFlags` to the `query/anyOf[subschema #1: SimpleQueryQuery]/flags` request property `anyOf` list
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
  - …4 more
- **2026-01-14** `53da4c9de2b7` — 2 breaking, 2 info
  - request property `query/anyOf[subschema #1: SimpleQueryQuery]/tags/anyOf[subschema #1]/additionalProperties/` list-of-types was narrowed by removing types `integer, null and number` from media type `application/json`
  - response property `queries/items/flags/anyOf[subschema #1]/additionalProperties/` list-of-types was widened by adding types `object` to media type `application/json` of response `200`
  - request property `query/anyOf[subschema #1: SimpleQueryQuery]/flags/anyOf[subschema #1]/additionalProperties/` list-of-types was widened by adding types `object` to media type `application/json`
  - response property `queries/items/tags/anyOf[subschema #1]/additionalProperties/` list-of-types was narrowed by removing types `integer, null and number` from media type `application/json` of response `200`
- **2025-11-05** `e62506c24377` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/preview/simple/queries/query/post.md)

---

[API](https://skmtc.dev/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.dev/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/revisions/42bb75a1c2e6/schema)
