---
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
  - `flow_id` string, required
  - `globals` object — Request-level global variables made available to workflow components. Keys may use any printable string up to 256 chars; values are capped at 65536 chars. Body globals always win over the legacy ``X-LANGFLOW-GLOBAL-VAR-*`` headers.
  - `inputs` object, nullable — Component-specific inputs in flat format: 'component_id.param_name': value
  - `stream` boolean

## Response `200`

Workflow execution response

- union
  - object — Synchronous workflow execution response.
    - `created_timestamp` string
    - `errors` ErrorDetail[]
      - `code` string, nullable
      - `details` object, nullable
      - `error` string, required
    - `flow_id` string, required
    - `globals` object
    - `inputs` object
    - `job_id` union
      - string
      - string, uuid
    - `object` 'response'
    - `outputs` object
    - `status` 'queued' | 'in_progress' | 'completed' | 'failed' | 'cancelled' | 'timed_out', required — Job execution status.
  - object — Background job response.
    - `created_timestamp` string
    - `errors` ErrorDetail[]
      - `code` string, nullable
      - `details` object, nullable
      - `error` string, required
    - `flow_id` string, required
    - `globals` object
    - `job_id` union, required
      - string
      - string, uuid
    - `links` object
    - `object` 'job'
    - `status` 'queued' | 'in_progress' | 'completed' | 'failed' | 'cancelled' | 'timed_out', required — Job execution status.

## Other responses

- `422` — Validation Error

## Changes

- **2026-06-08** `a5c4fa6a88f7` — 3 info
  - added the new optional request property `globals`
  - added the optional property `oneOf[subschema #1: WorkflowExecutionResponse]/globals` to the response with the `200` status
  - added the optional property `oneOf[subschema #2: WorkflowJobResponse]/globals` to the response with the `200` status
- **2026-03-18** `e94ee92b7c9a` — 1 breaking, 6 info
  - the `oneOf[subschema #1: WorkflowExecutionResponse]/outputs/additionalProperties/status` response's property type/format changed from `string`/`` to ``/`` for status `200`
  - removed the `cancelled` enum value from the `oneOf[subschema #1: WorkflowExecutionResponse]/outputs/additionalProperties/status` response property for the response status `200`
  - removed the `completed` enum value from the `oneOf[subschema #1: WorkflowExecutionResponse]/outputs/additionalProperties/status` response property for the response status `200`
  - removed the `failed` enum value from the `oneOf[subschema #1: WorkflowExecutionResponse]/outputs/additionalProperties/status` response property for the response status `200`
  - …3 more
- …earlier changes not shown

[Full 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/a5c4fa6a88f7/schema)
