Skip to main content
A flow is an ordered set of phases. Each phase has an objective, exit criteria, the tools it may use, and the slots it captures — the data the phase collects, and, for enum-typed slots, the quick-reply chips a visitor sees. The structural vocabulary (phase kind, transitions, guards) is read-only; you author the prose and the slots. Every write below trial-compiles. An illegal change answers 422 flow_invalid and rolls back — the live flow only ever moves between valid states.

Read the flow

Returns the active flow: its phases in order, each with its slots.

Author and edit phases

The phase key is minted from the title once and is identity afterwards — renaming the title never changes it. Then:
  • Edit the prose and tools: PATCH /flow/states/{id}.
  • Reorder: PATCH /flow/states/{id}/position with { "direction": "up" } or "down" — a neighbour swap among the live phases. The closing phase stays pinned last.
  • Archive / restore: POST / DELETE on /flow/states/{id}/archive.

Slots — the answers a phase captures

data_type is one of string, enum, band, boolean, email; enum and band require enum_values (the chip values). Edit with PATCH /flow/slots/{id}, archive/restore under /flow/slots/{id}/archive. A phase’s schema is capped at 16 slots — overflow is the most common 422 flow_invalid.

Tools

A phase’s tools decide what it may do: consult_knowledge (ground replies in activated knowledge), capture_slots (record the configured answers), suggest_replies (one-tap chips), offer_deliverable (promise and trigger the wrap-up document). Set the full list with PATCH /flow/states/{id} — removing capture_slots from a phase that still has required answers is refused.