---
title: "Create Workflow"
method: POST
path: "/api/workflows"
tags: ["Workflows"]
---

# Create Workflow

`POST /api/workflows`

Create a new workflow.

Request Body:
    - name: Workflow name
    - description: Optional description
    - workflow_type: Type of workflow (extract, fill, split, etc.)
    - nodes: List of workflow nodes
    - edges: List of workflow edges
    - is_template: Whether this is a reusable template
    - metadata_json: Additional metadata

Returns:
    Created workflow

## Request body

- WorkflowCreate — Request model for creating a new workflow
  - `name` string, required
  - `description` string, nullable
  - `workflow_type` string, required
  - `nodes` WorkflowNode[]
    - `id` string, required
    - `type` string, required
    - `position` object, required
    - `data` WorkflowNodeData, required — Configuration data for a workflow node
      - `label` string, required
      - `nodeType` string, nullable
  - `edges` WorkflowEdge[]
    - `id` string, required
    - `source` string, required
    - `target` string, required
    - `sourceHandle` string, nullable
    - `targetHandle` string, nullable
  - `is_template` boolean
  - `metadata_json` object, nullable
  - `project_id` string, nullable

## Response `200`

Successful Response

- WorkflowResponse — Response model for a workflow
  - `id` string, required
  - `user_id` string, required
  - `name` string, required
  - `description` string, nullable, required
  - `workflow_type` string, required
  - `nodes` object[], required
  - `edges` object[], required
  - `is_active` boolean, required
  - `is_template` boolean, required
  - `last_executed_at` string, nullable, required
  - `last_execution_status` string, nullable, required
  - `execution_count` integer, required
  - `created_at` string, required
  - `updated_at` string, required
  - `metadata_json` object, required
  - `project_id` string, nullable
  - `has_dashboard` boolean

## Other responses

- `422` — Validation Error

---

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