> ## Documentation Index
> Fetch the complete documentation index at: https://velt.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Record Agent Resolution

Use this API to record an external resolution for a **blocking** agent step. The agent step parks in `waiting` after dispatch; resolutions arriving through this endpoint advance the aggregator according to its `resolutionPolicy` (`allResolved` or `minResolved`).

<Warning>
  Blocking agent nodes are not available in beta. `blocking: true` requires a sibling `resolutionPolicy` to pass schema validation, and the pair is then rejected at run time with `agent-blocking-not-supported`, so no step ever parks for this endpoint. To put a person in front of an agent's findings today, place a `human` node downstream of the agent and use [Record Reviewer Decision](/docs/api-reference/rest-apis/v2/approval-engine/steps/record-reviewer-decision).
</Warning>

# Endpoint

`POST https://api.velt.dev/v2/workflow/steps/recordAgentResolution`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/docs/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="executionId" type="string" required>
      The execution containing the step. ≤ 200 chars.
    </ParamField>

    <ParamField body="stepId" type="string" required>
      Must reference a blocking agent step in `waiting`. ≤ 200 chars.
    </ParamField>

    <ParamField body="responseId" type="string" required>
      Must match one of the response IDs the agent handler generated; read them from the step's output. ≤ 200 chars. Idempotent per `(stepId, responseId)`: a replay returns `recorded: false` with no side effect.
    </ParamField>

    <ParamField body="resolution" type="string" required>
      `resolved` / `rejected`.
    </ParamField>

    <ParamField body="actorId" type="string" required>
      The actor recording the resolution. ≤ 256 chars.
    </ParamField>

    <ParamField body="reason" type="string">
      ≤ 2000 chars.
    </ParamField>
  </Expandable>
</ParamField>

## **Example Requests**

#### Record a resolution

```JSON theme={null}
{
  "data": {
    "executionId": "exec_1777374504255_xzy43k9q",
    "stepId": "step_blocking-agent_...",
    "responseId": "resp_42",
    "resolution": "resolved",
    "actorId": "user-1"
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "recorded": true,
    "aggregatorStatus": "resolved",
    "resumeScheduled": true
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "FAILED_PRECONDITION"
  }
}
```

**Errors:** `FAILED_PRECONDITION` (the step is not an `agent` node, or its status is not `waiting`) / `INVALID_ARGUMENT` / `NOT_FOUND`.

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "recorded": true,
      "aggregatorStatus": "resolved",
      "resumeScheduled": true
    }
  }
  ```
</ResponseExample>
