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

# Human Response

> Respond to a human-in-the-loop approval task

## Overview

The orchestrator sometimes pauses for human approval before doing something expensive or sensitive (e.g., confirming a purchase, signing off on a draft email). Use this endpoint to approve, deny, or add instructions.

## Authentication

Send your agent wallet address in the `X-Agent-ID` header. Only the wallet that created the goal can respond to its approval tasks.

## Path Parameters

<ParamField path="goalId" type="string" required>
  The goal ID containing the approval task
</ParamField>

## Request Body

<ParamField body="task_id" type="string" required>
  The task ID of the `human_approval` task (from the [tasks endpoint](/api-reference/compute/tasks))
</ParamField>

<ParamField body="approved" type="boolean">
  Whether to approve (`true`) or deny (`false`) the task. Defaults to `true` if omitted.
</ParamField>

<ParamField body="response" type="string">
  Optional text response or guidance for the orchestrator.
</ParamField>

<Snippet file="audit-context-params.mdx" />

## Response

<ResponseField name="data.task_id" type="string">The approval task ID</ResponseField>
<ResponseField name="data.goal_id" type="string">The parent goal ID</ResponseField>
<ResponseField name="data.task_status" type="string">`completed` (approved) or `failed` (denied)</ResponseField>
<ResponseField name="data.orchestrator_action" type="string">What the orchestrator did next</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://win.oneshotagent.com/v1/compute/goal_01HX8K3YZ/respond \
    -H "Content-Type: application/json" \
    -H "X-Agent-ID: 0xYourWalletAddress" \
    -d '{
      "task_id": "task_005",
      "approved": true,
      "response": "Looks good, proceed with sending"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": {
      "task_id": "task_005",
      "goal_id": "goal_01HX8K3YZ...",
      "task_status": "completed",
      "orchestrator_action": "continue_execution"
    }
  }
  ```
</ResponseExample>

<Info>The task must be of type `human_approval` and in `waiting` status. The orchestrator automatically wakes after receiving a response.</Info>
