Skip to main content

Approvals

When a transaction value exceeds the auto-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: /approvals
Auth: Tenant-level (X-Steward-Key)

How Approvals Work

  1. Agent submits a sign request via SDK or REST API
  2. Policy engine evaluates all rules — hard policies (spending-limit, etc.) must pass
  3. If auto-approve-threshold is set and the value exceeds it, the transaction is queued (HTTP 202)
  4. Steward fires a tx.pending webhook event (if configured)
  5. A human reviews via the API, SDK, or <ApprovalQueue> React component
  6. On approval: Steward signs the transaction and optionally broadcasts
  7. On denial: the transaction is marked rejected and a tx.denied webhook fires

List Pending Approvals

Query params: Response:

Approval Stats

Returns aggregate counts across all agents in the tenant:

Approve a Transaction

Steward immediately signs the transaction. If broadcast: true was set in the original sign request, the transaction is also broadcast to the chain. Response:

Deny a Transaction

The 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’s approvalConfig.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:
Transactions at or below the threshold are signed immediately. Transactions above the threshold are queued.
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 a tx.pending webhook to get notified when transactions need review:
Your webhook handler receives:
Then approve or deny via the REST API from your backend.