Skip to main content
POST
Create a flow
A flow represents a moment in your product - signup, checkout, password reset, a payout request - and references the recipes that run there.
The identifier you get back is what you pass as flow_id to Evaluate a flow. That call answers with the most severe verdict and action across the recipes that ran, plus each recipe’s own result. Every recipe referenced here must exist; one that doesn’t is refused against the recipes field. Only LIVE and SHADOW recipes take part in an evaluation, so a flow can safely reference a DRAFT recipe you are still assembling.

One flow per moment, not per rule

Keep flows coarse and recipes specific. A flow is a stable identifier compiled into your product, so changing what a moment checks should mean swapping recipes inside the flow, not asking your application to call a different flow_id.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

The moment this flow guards.

Maximum string length: 128
Example:

"signup"

recipes
string[]
required

The recipes that run when this flow is evaluated. At least one is required, and each must exist.

Minimum array length: 1
Example:

Response

Created

id
string
required

The flow identifier. Pass it as flow_id when you evaluate.

Example:

"flo_01jc0t6fwwfgfsq1md24mhyztj"

name
string
required
Example:

"signup"

recipes
string[]
required
Example: