Skip to navigation

Flows · Runs · Approve or reject a task the run is waiting on

View as Markdown

Resolves a human-approval gate so a blocked run can continue.

Takes the waiting task’s reference_task_name and a status: COMPLETED approves and the run proceeds, FAILED rejects and the run fails. An optional data object is passed into the workflow, which is how a rejection reason reaches later steps.

The run must genuinely be waiting on that task, and the reference name must match, or the call is a 400.

resource: workflow://run-control covers how to find the waiting task.

Authentication

AuthorizationApi-Key

Header authentication of the form Api-Key <token>

OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

run_idstringRequired

UUID of a single workflow execution, from flows_startWorkflow (returned as workflow_id) or flows_listWorkflowRuns (returned as id). NOT the small integer workflow-definition ID.

Request

This endpoint expects an object.
task_reference_namestringRequired<=200 characters

Reference name of the waiting task, as shown in the tasks array of flows_getWorkflowRun (expand tasks on flows_getWorkflowRunStatus for a slimmer view).

statusenumRequired

COMPLETED releases the gate and lets the run continue. FAILED fails the task, which usually fails the whole run.

Allowed values:
datamap from strings to anyOptional
Optional output to attach to the task, available to downstream tasks as that task's result.

Response

Task status updated; the run continues or fails accordingly.

Errors

400
Bad Request Error
404
Not Found Error