Flows API
PreviewFind the flows your key can start, and read what each one needs and returns, before you send a run.
Flows are built in the RowCall app, from the ecommerce library or from scratch, or by your own systems through the API. The Flows API lets your systems see which flows are published and what each one needs, so a run always brings the right inputs. Use a key with the flows scope. To make, change and publish flows by API, see Build an integration.
Find the flow
GET /v1/flows lists every published flow, each as the version runs use now. GET /v1/flows/{flowId} reads one.
curl https://app.rowcall.ai/v1/flows/flw_k3j9x2m4q8w1z7p5n6b0 \
-H "Authorization: Bearer $ROWCALL_API_KEY"A flow installed from RowCall's library also carries its libraryKey, such as order_verification. You can start runs with that key as flowKey instead of storing the flow's id.
Read what it needs
A flow tells you everything a run has to bring and everything it can send back:
inputsandinputSchema. The facts the run brings, such as the order number and address.inputSchemais a JSON Schema for a run'sinputs: check your values against it before you send them. Every value is text: a number as"2499", a yes/no as"yes".answers. The questions the flow asks, by key, with their type (yes_no,text,choice,dateornumber). These keys are the keys ofrun.answerswhen the call ends, and oftestAnswersin test mode.outcomes. Every way a run of this flow can end, such asconfirmedoraddress_changed. Branch onrun.outcomein your system.actions. The actions this flow may use. Each must answer at your action URL, or be connected another way. See Actions.callTypeandversion.transactionalorservicedecides which consent a run needs.versionis the published version runs use; publishing again makes a new one, and runs already going keep theirs.
Every field and its type is in the reference.
When a flow changes
A flow your team republishes may add a required input. Read the flow when your integration starts up, or when a run is refused with INVALID_INPUT naming an input you don't send, rather than hard-coding the list. A flow that isn't published is NOT_FOUND here and NOT_PUBLISHED when you start a run with it.
Read a run's status, answers and recording.