Skip to main content
PATCH
Patch workflow head files

Authorizations

X-Api-Key
string
header
required

Path Parameters

workflowId
string<uuid>
required

The ID of the workflow

Body

application/json

The file writes and deletes to apply

Request to patch the editable head's file representation

baseRev
integer
required

The revision this edit is based on. Agent-file-only patches overlay the current head even when this is stale. A structural-file patch is rejected with 409 when it does not match the stored head revision.

deletes
string[]
required

Paths of files to delete.

writes
object[]
required

Files to upsert.

Response

The request has succeeded.

An immutable snapshot of a workflow's configuration

createdAt
string<date-time>
required

When this workflow was created. For the editable head this is restamped on each in-place edit, so it doubles as the last-edited time.

files
object[]
required

The files stored on this workflow version. Empty when the workflow has no files.

graph
object
required

The workflow graph

id
string<uuid>
required

The unique ID of this workflow

inputs
object[]
required

Typed input definitions for workflow execution. Includes names referenced in prompts, which default to optional strings.

isPublished
boolean
required

Whether this is the workflow's published version (the API default). At most one version per workflow is published.

rev
integer
required

Monotonic optimistic-concurrency revision. Only meaningful for the editable head: supply it as baseRev on the next head patch. Agent-file-only patches overlay the current head if it has moved; structural-file patches are rejected with 409 when stale. Frozen snapshots never receive in-place patches.

rules
string
required

The rules/instructions for this workflow

settings
object
required

The settings for this version

version
integer
required

The monotonic per-workflow version number.

workflowId
string<uuid>
required

The ID of the workflow this version belongs to

author
string

The email of the user who created this workflow.

environmentTemplate
object

Optional environment template. Defaults to browser/anchor if not provided.

parentId
string<uuid>

The ID of the parent workflow this was derived from (for lineage tracking)