Execute a flow through the API
Create a scoped machine credential and call the version explicitly selected as live.
Create an API credential #
A workspace owner or administrator opens Workspace settings → API credentials → Create API credential.
| Setting | Purpose |
|---|---|
| Name | An identifiable integration name. |
| Environment | test or live. |
| Execute flows | flows:execute permission. |
| Read status | executions:read permission. |
| Restrict to selected flows | Optional flow allowlist. |
| Expiration | Optional expiry date. |
Copy the full key when shown; it cannot be recovered later. Store it in your server’s secret manager. Rotate replaces a credential; Revoke disables it.
Test and live #
| Capability | test | live |
|---|---|---|
| Synchronous execution | Yes | Yes |
| Asynchronous execution | No | Yes |
| Callback | No | With a signing key |
| Idempotency-Key | Recommended | Required |
Test HTTP defaults to mock. Top-level testHttpMode: real enables actual HTTP requests in a synchronous test and may affect external data.
Make your first request #
Obtain your API origin and flowId from your administrator. flowId identifies the flow, not its name or a version. Replace the placeholders; the inputs must match your Starter fields.
BASE_URL="https://YOUR_API_HOST"
FLOW_ID="YOUR_FLOW_ID"
API_KEY="YOUR_API_KEY"
curl -i "$BASE_URL/api/v1/flows/$FLOW_ID/execute" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: application-123-check-1" \
--data '{
"inputs": {"age": 18},
"metadata": {"applicationId": "application-123"}
}'| Field | Purpose |
|---|---|
| inputs | Data used by the flow. |
| metadata | Optional correlation fields, echoed in responses and callbacks but not exposed to decision blocks. |
| Idempotency-Key | Identifies one operation across retries. |
Read the result #
A successful synchronous request returns HTTP 200. Selected response fields:
{
"executionId": "EXECUTION_ID",
"status": "completed",
"outputs": {
"decision": "approved"
}
}completed means the flow ran successfully. Read outputs for the business decision, which may still be rejected or require review. Save executionId with your application record.
See async execution and callbacks and retries and error handling.