---
title: "Prepare, approve, and execute"
description: "Require explicit user approval before an Agent operation can cause an effect."
---

> Documentation Index
> Fetch the complete documentation index at: https://help.tooluse.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Prepare, approve, and execute

<h2 id="prerequisites">Prerequisites</h2>
<p>The discovered operation must have <code>requiresEndUser: true</code>. The Agent key and the end user must belong to the same application boundary.</p>
<p>Prepare an immutable Action</p><pre><code class="language-bash">curl -X POST \
  https://api.tooluse.net/v1/agent/applications/app_&lt;32-lowercase-hex&gt;/operations/&lt;operation-id&gt;/prepare \
  -H "Authorization: Bearer $TOOLUSE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: &lt;stable-request-key&gt;" \
  -d '{"endUserId":"&lt;end-user-id&gt;","providerId":"&lt;provider-id&gt;","input":{"&lt;field&gt;":"&lt;value&gt;"}}'</code></pre><p>Use either <code>text</code> or <code>input</code> when the operation requires one, not both.</p><p>Send the person to the approval URL</p><p>The preparation response includes an immutable Action and <code>approvalUrl</code>. The person signs in, reviews the exact proposal, and approves or rejects it.</p><p>Read Action status</p><p><code>GET /v1/agent/applications/{appId}/actions/{jobId}</code> reconciles the Action with its native execution receipt.</p><p>Execute once</p><pre><code class="language-bash">curl -X POST \
  https://api.tooluse.net/v1/agent/applications/app_&lt;32-lowercase-hex&gt;/actions/actjob_&lt;32-lowercase-hex&gt;/execute \
  -H "Authorization: Bearer $TOOLUSE_API_KEY"</code></pre>
<h2 id="verify">Verify</h2>
<p>Execution succeeds only after approval and only for the prepared input. Rejection, expiry, cancellation, and execution are distinct states with distinct receipts.</p>
<h2 id="next-steps">Next steps</h2>
<ul>
<li><a href="/approval/consumer-controls">Consumer controls</a></li>
<li><a href="/operate/receipts">Receipts and result retention</a></li>
</ul>

Source: https://help.tooluse.net/approval/human-approval/index.mdx
