Skip to main content
POST
Create a workflow version

Authorizations

Authorization
string
header
required

API key issued from Settings → API Keys. Pass as Authorization: Bearer <key>.

Path Parameters

id
string
required

Workflow id, agent id, or typed alias like workflows.slug / agents.slug

Body

application/json

Exactly one of yaml or historyId, plus a bare semver version. YAML is capped at 1 MiB. historyId copies the selected snapshot into a new tagged row and does not retag the source. Set activate: false to create a detached candidate that does not move live HEAD; that path requires an existing current version.

yaml
string
required

Validated workflow YAML to publish as a new tagged version. Mutually exclusive with historyId. At most 1 MiB.

Required string length: 1 - 1048576
version
string
required

Bare semver tag such as 1.2.0. Do not include a leading v.

Pattern: ^\d+\.\d+\.\d+$
activate
boolean

Whether to make the new version current immediately. Defaults to true. Set false to keep a tagged candidate off live traffic until promote. activate: false requires an existing current workflow version and returns 400 if HEAD is empty.

Response

Created workflow version.

id
string
required
automationId
string
required
version
string | null
required
sourceRef
string | null
isCurrent
boolean
createdAt