Skip to main content

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)

FieldTypeRequiredDefaultNotes
inputsobjectnonullKey/value inputs your workflow expects.
runEventstringno"run"Event name to trigger (use "run" unless your workflow defines another).
versionstringnolatestWorkflow 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.

Custom Event Workflow

  • Returns: { success, result: { outputs: {...} }, statusCode }