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.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. |
runEvent | string | No | "run" | Which entry point to trigger. |
version | string | No | null | A 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.