422 flow_invalid and rolls back — the live flow only ever moves between valid states.
Read the flow
Author and edit phases
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}/positionwith{ "direction": "up" }or"down"— a neighbour swap among the live phases. The closing phase stays pinned last. - Archive / restore:
POST/DELETEon/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.
