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

# Query workflows

`POST /workflows/search`

Use when listing or auditing workflow runs (e.g. ops dashboard or debugging). Returns a paginated list; supports filtering by workflow type and status.

## Request body

- TypesWorkflowExecutionFilter
  - `end_time` string, date-time
  - `entity` string — e.g. plan, invoice, subscription
  - `entity_id` string — e.g. plan_01ABC123
  - `expand` string
  - `filters` TypesFilterCondition[] — filters allows complex filtering based on multiple fields (same as FeatureFilter)
    - `data_type` 'string' | 'number' | 'date' | 'array'
    - `field` string
    - `operator` 'eq' | 'contains' | 'not_contains' | 'gt' | 'lt' | 'gte' | 'in' | 'not_in' | 'before' | 'after'
    - `value` TypesValue
      - `array` string[]
      - `boolean` boolean
      - `date` string
      - `number` number
      - `string` string
  - `limit` integer
  - `offset` integer
  - `order` 'asc' | 'desc'
  - `sort` TypesSortCondition[]
    - `direction` 'asc' | 'desc'
    - `field` string
  - `start_time` string, date-time
  - `status` 'published' | 'deleted' | 'archived'
  - `task_queue` string
  - `workflow_id` string — Workflow-specific filters
  - `workflow_status` string — e.g. Running, Completed, Failed
  - `workflow_type` string

## Response `200`

OK

- ListWorkflowsResponse
  - `items` WorkflowExecutionDTO[]
    - `close_time` string, date-time
    - `created_by` string
    - `duration_ms` integer
    - `entity` string — e.g. plan, invoice, subscription
    - `entity_id` string — e.g. plan ID, invoice ID
    - `run_id` string
    - `start_time` string, date-time
    - `status` string
    - `task_queue` string
    - `total_duration` string
    - `workflow_id` string
    - `workflow_type` string
  - `pagination` TypesPaginationResponse
    - `limit` integer
    - `offset` integer
    - `total` integer

## Other responses

- `400` — Invalid request
- `500` — Server error

---

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