Skip to main content

Queue a workflow run

POST /projects/:projectid/workflows/:workflowid/run

Start a workflow and get back an invocation id.

Queues the workflow and returns immediately with an invocationId. Poll the run status endpoint to follow it to completion. Use this for anything long-running.

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.run on :workflowid.

Path parameters​

NameTypeRequiredDefaultDescription
projectidstringYes-The project id.
workflowidstringYes-The workflow to run.

Request body​

Content type: application/json

NameTypeRequiredDefaultDescription
inputsobjectNonullValues passed to the workflow.
runEventstringNo"run"Which entry point to trigger.
versionstringNonullA published version to pin to.

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/run

Responses​

200​

The run was queued.

{
"success": true,
"invocationId": "a3f9c1e28b74",
"runtimeDataRootPath": "workflowAPIRuntimeData/wf_8fK2p/-Nx8..."
}

403​

The key lacks run permission on this workflow.