Approvals
When a transaction value exceeds theauto-approve-threshold policy, Steward queues it for human review instead of signing immediately. The approvals API lets you list, inspect, approve, and deny these pending transactions.
Base path: /approvalsAuth: Tenant-level (
X-Steward-Key)
How Approvals Work
- Agent submits a sign request via SDK or REST API
- Policy engine evaluates all rules — hard policies (
spending-limit, etc.) must pass - If
auto-approve-thresholdis set and the value exceeds it, the transaction is queued (HTTP 202) - Steward fires a
tx.pendingwebhook event (if configured) - A human reviews via the API, SDK, or
<ApprovalQueue>React component - On approval: Steward signs the transaction and optionally broadcasts
- On denial: the transaction is marked rejected and a
tx.deniedwebhook fires
List Pending Approvals
| Param | Default | Description |
|---|---|---|
status | pending | Filter by status: pending, approved, rejected, or all |
limit | 50 | Max results (max: 200) |
offset | 0 | Pagination offset |
Approval Stats
Approve a Transaction
broadcast: true was set in the original sign request, the transaction is also broadcast to the chain.
Response:
Deny a Transaction
reason field is optional but recommended — it’s included in the tx.denied webhook payload.
Response:
Auto-Expiry
Approvals auto-expire after the duration set in the tenant’sapprovalConfig.autoExpireSeconds. Once expired, the transaction cannot be approved and the agent must resubmit.
Default: 86400 (24 hours). Set to 0 to disable auto-expiry.
Setting Up the Auto-Approve Threshold
Configure the threshold in your agent’s policy set:The
auto-approve-threshold policy is a soft gate — it never hard-rejects. But hard policies (spending-limit, approved-addresses, etc.) are still evaluated first. A transaction can be both blocked by a hard policy AND above the threshold; it will be rejected, not queued.Using the React Component
The<ApprovalQueue> component from @stwd/react provides a ready-made UI for reviewing pending transactions:
Webhook Integration
Configure atx.pending webhook to get notified when transactions need review:
Related
- Webhooks — Subscribe to approval events
- Tenant Config — Configure
approvalConfigsettings - React Components —
<ApprovalQueue>UI component - Policy Engine — How
auto-approve-thresholdworks