---
title: "Query Workflows"
method: POST
path: "/workflows/query"
tags: ["Workflows"]
---

# Query Workflows

`POST /workflows/query`

Query workflow artifacts with filters and pagination.

Accepts the same filters as query parameters or in the request body;
body fields win when both are supplied. Results are ordered by
creation time; pass `windowing.next` back for the following page.

See: [Query Pattern](/reference/api-guide/query-pattern).

## Query parameters

- `workflow_id` string, uuid, nullable
- `workflow_ids` string[], nullable
- `workflow_slug` string, nullable
- `workflow_slugs` string[], nullable
- `name` string, nullable
- `description` string, nullable
- `flags` string, nullable
- `tags` string, nullable
- `meta` string, nullable
- `include_archived` boolean, nullable
- `next` string, uuid, nullable
- `newest` string, date-time, nullable
- `oldest` string, date-time, nullable
- `limit` integer, nullable
- `order` 'ascending' | 'descending', nullable

## Response `200`

Successful Response

- WorkflowsResponse
  - `count` integer — Number of workflows in this page.
  - `workflows` Workflow[] — Workflow artifacts matching the query.
    - `folder_id` string, uuid, nullable
    - `flags` WorkflowArtifactFlags
      - `is_application` boolean
      - `is_evaluator` boolean
      - `is_snippet` boolean
    - `tags` object, nullable
    - `meta` object, nullable
    - `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
  - `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

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.net/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/versions/2e1079696f45/schema)
