How it works
Replace the example groupId with an existing workspace approval group. Up to 30 fields (text, number, boolean, ISO date, select) and 40 nodes (start, condition, approval, end).
Conditions reference field keys with all/any and eq, neq, gt, gte, lt, lte or contains. Internal approval nodes reference groupId. External nodes use groupId:null and externalApprover:{source:"email",email:"reviewer@example.com"} or {source:"field",field:"recipientEmail",allowedDomains:["example.com"]}. The referenced field must be required text/email. sharedFields lists the request fields disclosed externally (default []). Connect all outputs before publishing. Loops and unreachable nodes are rejected.
Approval outputs: next selects the approved route; rejectedNext selects the rejected route. Connect both for new flows. Each may lead to a condition, another approval, or an end. Omitting rejectedNext preserves historical immediate rejection; null is an unconnected draft output and blocks publishing. Only gates on the actual decision path become pending.
Definition-only alternative: POST /v1/flows {name, definition}; POST /v1/flows/{flowId}/versions {definition}; POST /v1/flow-versions/{versionId}/publish {}. Both schema versions are supported.
Request body
namestringrequiredmin length 1 · max length 120accessScopestringoptionalmin length 1 · max length 60definitionobjectrequiredpresentationobjectrequiredRequest essentials
- Authorization
- Bearer $FLOWG8_API_KEY
- X-Organization-Id
- Your workspace UUID
- Idempotency-Key
- Stable per operation; 8–128 characters

