Skip to main content
POST
Record Reviewer Decision
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

string
required
Your API key.
string
required

Body

Params

object
required

Example Requests

Approve as a reviewer

Reject as a reviewer

Response

Success Response

recorded: true means the aggregator stored the decision. aggregatorStatus: pending / resolved / rejected. resumeScheduled: true when this decision triggered the resume task.

Not Recorded Response

recorded: false means the decision was not applied. rejectionReason says why:
  • idempotent: this reviewerId already recorded a decision.
  • already-terminal: the aggregator resolved or rejected before this call landed.
  • unknown-responder: reviewerId is not listed on the node’s reviewers[].
  • aggregator-missing: no aggregator document exists for the step.
Only idempotent is safe to ignore. aggregatorStatus is null when rejectionReason is aggregator-missing; otherwise it is the aggregator’s unchanged status.

Failure Response

Errors: A reviewerId not listed on the node’s reviewers[] does not throw. The aggregator discards the decision and returns recorded: false, resumeScheduled: false, and rejectionReason: "unknown-responder". No response is stored and no counter moves, so aggregatorStatus stays pending and quorum cannot shift.