---
title: "Create Workflow Version"
method: POST
path: "/api/v1/workflow-versions"
tags: ["Workflow Versions"]
---

# Create Workflow Version

`POST /api/v1/workflow-versions`

Validates and stores an immutable workflow package in content-addressed storage. Repeating the same canonical content returns the same identifier.

## Request body

- WorkflowVersion — Complete immutable package for one rooted workflow. It contains at most 512 files and 512 workflow dependencies, each file is at most 512 KiB of UTF-8 content, and its compact canonical JSON representation is at most 2 MiB.
  - `entrypoint` string, required — Canonical portable path inside one workflow version. Paths are UTF-8, relative, at most 240 bytes and 16 components, and cannot contain empty, dot, parent, backslash, control, tilde-root, or drive-letter segments. Map keys receive stricter byte and structural validation in the domain model than OpenAPI can express.
  - `files` object, required — Workflow-local text files keyed by canonical path. Keys receive stricter domain validation than OpenAPI can express; each value is limited to 512 KiB of UTF-8 bytes.
  - `workflow_dependencies` object, required — Exact stored workflow-version IDs keyed by resolved child-workflow path. Keys receive stricter domain validation than OpenAPI can express.

## Response `201`

Workflow version stored or already present

- CreateWorkflowVersionResponse — Identity of the stored immutable workflow version.
  - `workflow_version_id` string, required — SHA-256 identity of validated canonical workflow-version bytes.

## Other responses

- `400` — Malformed JSON (`invalid_json`)
- `413` — Request body exceeds 2 MiB (`workflow_version_too_large`)
- `422` — Invalid workflow content (`workflow_version_invalid`) or an absent, invalid, or non-canonical dependency (`workflow_version_dependency_not_found`)
- `500` — Workflow version storage failed

---

[API](https://skmtc.net/fabro-sh/apis/fabro-run-api.md) · [All operations](https://skmtc.net/fabro-sh/apis/fabro-run-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fabro-sh/fabro-run-api/revisions/adbc4b711284/schema)
