---
title: "Invoke Workflow"
method: POST
path: "/preview/workflows/invoke"
tags: ["Workflows"]
---

# Invoke Workflow

`POST /preview/workflows/invoke`

## Request body

- WorkflowServiceRequestInput
  - `flags` object, nullable
  - `tags` object, nullable
  - `meta` object, nullable
  - `version` string, nullable
  - `interface` union
    - WorkflowServiceInterfaceInput
      - `version` string, nullable
      - `uri` string, nullable
      - `url` string, nullable
      - `headers` object, nullable
      - `schemas` JsonSchemasInput
        - `parameters` object, nullable
        - `inputs` object, nullable
        - `outputs` object, nullable
    - object
  - `configuration` union
    - WorkflowServiceConfigurationInput
      - `script` object, nullable
      - `parameters` object, nullable
    - object
  - `references` object, nullable
  - `links` object, nullable
  - `secrets` object, nullable
  - `credentials` string, nullable
  - `data` WorkflowServiceRequestData
    - `revision` object, nullable
    - `parameters` object, nullable
    - `testcase` object, nullable
    - `inputs` object, nullable
    - `trace` object, nullable
    - `outputs` unknown

## Response `200`

Successful Response

- union
  - WorkflowServiceBatchResponse
    - `span_id` string, nullable
    - `trace_id` string, nullable
    - `version` string, nullable
    - `status` WorkflowServiceStatus
      - `code` integer, nullable
      - `message` string, nullable
      - `type` string, nullable
      - `stacktrace` union
        - string[]
        - string
    - `data` WorkflowServiceResponseData
      - `outputs` unknown
  - WorkflowServiceStreamResponse
    - `span_id` string, nullable
    - `trace_id` string, nullable
    - `version` string, nullable
    - `status` WorkflowServiceStatus
      - `code` integer, nullable
      - `message` string, nullable
      - `type` string, nullable
      - `stacktrace` union
        - string[]
        - string
    - `generator` unknown, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-02-13** `72fe88316d15` — 2 breaking, 4 info
  - response property `anyOf[subschema #1: WorkflowServiceBatchResponse]/version` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - response property `anyOf[subschema #2: WorkflowServiceStreamResponse]/version` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - request property `interface/anyOf[subschema #1: WorkflowServiceInterface]/version` list-of-types was widened by adding types `null` to media type `application/json`
  - request property `version` list-of-types was widened by adding types `null` to media type `application/json`
  - …2 more
- **2026-01-14** `53da4c9de2b7` — 1 breaking, 14 warning, 12 info
  - the response's body type/format changed from `object`/`` to ``/`` for status `200`
  - deleted the `query` request parameter `workflow_id`
  - deleted the `query` request parameter `workflow_revision_id`
  - deleted the `query` request parameter `workflow_revision_slug`
  - …23 more
- **2025-11-05** `e62506c24377` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/preview/workflows/invoke/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/72fe88316d15/schema)
