Skip to main content
PUT
/
workflows
/
{workflowID}
/
versions
/
{versionID}
Create or update workflow version
curl --request PUT \
  --url https://workflows.eachlabs.run/api/v1/workflows/{workflowID}/versions/{versionID} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "version_id": "v2",
  "definition": {
    "version": "v2",
    "steps": [
      {
        "step_id": "generate_text",
        "type": "model",
        "model": "openai-chatgpt-5",
        "params": {
          "system_prompt": "You are a helpful assistant",
          "user_prompt": "{{inputs.prompt}}"
        }
      },
      {
        "step_id": "generate_image",
        "type": "model",
        "model": "flux-dev",
        "params": {
          "prompt": "{{generate_text.output}}",
          "num_images": 2
        },
        "fallback": {
          "enabled": true,
          "model": "flux-1-1-pro",
          "params": {
            "prompt": "{{generate_text.output}}",
            "guidance_scale": 7.5
          }
        }
      }
    ],
    "input_schema": {},
    "metadata": {}
  },
  "locked": false,
  "production": false,
  "allowed_to_share": false
}
'
{
  "version_id": "v1",
  "slug": "text-to-image-generator",
  "locked": false,
  "production": true,
  "allowed_to_share": false,
  "trigger_count": 15,
  "created_at": "2025-12-01T10:00:00Z",
  "updated_at": "2025-12-05T14:20:00Z",
  "status": "active",
  "definition": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.eachlabs.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-Key
string
header
required

API key for authentication

Path Parameters

workflowID
string
required

Unique workflow identifier

Example:

"wf_abc123"

versionID
string
required

Version identifier (e.g., "v1", "v2")

Example:

"v1"

Body

application/json
version_id
string
required

Version identifier (e.g., "v1", "v2", "v1.1")

Example:

"v2"

definition
object
required

The complete workflow definition for this version. This follows the workflow DSL format and must include all steps.

locked
boolean
default:false

Whether to lock this version from further modifications

production
boolean
default:false

Whether this is a production version

allowed_to_share
boolean
default:false

Toggle unlisted sharing for this version.

  • true → Makes version "unlisted" (accessible via link, hidden from public listings)
  • false → Makes version "private" (organization only)
  • No effect on public versions
  • New versions default to private when omitted

Response

Workflow version created or updated successfully

Summary information about a workflow version

version_id
string
required

Version identifier

Example:

"v1"

slug
string
required

Workflow slug (inherited from parent workflow)

Example:

"text-to-image-generator"

locked
boolean

Whether this version is locked from modifications

Example:

false

production
boolean

Whether this is a production version

Example:

true

allowed_to_share
boolean

True if version is unlisted (accessible via direct link but hidden from public listings).

Example:

false

trigger_count
integer

Number of times this specific version has been triggered

Example:

15

created_at
string<date-time>

RFC3339 timestamp when version was created

Example:

"2025-12-01T10:00:00Z"

updated_at
string<date-time>

RFC3339 timestamp when version was last updated

Example:

"2025-12-05T14:20:00Z"

status
enum<string>

Version lifecycle status

Available options:
active,
archived,
deleted
Example:

"active"

definition
object

The complete workflow definition (only included in detail responses). Contains steps, input schema, and metadata.

Last modified on May 28, 2026