---
title: "Create a new workflow"
method: POST
path: "/api/workflows"
tags: ["workflows"]
---

# Create a new workflow

`POST /api/workflows`

Creates a new workflow with its first version.

## Request body

- CreateWorkflowRequest — Request body for creating a new saved workflow.
  - `default_view` 'workflow' | 'app' — Default view mode
  - `description` string — Description of the workflow
  - `forked_from_workflow_id` string — ID of the source workflow if forked
  - `forked_from_workflow_version_id` string — ID of the source workflow version if forked
  - `name` string — Display name for the workflow
  - `workflow_json` object, required — The ComfyUI workflow JSON

## Response `201`

Workflow created successfully

- WorkflowResponse — Full workflow entity including metadata and version history.
  - `created_at` string, date-time, required
  - `created_by` string, required
  - `default_view` 'workflow' | 'app'
  - `description` string
  - `forked_from` WorkflowForkedFrom — Reference to the parent workflow from which this workflow was forked.
    - `workflow_id` string
    - `workflow_version_id` string
  - `id` string, required
  - `latest_version` integer, required
  - `name` string
  - `updated_at` string, date-time, required

## Other responses

- `401` — Unauthorized
- `422` — Validation error
- `500` — Internal server error

---

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