POST/v1/postflows/{id}/flow/publish

Publish the journey draft

Publishes the draft as the next version; new cards enter it, cards already in the journey keep their version. The first Send card step is mirrored on the Postflow. Refused while the draft has errors (flow_invalid with the issues). Fires postflow.flow_published.

Scope postflows.writeIdempotent with a key

Path parameters

idstringrequired

Headers

Idempotency-Keystringmax length 255

Up to 255 characters, scoped to the organisation and the endpoint, kept for 24 hours: a repeat with the same body replays the stored response with Idempotent-Replayed: true (API-004).

Body

revisionintegermin 0

Returns

9 fields of the 200 answer
postflowIdstringrequired
builderbooleanrequired

Whether the plan has the flow builder

simplebooleanrequired

Whether the published journey is only "trigger, then Send card"

currentobjectrequired
4 fields
versionIdstring or nullrequired
numberinteger or nullrequired
publishedAtdate-time or nullrequired
definitionobjectrequired
2 fields
schemaVersionnumberrequired
stepsarray of one ofrequired
draftobject or nullrequired
4 fields
definitionobjectrequired
2 fields
schemaVersionnumberrequired
stepsarray of one ofrequired
revisionintegerrequired
updatedAtdate-time or nullrequired
updatedByIdstring or nullrequired
revisionintegerrequired

The draft revision to send in If-Match

versionsarray of objectsrequired
7 fields
idstringrequired
numberintegerrequired
publishedAtdate-timerequired
publishedByTypestringrequired
publishedByIdstring or nullrequired
stepsintegerrequired
currentbooleanrequired
signingSecretSetbooleanrequired
publishedintegerrequired

Responses

200Success
401Authentication required or API key invalid
403Permission or scope missing, organisation suspended
404Not found
409A request with this Idempotency-Key is still in progress (idempotency_in_progress)
412The draft changed since the given revision (draft_conflict)
422Validation failed
429Rate limited for this API key and class; wait Retry-After seconds
otherError (RFC 9457 problem details)