Decide approval workflow instances
POST /api/v1/workflows/instances/{instanceId}/blocks/{blockId}/decide: request fields and declared response contract.
POST/api/v1/workflows/instances/{instanceId}/blocks/{blockId}/decide
| Permission | workflow.approve |
|---|---|
| Workspace scope | required |
| Scope target | workspace |
Parameters
| Field | Type | Required | Nullable | Default |
|---|---|---|---|---|
| instanceId | string | required | non-null | — |
| blockId | string | required | non-null | — |
Query parameters: none.
Request body
| Field | Type | Required | Nullable | Default |
|---|---|---|---|---|
| reviewRevision | string | optional | non-null | — |
| decision | unknown | required | non-null | — |
| approvedOutputs | object | optional | non-null | — |
| duplicateRecipientAction | "exclude" | "proceed" | optional | non-null | — |
| excludeMemberIds | array | optional | non-null | — |
| doubleContactAction | "exclude" | "proceed" | optional | non-null | — |
| excludeAccountIds | array | optional | non-null | — |
Response
200
| Field | Type | Required | Nullable | Default |
|---|---|---|---|---|
| data | object | required | non-null | — |
| data.status | "pending" | "dispatched" | "review_phase" | "waiting_approval" | "waiting_delay" | "waiting_effect" | "completed" | "failed" | "skipped" | "cancelled" | required | non-null | — |
| data.attemptId | string | optional | non-null | — |
| data.leaseOwner | string | optional | non-null | — |
| data.leaseExpiresAt | string | optional | non-null | — |
| data.heartbeatAt | string | optional | non-null | — |
| data.cancelRequestedAt | string | optional | non-null | — |
| data.cancelReason | string | optional | non-null | — |
| data.outputs | object | optional | non-null | — |
| data.partialOutputs | object | optional | non-null | — |
| data.outputsS3Key | string | optional | non-null | — |
| data.error | object | optional | non-null | — |
| data.error.message | string | required | non-null | — |
| data.error.code | string | required | non-null | — |
| data.error.retryCount | integer | required | non-null | — |
| data.retryCount | integer | optional | non-null | — |
| data.iterationCount | integer | optional | non-null | — |
| data.lastIterationAt | string | optional | non-null | — |
| data.configOverride | object | optional | non-null | — |
| data.skipReason | string | optional | non-null | — |
| data.approvalComment | string | optional | non-null | — |
| data.approvalCompleted | boolean | optional | non-null | — |
| data.approvalDeadline | string | optional | non-null | — |
| data.timeoutAction | string | optional | non-null | — |
| data.takenBranch | string | optional | non-null | — |
| data.reviewState | object | optional | non-null | — |
| data.reviewState.totalDrafts | integer | required | non-null | — |
| data.reviewState.flaggedCount | integer | required | non-null | — |
| data.reviewState.autoApprovedCount | integer | required | non-null | — |
| data.reviewState.reviewedCount | integer | required | non-null | — |
| data.reviewState.approvedCount | integer | required | non-null | — |
| data.reviewState.editedCount | integer | required | non-null | — |
| data.reviewState.skippedCount | integer | required | non-null | — |
| data.reviewState.batchApproved | boolean | optional | non-null | — |
| data.reviewState.batchId | string | required | non-null | — |
| data.reviewState.reviewStartedAt | string | optional | non-null | — |
| data.assigneeUserId | string | optional | non-null | — |
| data.assigneeName | string | optional | non-null | — |
| data.reviewerSnapshot | object | optional | non-null | — |
| data.reviewerSnapshot.assigneeUserId | string | optional | non-null | — |
| data.reviewerSnapshot.assigneeGroupId | string | optional | non-null | — |
| data.reviewerSnapshot.assignmentSource | string | required | non-null | — |
| data.reviewerSnapshot.unassigned | boolean | optional | non-null | — |
| data.reviewerSnapshot.evidence | object | optional | non-null | — |
| data.reviewerSnapshot.evidence.candidateCount | integer | optional | non-null | — |
| data.reviewerSnapshot.evidence.strategy | string | optional | non-null | — |
| data.reviewerSnapshot.decisionMode | string | optional | non-null | — |
| data.reviewerSnapshot.reviewRevision | string | required | non-null | — |
| data.reviewerSnapshot.projectionNeeded | boolean | required | non-null | — |
| data.reviewRequest | object | optional | non-null | — |
| data.reviewRequest.approvalPrompt | string | optional | non-null | — |
| data.reviewRequest.notify | boolean | required | non-null | — |
| data.reviewRequest.projectionNeeded | boolean | required | non-null | — |
| data.partitions | object | optional | non-null | — |
| data.effectLink | object | optional | non-null | — |
| data.effectLink.companyId | string | required | non-null | — |
| data.effectLink.workspaceId | string | required | non-null | — |
| data.effectLink.capabilityId | string | required | non-null | — |
| data.effectLink.operationId | string | required | non-null | — |
| data.effectLink.attemptId | string | optional | non-null | — |
| data.effectLink.blockAttemptId | string | required | non-null | — |
| data.effectLink.appliedRevision | integer | required | non-null | — |
| data.effectLink.operatorEvidenceRequired | boolean | optional | non-null | — |
| data.suspendedUntil | string | optional | non-null | — |
| data.continuationToken | string | optional | non-null | — |
| data.startedAt | string | optional | non-null | — |
| data.completedAt | string | optional | non-null | — |
Declared failures
| ACCESS_DENIED | 403 — not retryable |
|---|---|
| CORE_ERROR | 500 — not retryable |
| GOVERNANCE_DENIED | 403 — not retryable |
| VALIDATION_ERROR | 400 — not retryable |
Readback
Read the result back with:
- workflows.getBlockState
Request example
Schematic only. Replace placeholders with real values and include all required nested fields.
POST /api/v1/workflows/instances/{instanceId}/blocks/{blockId}/decide HTTP/1.1
Authorization: Bearer <token>
x-merulan-workspace-id: <workspace-id>
Content-Type: application/json
{
"decision": "<decision>"
}