Skip to main content
POST
Publish a flow

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

flowId
string
required

The flow's internal id, e.g. clx9z8y7x6w5v4u3t2s1. Get it from List flows (the id field of each flow). It is NOT the publicId slug that appears in a flow's public URL: a slug answers 404 here. A flow your token cannot write to answers 404, indistinguishable from one that does not exist.

Body

application/json

Optional guard against publishing a draft you have not seen.

expectedUpdatedAt
string<date-time>

The updatedAt of the draft as you last read it: from Get a flow, the answer of Update a flow, or the updatedAt of your previous publish. When the draft changed since, the publish answers 409 before anything is written. Always send it.

Response

The draft is published.

The outcome of a publish.

message
string
required

Always success when the call answers 200.

historyCreated
boolean
required

Whether this call stored a new history snapshot. False when the draft already matched what was published and the last snapshot (nothing new to record), or when the history already held this exact snapshot. Either way the published version is current.

updatedAt
string
required

ISO date of the draft's updatedAt at the end of the call. Send this value, not the one read before, as expectedUpdatedAt on the next publish.