Run a workflow
POST /projects/:projectid/workflows/:workflowid/runsync
Runs a workflow and waits for its result. For work that may exceed your caller's HTTP timeout, use Queue a workflow run.
Authentication and permissions
Send the complete project key in Authorization, without Bearer. It needs workflows.run on the target workflow. Read permission is not required for this call.
Request
Replace :projectid and :workflowid with the IDs of the project and workflow. Send Content-Type: application/json and a JSON body, using {} if no inputs are needed.
| Field | Type | Required | Behaviour |
|---|---|---|---|
inputs | Object | No | Named values for the workflow's Input nodes. Omitted input data defaults to null; supply any values your workflow requires. |
runEvent | String | No | Entry event. Defaults to "run" for Start; a custom name must match an Event entry point. |
Using the environment variables from the Quickstart, set the workflow ID and call it:
export INTELLECTIBLE_WORKFLOW_ID="YOUR_WORKFLOW_ID"
curl --include --request POST \
--header "Authorization: ${INTELLECTIBLE_PROJECT_API_KEY}" \
--header "Content-Type: application/json" \
--data '{"inputs":{"name":"Ada"}}' \
"${INTELLECTIBLE_PUBLIC_API_URL}/projects/${INTELLECTIBLE_PROJECT_ID}/workflows/${INTELLECTIBLE_WORKFLOW_ID}/runsync"
This example assumes a workflow that accepts name. It starts a real execution and can perform any actions configured in that workflow.
Successful result
For a workflow returning a named greeting output, a successful response might be:
{
"success": true,
"statusCode": 200,
"result": {
"outputs": {
"greeting": "Hello Ada"
}
}
}
Read named outputs from result.outputs. Their names, values, and types depend on your workflow's Set Output nodes. Additional result fields may be present.
Failed result
Check both the HTTP status and the JSON success field. A workflow failure can arrive with HTTP 200, for example:
{
"success": false,
"statusCode": 400,
"err": {
"message": "Workflow execution failed."
}
}
The body may instead include error, message, or quota details. Its statusCode is the operation status, not necessarily the HTTP status.
Authentication failures return 401, missing run permission returns 403, and request-rate limits can return 429. Execution-limit failures can also be reported in the JSON result. See Errors, limits and retries.
Timeouts and troubleshooting
Set a request timeout appropriate to your application, but do not interpret a timeout as cancellation. The workflow may already have performed actions. This endpoint does not return the queued-run acceptance response; if you need an invocation ID to poll independently, use the queued endpoint from the start.
Inspect Logs → API on the workflow for execution details. Ensure the Set Output nodes are on the executed event path if expected outputs are missing.