Skip to main content
POST
/
v1
/
workflows
/
runs
/
{run_id}
/
hil-decisions
Submit Hil Decision Route
curl --request POST \
  --url https://api.retab.com/v1/workflows/runs/{run_id}/hil-decisions \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "node_id": "<string>",
  "approved": true,
  "command_id": "<string>",
  "modified_data": {}
}
'
{
  "submission_status": "accepted",
  "decision": {
    "run_id": "<string>",
    "node_id": "<string>",
    "node_status": "<string>",
    "decision_received": false,
    "decision_applied": false,
    "approved": true,
    "modified_data": {},
    "payload_hash": "<string>",
    "received_at": "2023-11-07T05:31:56Z",
    "applied_at": "2023-11-07T05:31:56Z"
  }
}
Submit an approve/reject decision for a human-in-the-loop node on a workflow run. This endpoint is command-oriented:
  • it records the decision with Temporal as the source of truth
  • it returns decision receipt state, not a refreshed WorkflowRun
  • the run projection in Mongo may update shortly afterward
Use Get Run to refresh the projected run state after submission, or Get HIL Decision when you need command-side decision truth. Common outcomes:
  • submission_status="accepted": a new matching decision was accepted
  • submission_status="already_received": the same logical decision had already been received
If the node already has the opposite decision or is no longer eligible to accept a decision, the endpoint returns 409.

Authorizations

Api-Key
string
header
required

Path Parameters

run_id
string
required

Query Parameters

access_token
string | null

Body

application/json
node_id
string
required

ID of the HIL node being approved/rejected

approved
boolean
required

Whether the human approved the data

command_id
string | null

Optional idempotency key for deduplicating HIL decision commands

modified_data
Modified Data · object

Optional modified data supplied by the human reviewer

Response

Successful Response

submission_status
enum<string>
required

Decision submission lifecycle status: accepted for a newly accepted decision, already_received for a duplicate in-flight decision, or already_applied for a matching decision that has already been applied

Available options:
accepted,
already_received,
already_applied
decision
HILDecisionResource · object
required

Temporal-owned HIL decision state for the node