Skip to content

Publish a workflow draft

POST
/v1/forms/{form}/workflow/publish
curl --request POST \
--url https://api.submeto.com/v1/forms/example/workflow/publish \
--header 'Authorization: Bearer <token>'

Creates one immutable version. Requires workflows:publish, a current Workflow ETag, an idempotency key, and explicit user confirmation in clients.

form
required
string

The form ID.

If-Match
string
Idempotency-Key
string

Workflow published

Media typeapplication/json
object
data
object
id
string
workflow_id
string
version
integer
definition
object
schema_version
integer
nodes
array
edges
array
node_count
integer
estimated_min_cost
integer
estimated_max_cost
integer
restored_from_version_id
string
nullable
published_at
string
request_id
string
Example
{
"data": {
"id": "01JVERSION00000000000000002",
"workflow_id": "01JWORKFLOW0000000000000000",
"version": 2,
"definition": {
"schema_version": 1,
"nodes": [],
"edges": []
},
"node_count": 0,
"estimated_min_cost": 1,
"estimated_max_cost": 2,
"restored_from_version_id": null,
"published_at": "2026-09-03T09:10:00.000Z"
},
"request_id": "REQUEST_ID"
}

Invalid workflow

Media typeapplication/json
object
error
object
code
string
message
string
details
object
items
array
request_id
string
Example
{
"error": {
"code": "workflow_validation_failed",
"message": "The workflow cannot be published.",
"details": {
"items": []
}
},
"request_id": "REQUEST_ID"
}