Run a workflow (sync)
Overview
Run a workflow synchronously and receive the result in the response body.
- Endpoint:
POST /api/publicv1/projects/:projectId/workflows/:workflowId/runsync
- Auth Header:
Authorization: API_KEY
- Returns: A JSON object with the workflow’s run result (shape depends on the workflow).
Request body (JSON)
Field | Type | Required | Default | Notes |
---|---|---|---|---|
inputs | object | no | null | Key/value inputs your workflow expects. |
runEvent | string | no | "run" | Event name to trigger (use "run" unless your workflow defines another). |
version | string | no | latest | Workflow version to run. Omit to use the latest version. |
Example (curl)
curl -X POST "https://app.intellectible.com/api/publicv1/projects/PROJECT_ID/workflows/WORKFLOW_ID/runsync" \
-H "Authorization: API_KEY" \
-H "Content-Type: application/json" \
-d '{
"inputs": {
"query": "Give me a weird fact about the Roman Empire that many people do not know."
},
"runEvent": "queryAI"
}'
In order to pass inputs and return outputs from the AI request use the Input
and Set Output
nodes. Use custom event names using the Event
node.
- Returns:
{ success, result: { outputs: {...} }, statusCode }