Publish a workflow draft
POST
/v1/forms/{form}/workflow/publish
const url = 'https://api.submeto.com/v1/forms/example/workflow/publish';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”form
required
string
The form ID.
Header Parameters
Section titled “Header Parameters”If-Match
string
Idempotency-Key
string
Responses
Section titled “Responses”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
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"}