Hanzo
OpenapiAuto

Adds a new DRAFT version to a flow.

Adds a new DRAFT version to a flow. The version is created invalid unless it carries a trigger, and it does not become the running version until it is…

POST /v1/auto/flows/{id}/versions

Addresshttps://api.hanzo.ai/v1/auto/flows/{id}/versions
MethodPOST
Operationpost_auto_flows_by_id_versions
AuthAuthorization: Bearer $HANZO_API_KEY

Adds a new DRAFT version to a flow. The version is created invalid unless it carries a trigger, and it does not become the running version until it is published (PATCH the flow's publishedVersionId) or becomes the latest.

Request

30 fields, body application/json (required).

FieldInTypeRequiredDescription
idpathstringyesID is the flow to add a version to, from the path.
displayNamebodystringDisplayName names the new version.
idbodystringID is the flow to add a version to, from the path.
triggerbodyFlowTrigger
trigger.displayNamebodystring
trigger.namebodystring
trigger.nextActionbodyFlowAction
trigger.nextAction.displayNamebodystring
trigger.nextAction.namebodystring
trigger.nextAction.nextActionbodyFlowAction
trigger.nextAction.settingsbodyStepSettings
trigger.nextAction.settings.actionNamebodystring
trigger.nextAction.settings.inputbodyobject
trigger.nextAction.settings.input.*bodyobject
trigger.nextAction.settings.pieceNamebodystring
trigger.nextAction.settings.pieceVersionbodystring
trigger.nextAction.settings.triggerNamebodystring
trigger.nextAction.skipbodyboolean
trigger.nextAction.typebodystringPIECE | CODE | ROUTER | LOOP_ON_ITEMS
trigger.nextAction.validbodyboolean
trigger.settingsbodyStepSettings
trigger.settings.actionNamebodystring
trigger.settings.inputbodyobject
trigger.settings.input.*bodyobject
trigger.settings.pieceNamebodystring
trigger.settings.pieceVersionbodystring
trigger.settings.triggerNamebodystring
trigger.strategybodystring
trigger.typebodystringPIECE_TRIGGER | EMPTY
trigger.validbodyboolean

Response

StatusBodyMeaning
201FlowVersioncreated

201 body — 35 fields.

FieldInTypeAlwaysDescription
createdbodyinteger
displayNamebodystring
flowIdbodystring
idbodystring
schemaVersionbodystring
statebodystring
triggerbodyFlowTrigger
trigger.displayNamebodystring
trigger.namebodystring
trigger.nextActionbodyFlowAction
trigger.nextAction.displayNamebodystring
trigger.nextAction.namebodystring
trigger.nextAction.nextActionbodyFlowAction
trigger.nextAction.settingsbodyStepSettings
trigger.nextAction.settings.actionNamebodystring
trigger.nextAction.settings.inputbodyobject
trigger.nextAction.settings.input.*bodyobject
trigger.nextAction.settings.pieceNamebodystring
trigger.nextAction.settings.pieceVersionbodystring
trigger.nextAction.settings.triggerNamebodystring
trigger.nextAction.skipbodyboolean
trigger.nextAction.typebodystringPIECE | CODE | ROUTER | LOOP_ON_ITEMS
trigger.nextAction.validbodyboolean
trigger.settingsbodyStepSettings
trigger.settings.actionNamebodystring
trigger.settings.inputbodyobject
trigger.settings.input.*bodyobject
trigger.settings.pieceNamebodystring
trigger.settings.pieceVersionbodystring
trigger.settings.triggerNamebodystring
trigger.strategybodystring
trigger.typebodystringPIECE_TRIGGER | EMPTY
trigger.validbodyboolean
updatedbodyinteger
validbodyboolean

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Auto API · All Hanzo APIs · Interactive reference

How is this guide?

On this page