Hanzo
OpenapiAuto

Creates an automation and its initial DRAFT version in one call.

Creates an automation and its initial DRAFT version in one call.

POST /v1/auto/flows

Addresshttps://api.hanzo.ai/v1/auto/flows
MethodPOST
Operationpost_auto_flows
AuthAuthorization: Bearer $HANZO_API_KEY

Creates an automation and its initial DRAFT version in one call. The new flow is DISABLED — creating it does not arm its trigger; POST /v1/auto/flows/{id}/enable does that.

Request

30 fields, body application/json (required).

FieldInTypeRequiredDescription
displayNamebodystringDisplayName names the flow's initial draft version.
externalIdbodystringExternalID is the caller's own id for this flow.
folderIdbodystringFolderID groups the flow in the builder's tree.
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
201populatedFlowcreated

201 body — 45 fields.

FieldInTypeAlwaysDescription
createdbodyintegerCreated and Updated are unix milliseconds.
externalIdbodystringExternalID is the caller's own id for this flow, if it set one.
folderIdbodystringFolderID groups the flow in the builder's tree.
idbodystringID is the flow's id.
metadatabodyanyMetadata is the caller's opaque JSON, stored and returned verbatim.
projectIdbodystringOrg is the owning org, which this surface names projectId.
publishedVersionIdbodystringPublishedVersionID is the version a run executes when set; empty means the latest version runs.
statusbodystringStatus is ENABLED or DISABLED — whether the flow's trigger is armed.
updatedbodyinteger
versionbodyFlowVersion
version.createdbodyinteger
version.displayNamebodystring
version.flowIdbodystring
version.idbodystring
version.schemaVersionbodystring
version.statebodystring
version.triggerbodyFlowTrigger
version.trigger.displayNamebodystring
version.trigger.namebodystring
version.trigger.nextActionbodyFlowAction
version.trigger.nextAction.displayNamebodystring
version.trigger.nextAction.namebodystring
version.trigger.nextAction.nextActionbodyFlowAction
version.trigger.nextAction.settingsbodyStepSettings
version.trigger.nextAction.settings.actionNamebodystring
version.trigger.nextAction.settings.inputbodyobject
version.trigger.nextAction.settings.input.*bodyobject
version.trigger.nextAction.settings.pieceNamebodystring
version.trigger.nextAction.settings.pieceVersionbodystring
version.trigger.nextAction.settings.triggerNamebodystring
version.trigger.nextAction.skipbodyboolean
version.trigger.nextAction.typebodystringPIECE | CODE | ROUTER | LOOP_ON_ITEMS
version.trigger.nextAction.validbodyboolean
version.trigger.settingsbodyStepSettings
version.trigger.settings.actionNamebodystring
version.trigger.settings.inputbodyobject
version.trigger.settings.input.*bodyobject
version.trigger.settings.pieceNamebodystring
version.trigger.settings.pieceVersionbodystring
version.trigger.settings.triggerNamebodystring
version.trigger.strategybodystring
version.trigger.typebodystringPIECE_TRIGGER | EMPTY
version.trigger.validbodyboolean
version.updatedbodyinteger
version.validbodyboolean

Failure carries the platform error shape — see Errors.

Examples

hanzo auto flows create

Auto API · All Hanzo APIs · Interactive reference

How is this guide?

On this page