---
title: "Execute Workflow"
method: POST
path: "/api/v2/workflows"
tags: ["Workflow"]
---

# Execute Workflow

`POST /api/v2/workflows`

Execute a workflow with support for sync, stream, and background modes

## Request body

- WorkflowExecutionRequest — Request schema for workflow execution.
  - `background` boolean
  - `stream` boolean
  - `flow_id` string, required
  - `inputs` object, nullable — Component-specific inputs in flat format: 'component_id.param_name': value

## Response `200`

Workflow execution response

- union
  - object — Synchronous workflow execution response.
    - `flow_id` string, required
    - `job_id` union
      - string
      - string, uuid
    - `object` 'response'
    - `created_timestamp` string
    - `status` JobStatus, required — unresolved $ref
    - `errors` ErrorDetail[] — unresolved $ref
    - `inputs` object
    - `outputs` object
  - object — Background job response.
    - `job_id` union, required
      - string
      - string, uuid
    - `flow_id` string, required
    - `object` 'job'
    - `created_timestamp` string
    - `status` JobStatus, required — unresolved $ref
    - `links` object
    - `errors` ErrorDetail[] — unresolved $ref

## Other responses

- `422` — Validation Error

## Changes

- **2026-03-12** `830c31118215` — 1 breaking, 3 info
  - added `subschema #1: WorkflowExecutionResponse, subschema #2: WorkflowJobResponse` to the response body `oneOf` list for the response status `200`
  - removed `#/components/schemas/WorkflowExecutionResponse, #/components/schemas/WorkflowJobResponse` from the response body `oneOf` list for the response status `200`
  - 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
- **2026-03-06** `0be341779529` — 1 info
  - endpoint added
- **2026-02-18** `191b57fc530b` — 1 breaking
  - api path removed without deprecation
- **2026-02-10** `0be341779529` — 1 info
  - endpoint added
- **2025-10-16** `9bd3e81318d7` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/langflow-ai/apis/langflow/changes/api/v2/workflows/post.md)

---

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