---
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

## Changes

- **2026-06-03** `8560879e6188` — 2 breaking, 1 warning, 9 info
  - added the new required request property `workflow_json`
  - removed the required property `error` from the response with the `401` status
  - removed the request property `content`
  - added the new optional request property `default_view`
  - …8 more
- **2026-05-22** `c4db9e1283df` — 2 breaking, 3 warning, 6 info
  - the response property `name` became optional for the status `201`
  - the `id` response's property type/format changed from `string`/`uuid` to `string`/`` for status `201`
  - removed the optional property `latest_version_id` from the response with the `201` status
  - removed the optional property `share_id` from the response with the `201` status
  - …7 more
- **2026-05-22** `09a5075587c8` — 3 info
  - api operation id `createCloudWorkflow` removed and replaced with `createWorkflow`
  - added the non-success response with the status `422`
  - added the non-success response with the status `500`
- **2026-05-08** `c9640fded659` — 1 info
  - endpoint added
- **2026-04-24** `a66055fa384e` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/comfy-org/apis/comfyui-api/changes/api/workflows/post.md)

---

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