Skip to main content
POST
/
v2
/
workflow
/
steps
/
recordReviewerDecision
Record Reviewer Decision
curl --request POST \
  --url https://api.velt.dev/v2/workflow/steps/recordReviewerDecision \
  --header 'Content-Type: application/json' \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>' \
  --data '
{
  "data": {
    "executionId": "<string>",
    "stepId": "<string>",
    "reviewerId": "<string>",
    "decision": "<string>",
    "reason": "<string>"
  }
}
'
{
  "result": {
    "recorded": true,
    "aggregatorStatus": "resolved",
    "resumeScheduled": true
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.velt.dev/llms.txt

Use this file to discover all available pages before exploring further.

Use this API to record a single reviewer’s decision against a human step. When all mandatory reviewers approve (or any reviewer rejects), the step’s aggregator transitions terminal and the step resumes.

Endpoint

POST https://api.velt.dev/v2/workflow/steps/recordReviewerDecision

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

data
object
required

Example Requests

Approve as a reviewer

{
  "data": {
    "executionId": "exec_1777374504255_xzy43k9q",
    "stepId": "step_agent-draft_..._lwofay__to__human-legal",
    "reviewerId": "u_legal_01",
    "decision": "approve",
    "reason": "looks good"
  }
}

Reject as a reviewer

{
  "data": {
    "executionId": "exec_1777374504255_xzy43k9q",
    "stepId": "step_agent-draft_..._lwofay__to__human-legal",
    "reviewerId": "u_legal_01",
    "decision": "reject",
    "reason": "compliance issue on line 3"
  }
}

Response

Success Response

{
  "result": {
    "recorded": true,
    "aggregatorStatus": "resolved",
    "resumeScheduled": true
  }
}
recorded: false only on idempotent replay. aggregatorStatus: pending / resolved / rejected. resumeScheduled: true when this decision triggered the resume task.

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "FAILED_PRECONDITION"
  }
}
Errors: INVALID_ARGUMENT (reviewerId not in declared reviewers) / FAILED_PRECONDITION (step not waiting) / NOT_FOUND.
{
  "result": {
    "recorded": true,
    "aggregatorStatus": "resolved",
    "resumeScheduled": true
  }
}