---
title: "Create an immutable Workflow version using the immediately preceding matching test receipt and unchanged draft"
method: POST
path: "/v1/workflows/{configObjectId}/versions"
tags: ["Workflows"]
---

# Create an immutable Workflow version using the immediately preceding matching test receipt and unchanged draft

`POST /v1/workflows/{configObjectId}/versions`

## Path parameters

- `configObjectId` string, required

## Request body

- object
  - `name` string, required
  - `description` string
  - `code` string, required
  - `exampleInput` unknown
  - `inputSchema` unknown
  - `outputSchema` unknown
  - `requiredCapabilities` object[], required
    - `capabilityName` string, required
    - `scriptPath` string, required
  - `receiptId` string, required — Copy receiptId from the immediately preceding successful draft test. Submit the exact same name, description, code, exampleInput, inputSchema, outputSchema, and requiredCapabilities used by that test.

## Response `201`

Workflow version created.

- object
  - `pluginId` string, required
  - `configObjectId` string, required
  - `title` string, required
  - `description` string, nullable, required
  - `canRun` boolean, required
  - `canManage` boolean, required
  - `currentVersion` object, required
    - `id` string, required
    - `code` string, nullable, required
    - `graph` object, nullable, required
      - `nodes` union[], required
        - union
          - object
            - `id` string, required
            - `kind` 'input', required
            - `label` string, required
            - `fields` string[], required
          - object
            - `id` string, required
            - `kind` 'tool', required
            - `label` string, required
            - `namespace` string, required
            - `tool` string, required
            - `scriptPath` string, required
            - `assignsTo` string, nullable, required
            - `parallelGroup` string, nullable, required
          - object
            - `id` string, required
            - `kind` 'search', required
            - `label` string, required
          - object
            - `id` string, required
            - `kind` 'branch', required
            - `label` string, required
          - object
            - `id` string, required
            - `kind` 'loop', required
            - `label` string, required
          - object
            - `id` string, required
            - `kind` 'return', required
            - `label` string, required
      - `edges` object[], required
        - `from` string, required
        - `to` string, required
        - `label` string, nullable, required
        - `kind` 'flow' | 'data', required
      - `parseError` string, nullable, required
    - `inputSchema` unknown, required
    - `outputSchema` unknown, required
    - `exampleInput` unknown
    - `requiredCapabilities` object[], required
      - `capabilityName` string, required
      - `scriptPath` string, required
    - `codeDigest` string, required
    - `inputSchemaDigest` string, nullable, required
    - `outputSchemaDigest` string, nullable, required
    - `createdAt` string, date-time, required
    - `automationReferences` object[], required
      - `id` string, required
      - `name` string, required
      - `state` 'active' | 'inactive' | 'needs_attention' | 'archived', required
      - `configObjectVersionId` string, required
      - `input` unknown
  - `versions` object[], required
    - `id` string, required
    - `code` string, nullable, required
    - `graph` object, nullable, required
      - `nodes` union[], required
        - union
          - object
            - `id` string, required
            - `kind` 'input', required
            - `label` string, required
            - `fields` string[], required
          - object
            - `id` string, required
            - `kind` 'tool', required
            - `label` string, required
            - `namespace` string, required
            - `tool` string, required
            - `scriptPath` string, required
            - `assignsTo` string, nullable, required
            - `parallelGroup` string, nullable, required
          - object
            - `id` string, required
            - `kind` 'search', required
            - `label` string, required
          - object
            - `id` string, required
            - `kind` 'branch', required
            - `label` string, required
          - object
            - `id` string, required
            - `kind` 'loop', required
            - `label` string, required
          - object
            - `id` string, required
            - `kind` 'return', required
            - `label` string, required
      - `edges` object[], required
        - `from` string, required
        - `to` string, required
        - `label` string, nullable, required
        - `kind` 'flow' | 'data', required
      - `parseError` string, nullable, required
    - `inputSchema` unknown, required
    - `outputSchema` unknown, required
    - `exampleInput` unknown
    - `requiredCapabilities` object[], required
      - `capabilityName` string, required
      - `scriptPath` string, required
    - `codeDigest` string, required
    - `inputSchemaDigest` string, nullable, required
    - `outputSchemaDigest` string, nullable, required
    - `createdAt` string, date-time, required
    - `automationReferences` object[], required
      - `id` string, required
      - `name` string, required
      - `state` 'active' | 'inactive' | 'needs_attention' | 'archived', required
      - `configObjectVersionId` string, required
      - `input` unknown
  - `latestSnapshot` object, nullable, required
    - `receiptId` string, required
    - `pluginId` string, required
    - `configObjectId` string, required
    - `configObjectVersionId` string, required
    - `automationRunId` string, nullable, required
    - `value` unknown, required
    - `markdown` string, nullable, required
    - `codeDigest` string, required
    - `resultDigest` string, nullable, required
    - `inputSchemaDigest` string, nullable, required
    - `outputSchemaDigest` string, nullable, required
    - `rendererVersion` 'codemode-markdown-v1', nullable, required
    - `toolCalls` object[], required
      - `name` string, required
    - `status` 'succeeded' | 'failed', required
    - `errorKind` string, nullable, required
    - `errorMessage` string, nullable, required
    - `source` 'manual' | 'scheduled', required
    - `startedAt` string, date-time, required
    - `finishedAt` string, date-time, required
    - `contentDeletedAt` string, date-time, nullable, required
  - `latestSuccessfulSnapshot` object, nullable, required
    - `receiptId` string, required
    - `pluginId` string, required
    - `configObjectId` string, required
    - `configObjectVersionId` string, required
    - `automationRunId` string, nullable, required
    - `value` unknown, required
    - `markdown` string, nullable, required
    - `codeDigest` string, required
    - `resultDigest` string, nullable, required
    - `inputSchemaDigest` string, nullable, required
    - `outputSchemaDigest` string, nullable, required
    - `rendererVersion` 'codemode-markdown-v1', nullable, required
    - `toolCalls` object[], required
      - `name` string, required
    - `status` 'succeeded' | 'failed', required
    - `errorKind` string, nullable, required
    - `errorMessage` string, nullable, required
    - `source` 'manual' | 'scheduled', required
    - `startedAt` string, date-time, required
    - `finishedAt` string, date-time, required
    - `contentDeletedAt` string, date-time, nullable, required
  - `freshness` union, required
    - object
      - `state` 'never_run', required
    - object
      - `state` 'fresh', required
      - `ageMs` integer, required
    - object
      - `state` 'stale', required
      - `ageMs` integer, required
      - `maxAgeMs` integer, required
    - object
      - `state` 'needs_attention', required
      - `ageMs` integer, nullable, required
      - `lastSuccessfulReceiptId` string, nullable, required
      - `reason` string, required

## Other responses

- `400` — Version rejected.

## Changes

- **2026-09-04** `d3984673ccd1` — 5 info
  - added the optional property `capability` to the response with the `400` status
  - added the required property `currentVersion/graph` to the response with the `201` status
  - added the required property `latestSnapshot/anyOf[subschema #1]/toolCalls` to the response with the `201` status
  - added the required property `latestSuccessfulSnapshot/anyOf[subschema #1]/toolCalls` to the response with the `201` status
  - …1 more
- **2026-08-20** `93df40e2efd5` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/workflows/:configObjectId/versions/post.md)

---

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