Auto
Package auto is Hanzo Auto: build a flow from triggers and actions, publish it, and watch every run.
Package auto is Hanzo Auto: build a flow from triggers and actions, publish it, and watch every run.
| Base URL | https://api.hanzo.ai |
| Operations | 11 |
| Auth | Authorization: Bearer $HANZO_API_KEY |
auto
POST /v1/auto/flows/{flow}/publish
Publish snapshots the flow's current graph as its next immutable version and arms the flow's triggers. Past versions stay addressable in the product for rollback; runs always execute the graph as it was dispatched.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
flow | path | string | yes | Flow is the flow's id, taken from the path. |
GET /v1/auto/flows/{flow}
Flow reads one of the caller's flows — the full record, graph included. A flow outside the caller's org answers 404, indistinguishable from one that does not exist.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
flow | path | string | yes | Flow is the flow's id, taken from the path. |
PATCH /v1/auto/flows/{flow}
Patches one of the caller's flows: the name, the graph, or both — only the stated fields move.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
flow | path | string | yes | Flow is the flow's id, taken from the path. |
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
data | — | Data replaces the flow graph when present, verbatim. | |
flow | string | — | Flow is the flow's id, taken from the path. |
name | string | — | Name renames the flow when present. |
DELETE /v1/auto/flows/{flow}
Deletes one of the caller's flows. A foreign id answers 404 and deletes nothing.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
flow | path | string | yes | Flow is the flow's id, taken from the path. |
GET /v1/auto/flows
Flows lists the caller's flows, newest first. The list is scoped by the product to the caller's org — it can only ever hold the caller's own flows.
POST /v1/auto/flows
Creates a flow in the caller's org. The org is stamped server-side from the validated principal — there is no field by which a caller could place a flow in another org.
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
data | — | Data is the flow graph — the product's nodes/edges document, verbatim: nodes carry a piece type (webhook, schedule,… | |
name | string | — | Name is the flow's display name. |
GET /v1/auto/pieces
Pieces lists the product's built-in piece catalog: the trigger and action types a flow's nodes can use (webhook, schedule, http, set, branch), each with its input descriptors. The catalog is compiled into the product — adding a piece is a product release, not a platform call.
GET /v1/auto/runs/{run}
Run reads one run record: status, input, output (each executed node's result keyed by node id once completed), error detail if it failed, and timestamps. A run outside the caller's org answers 404.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
run | path | string | yes | Run is the run's id, taken from the path. |
GET /v1/auto/runs
Runs lists the caller's run records, newest first — optionally one flow's. Each record carries the run's status (queued, running, completed, failed), its input, and its output once the run finished.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
flow | query | string | — | Flow narrows the list to one flow's runs when present. |
POST /v1/auto/runs
Start begins one asynchronous run of a flow: the product dispatches the graph to its durable execution engine (the hanzo tasks plane) and answers immediately with the run record in status running. Poll the run until it reaches completed — its output then holds each node's result keyed by node id — or failed, with the error. A flow whose engine is unreachable answers the product's 503: dispatch is real or it is refused, never queued into the void.
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
flow | string | — | Flow is the id of the flow to run. |
input | — | Input is the trigger payload handed to the run, verbatim JSON object. |
GET /v1/auto/status
Status reports whether the auto service is reachable — its own health endpoint as an honest lens for "is the automation plane up".
How is this guide?