Run a workflow
POST /projects/:projectid/workflows/:workflowid/runsync
Run a workflow and wait for its outputs.
Runs the workflow and holds the connection open until it finishes, returning its outputs directly. Use the queued endpoint instead for work that takes more than a few seconds.
Authentication
- Project API key: The credential for everything external. Created in Project Settings, bound to one project, and limited to the scopes it was granted. Format:
proj.<keyId>.<secret>. - Required permission:
workflows.runon :workflowid.
Path parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
projectid | string | Yes | - | The project id. |
workflowid | string | Yes | - | The workflow to run. |
Request body
Content type: application/json
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
inputs | object | No | null | Values passed to the workflow. The shape is whatever your workflow reads. |
runEvent | string | No | "run" | Which entry point to trigger. |
version | string | No | null | A published version to pin to. Omit for the latest. |
Example
{
"runEvent": "run",
"inputs": {
"name": "Ada"
}
}
Example request
curl -X POST \
-H "Authorization: proj.KEY_ID.SECRET" \
-H "Content-Type: application/json" \
-d '{"runEvent":"run","inputs":{"name":"Ada"}}' \
{{BASE_URL}}/projects/{{PROJECT_ID}}/workflows/YOUR_WORKFLOW_ID/runsync
Responses
200
The run finished. Check success — a failed workflow also returns 200.
{
"success": true,
"statusCode": 200,
"result": {
"outputs": {
"greeting": "Hello Ada"
}
}
}
200 — failure
The workflow itself failed.
{
"success": false,
"statusCode": 400,
"err": {
"message": "Node AIWrite failed: model unavailable"
}
}
403
The key lacks run permission on this workflow.