---
title: "Recover an owned budget preparation or durable change"
method: GET
path: "/wallets/{address}/policies/preparations/{id}"
tags: ["Policies"]
---

# Recover an owned budget preparation or durable change

`GET /wallets/{address}/policies/preparations/{id}`

## Request

- Base URL: `https://api.avaprotocol.org/api/v1`
- URL: `https://api.avaprotocol.org/api/v1/wallets/{address}/policies/preparations/{id}`
- Auth: HTTP bearer

## Query parameters

- `chainId` integer

## Response `200`

Exact stored review and priced owner operation; no usable grant is created.

- PreparedPolicy
  - `state` 'prepared' | 'submitting' | 'submitted' | 'active' | 'reverted' | 'rejected' | 'unsent' | 'superseded': prepared expires after ten minutes; that window limits only the first relay. submitting, submitted and rejected remain recoverable without expiry and keep Ava runs paused. A bundler rejection is not final. active, reverted and superseded are settled. unsent is possible only before a submitting marker. Successful inclusion stays submitted until reset verification passes; activation and hold release are atomic.
  - `reason` string
  - `transactionHash` string: Arbitrary-length hex-encoded byte string.
  - `inclusionBlock` integer
  - `finalReadBlock` integer
  - `isCancel` boolean: A successful cancel settles as active with isCancel true; it consumes the nonce and does not activate a new permission.
  - `preparationId` string: ULID identifier (26-char Crockford base32).
  - `signing` PolicySigning: Budget preparations use owner_operation and omit legacy digest and typedData. Preparation and first submission have separate feature flags, off by default. With signing enabled, signature-only first submission relays the exact stored owner operation on Sepolia. The owner personal_signs the 32 raw bytes of userOpHash. Submission is self-funded and fee capped; repeat submissions reconcile without rebroadcasting.
    - `kind` 'deferred_action' | 'owner_operation', required
    - `preparationId` string: ULID identifier (26-char Crockford base32).
    - `userOp` OwnerUserOperationV07: Finalized ERC-4337 v0.7 bundler-wire operation. Quantity fields are hex strings, never JSON numbers. Signature is empty (0x) until continuation; no operation field can be supplied or changed by submitExecution.
      - `sender` string, required: Lowercase or checksummed hex EOA / contract address.
      - `nonce` string, required: Arbitrary-length hex-encoded byte string.
      - `callData` string, required: Arbitrary-length hex-encoded byte string.
      - `callGasLimit` string, required: Arbitrary-length hex-encoded byte string.
      - `verificationGasLimit` string, required: Arbitrary-length hex-encoded byte string.
      - `preVerificationGas` string, required: Arbitrary-length hex-encoded byte string.
      - `maxFeePerGas` string, required: Arbitrary-length hex-encoded byte string.
      - `maxPriorityFeePerGas` string, required: Arbitrary-length hex-encoded byte string.
      - `factory` string: Lowercase or checksummed hex EOA / contract address.
      - `factoryData` string: Arbitrary-length hex-encoded byte string.
      - `paymaster` string: Lowercase or checksummed hex EOA / contract address.
      - `paymasterData` string: Arbitrary-length hex-encoded byte string.
      - `paymasterVerificationGasLimit` string: Arbitrary-length hex-encoded byte string.
      - `paymasterPostOpGasLimit` string: Arbitrary-length hex-encoded byte string.
      - `signature` string, required: Arbitrary-length hex-encoded byte string.
    - `userOpHash` string: 32-byte hex hash (UserOp hash, transaction hash).
    - `maxFeeWei` string
    - `expiresAt` integer
    - `signingMethod` 'personal_sign'
    - `entryPoint` string: Lowercase or checksummed hex EOA / contract address.
  - `budget` WalletBudget
    - `chainId` integer, required: Numeric chain ID (e.g. 11155111 for Sepolia, 8453 for Base). On chain-aware trigger/node configs this is required and must be a configured chain; on query/filter params it is optional.
    - `policyId` string, required: ULID identifier (26-char Crockford base32).
    - `status` 'pending' | 'active', required
    - `sizing` 'workflow' | 'budget', required
    - `validUntil` integer, required
    - `startedAt` integer
    - `erc20` BudgetTokenRow[], required
      - `token` string, required: Lowercase or checksummed hex EOA / contract address.
      - `amount` string, required
      - `remaining` string, required
      - `used` string, required
      - `unlimited` boolean, required
    - `native` BudgetNativeRow
      - `amount` string, required
      - `remaining` string, required
      - `used` string, required
      - `unlimited` boolean, required
      - `gasWei` string: Recorded gas reserve inside amount. Omitted when the stored breakdown is unknown; never reconstructed.
    - `unmeteredPermissions` UnmeteredPermission[], required
      - `kind` 'aave_withdraw' | 'aave_borrow' | 'wrapped_native' | 'other', required
      - `target` string, required: Lowercase or checksummed hex EOA / contract address.
      - `selectors` string[], required
      - `token` string: Lowercase or checksummed hex EOA / contract address.
      - `added` boolean, required
    - `retirements` BudgetRetirement[]
      - `entityId` integer, required
      - `policyId` string: ULID identifier (26-char Crockford base32).
      - `state` 'registered' | 'residual' | 'unverified', required
      - `erc20` Erc20SpendCap[]: Remaining limits of an entity confirmed registered; absent otherwise.
        - `token` string, required: Lowercase or checksummed hex EOA / contract address.
        - `amount` string, required: Total cap in the token's smallest unit (decimal string, no reset).
      - `native` NativeSpendCap
        - `amount` string, required: Cumulative native-token cap in wei (decimal string, no reset). Enforced on-chain by NativeTokenLimitModule. Self-funded UserOps also decrement this cap by gas; sponsored UserOps decrement only the ETH value sent. When the chain does not sponsor gas, prepare sizes headroom for those UserOps into this amount: the steady-op ceiling times a per-chain fee assumption, plus one install. That headroom can also be sent as value to the allowed recipients.
    - `liveApprovals` LiveApproval[]: Reserved for approval discovery; omitted in this slice, not an assertion that no approvals exist.
      - `token` string, required: Lowercase or checksummed hex EOA / contract address.
      - `spender` string, required: Lowercase or checksummed hex EOA / contract address.
      - `amount` string, required
    - `pendingChange` object: Latest durable budget change. A rejected or reset-unverified change explains why runs remain paused.
      - `preparationId` string: ULID identifier (26-char Crockford base32).
      - `policyId` string, required: ULID identifier (26-char Crockford base32).
      - `state` 'prepared' | 'submitting' | 'submitted' | 'reverted' | 'rejected' | 'unsent' | 'superseded', required
      - `reason` string
    - `readAt` integer, required
  - `approvalResets` BudgetApprovalReset[]
    - `token` string, required: Lowercase or checksummed hex EOA / contract address.
    - `spender` string, required: Lowercase or checksummed hex EOA / contract address.
    - `amount` string, required
  - `unmeteredPermissions` UnmeteredPermission[]
    - `kind` 'aave_withdraw' | 'aave_borrow' | 'wrapped_native' | 'other', required
    - `target` string, required: Lowercase or checksummed hex EOA / contract address.
    - `selectors` string[], required
    - `token` string: Lowercase or checksummed hex EOA / contract address.
    - `added` boolean, required
  - `policyId` string, required: ULID identifier (26-char Crockford base32).
  - `chainId` integer, required: Numeric chain ID (e.g. 11155111 for Sepolia, 8453 for Base). On chain-aware trigger/node configs this is required and must be a configured chain; on query/filter params it is optional.
  - `entityId` integer, required: The validation entity allocated for this grant (provisional until submit).
  - `sessionSigner` string, required: Lowercase or checksummed hex EOA / contract address.
  - `deadline` integer, required: Unix seconds; bounds signing → first use, NOT the grant lifetime.
  - `validUntil` integer, required: Absolute grant expiry, unix milliseconds. Echo verbatim to submit.
  - `digest` string: The EIP-712 hash the typed data produces, for client-side verification.
  - `typedData` object: The exact eth_signTypedData_v4 payload for the owner's wallet.
  - `basePolicyId` string: Set when prepare merged an `add`. Empty means there was no usable grant. Echo `changes.basePolicyId`, including the empty string.
  - `affectedTaskIds` string[]: Enabled tasks this prepare left out because `dropTaskIds` named them. Echo those ids as submit's `dropTaskIds`.
  - `changes` SessionPolicyChanges: What the approval screen shows. `summary` is the copy. The structured fields are the same facts.
    - `nativeGasWei` string: Wei of the signed native cap that is self-funded gas: enabled automations' steady UserOps, one install when the grant is not yet applied, plus `nativeGasWei` from the addition. Omitted when this prepare did not price gas. The rest of the signed native cap is ETH the automations send. This headroom can also be sent as value to the allowed recipients.
    - `summary` string[], required: Approval lines. An expiry change reads "<task name>: until <Mon D>, was <Mon D>" in UTC when both dates are in the same year, for example "Weekly swap: until Dec 28, was Nov 30". When the years differ, both dates include the year.
    - `basePolicyId` string: Usable grant the merge read. Empty when the runner had none. Echo this to submit, including the empty string.
    - `keptActions` AllowedAction[]
      - `target` string, required: Lowercase or checksummed hex EOA / contract address.
      - `selectors` string[], required: 4-byte function selectors permitted on the target.
    - `addedActions` AllowedAction[]
      - `target` string, required: Lowercase or checksummed hex EOA / contract address.
      - `selectors` string[], required: 4-byte function selectors permitted on the target.
    - `removedActions` AllowedAction[]
      - `target` string, required: Lowercase or checksummed hex EOA / contract address.
      - `selectors` string[], required: 4-byte function selectors permitted on the target.
    - `capChanges` SessionPolicyCapChange[]
      - `token` string, required: Lowercase or checksummed hex EOA / contract address.
      - `amount` string, required: New total, in the token's smallest unit.
      - `previousAmount` string: What remained on the previous grant, in the token's smallest unit. Once that grant is on chain, this is the on-chain remainder. Before then, it is the stored cap. Omitted when the token is new.
      - `removed` boolean: True when this token's cap was dropped. `amount` is then "0", and `previousAmount` is what remained. Omitted when the cap is still on the grant.
    - `expiryChanges` SessionPolicyExpiryChange[]
      - `taskId` string
      - `name` string, required
      - `validUntil` integer, required
      - `previousValidUntil` integer: The wallet grant's previous expiry. One expiry covers every permission.
  - `allowedActions` AllowedAction[]: Merged actions to echo to submit. Present when `add` was sent.
    - `target` string, required: Lowercase or checksummed hex EOA / contract address.
    - `selectors` string[], required: 4-byte function selectors permitted on the target.
  - `erc20SpendCap` Erc20SpendCap: Cumulative ERC-20 spend cap for one token, enforced on-chain at execution. The token must appear as an `allowedActions` target. Prefer `erc20SpendCaps` when capping more than one token; this field remains the one-token alias (must match one entry of that array when both are sent). Native ETH is not this list.
    - `token` string, required: Lowercase or checksummed hex EOA / contract address.
    - `amount` string, required: Total cap in the token's smallest unit (decimal string, no reset).
  - `erc20SpendCaps` Erc20SpendCap[]
    - `token` string, required: Lowercase or checksummed hex EOA / contract address.
    - `amount` string, required: Total cap in the token's smallest unit (decimal string, no reset).
  - `nativeRecipients` EthereumAddress[]
  - `delegatedNativeRecipients` DelegatedNativeRecipient[]: Merged EIP-7702 acknowledgements to echo to submit. Present when `add` was sent and the merged grant has any. See DelegatedNativeRecipient.
    - `recipient` string, required: Lowercase or checksummed hex EOA / contract address.
    - `delegate` string, required: Lowercase or checksummed hex EOA / contract address.
  - `nativeSpendCap` NativeSpendCap
    - `amount` string, required: Cumulative native-token cap in wei (decimal string, no reset). Enforced on-chain by NativeTokenLimitModule. Self-funded UserOps also decrement this cap by gas; sponsored UserOps decrement only the ETH value sent. When the chain does not sponsor gas, prepare sizes headroom for those UserOps into this amount: the steady-op ceiling times a per-chain fee assumption, plus one install. That headroom can also be sent as value to the allowed recipients.
  - `allowContractRecipient` boolean

## Other responses

- `401`: Missing or invalid bearer token.
- `403`: Authenticated but not permitted.
- `404`: Resource not found.
- `409`: Budget preparation is disabled.

## Changes

- **2026-11-04** `6b505ebcf3f7`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/avaprotocol/apis/ava-protocol-avs-api/changes/wallets/:address/policies/preparations/:id/get.md)

---

[API](https://skmtc.dev/avaprotocol/apis/ava-protocol-avs-api.md) - [All operations](https://skmtc.dev/avaprotocol/apis/ava-protocol-avs-api/llms.txt) - [OpenAPI document](https://skmtc.dev/avaprotocol/apis/ava-protocol-avs-api/revisions/6b505ebcf3f7?raw)
