Workflows
Publish Workflow
Publish or unpublish a private workflow.
PUT
Publish or unpublish a workflow. Publishing registers the workflow’s triggers and crons and snapshots the current draft as a new version; unpublishing deregisters them. Publishing with a specific
version publishes the draft as that version number.
The draft ID and the published ID are different.
- To publish, pass the draft workflow ID — the
_idreturned by Create Workflow (or the workflow whose draft you opened via Get Workflow Draft). - The publish response returns the published workflow ID (a different
_id). Use that ID — also visible in List Workflows — to unpublish, execute, or delete. - Calling unpublish with the draft ID fails with
400 INVALID_WORKFLOW_ID(“Only public and published workflows can be unpublished”).
Authentication
This endpoint requires a session token (issue one with Generate Session Token); it operates on the linked account’s private workflow.Session token for the linked account.Format:
Bearer YOUR_SESSION_TOKENPath Parameters
When publishing (
published: true), the draft workflow ID. When unpublishing (published: false), the published workflow ID returned by the publish call. See the note above.Body Parameters
true to publish (registers triggers), false to unpublish.When publishing, publish the draft as this version number.
Response
- 200 OK
- 400 Bad Request
Returns the published (or unpublished) workflow. On publish, the
_id here is the published workflow ID — different from the draft ID you passed in.