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

# Reindex wallet automations

> Recheck a wallet balance and recover a missed or failed automation execution.

Reindexing checks the asset's current wallet balance. It does not replay the original deposit amount.

See [recover a missed or failed deposit](/controls/automations/lifecycle#recover-a-missed-or-failed-deposit) for recovery behavior and result statuses.


## OpenAPI

````yaml post /v1/wallet_automations/reindex
openapi: 3.1.0
info:
  version: 0.0.1
  title: Privy API
  description: >-
    REST API for Privy's wallet infrastructure — provision and manage wallets
    across EVM, Solana, and Bitcoin, authenticate users, sign transactions, and
    configure programmable policies and authorization intents.
  contact:
    name: Privy
    url: https://www.privy.io/
    email: support@privy.io
servers:
  - url: https://api.privy.io
security: []
tags:
  - name: Accounts
    description: Operations related to asset accounts
  - name: Actions
    description: Operations related to looking up wallet actions across an app
  - name: Aggregations
    description: Operations related to aggregations for tracking and measuring metrics
  - name: Apps
    description: Operations related to app settings and allowlist management
  - name: Cards
    description: Operations related to stablecoin-backed card issuing
  - name: Client Auth
    description: OAuth token exchange and device authorization operations
  - name: Condition Sets
    description: Operations related to condition sets
  - name: Embedded wallets
    description: Operations related to embedded wallet creation and authentication
  - name: Fiat
    description: Operations related to fiat onramping and offramping
  - name: Intents
    description: Operations related to authorization intents for wallet actions
  - name: Key quorums
    description: Operations related to key quorums
  - name: Kraken Embed
    description: >-
      Operations for Kraken Embed integration, including quotes, trades, user
      management, and portfolio operations
  - name: OAuth
    description: >-
      OAuth 2.0 endpoints including Device Authorization Grant (RFC 8628) for
      CLI and limited-input device login flows
  - name: Organizations
    description: Operations related to organizations
  - name: Policies
    description: Operations related to policies
  - name: Shared
    description: Common schemas shared across resources
  - name: Swaps
    description: Operations for swapping tokens within wallets
  - name: Teams
    description: Operations related to dashboard team management
  - name: Transactions
    description: Operations related to transactions
  - name: User signers
    description: Operations related to user signers
  - name: Users
    description: Operations related to users
  - name: Wallet Actions
    description: Operations related to wallet actions
  - name: Wallet Automations
    description: Operations related to wallet automations
  - name: Wallets
    description: Operations related to wallets
  - name: Webhooks
    description: >-
      Webhook events that Privy sends to your configured endpoint when specific
      actions occur in your app
  - name: Yield
    description: >-
      Operations for depositing and withdrawing funds from ERC-4626 yield vaults
      (Morpho, Aave)
paths:
  /v1/wallet_automations/reindex:
    post:
      tags:
        - Wallet Automations
      summary: Reindex wallet automations for a wallet
      description: >-
        Re-checks a wallet (identified by wallet_id or deposit_address) for
        funds matching its wallet automation configs and triggers an automation
        run if a match is found. Use this to recover a deposit whose automation
        trigger was missed or failed.
      operationId: reindexWalletAutomations
      parameters:
        - schema:
            type: string
            description: ID of your Privy app.
          required: true
          name: privy-app-id
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WalletAutomationReindexRequestBody'
      responses:
        '200':
          description: The outcome of the reindex for the checked asset.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletAutomationReindexResponse'
        '400':
          description: >-
            Invalid wallet identifiers, chain, asset address, or a deposit
            address that does not match the wallet ID.
        '401':
          description: Missing or invalid app credentials.
        '403':
          description: The app is not authorized to perform this request.
        '404':
          description: The wallet was not found for the authenticated app.
        '500':
          description: >-
            An unexpected server error occurred before the asset could be
            checked (e.g. during wallet resolution). Balance, block/slot, or
            enqueue failures never produce a 500 — they appear as a `failed`
            result in the 200 response.
      security:
        - appSecretAuth: []
components:
  schemas:
    WalletAutomationReindexRequestBody:
      type: object
      properties:
        wallet_id:
          type: string
          minLength: 1
          maxLength: 128
          description: >-
            Privy wallet ID to reindex. Takes precedence over `deposit_address`
            when both are supplied.
        deposit_address:
          type: string
          minLength: 1
          maxLength: 128
          description: >-
            On-chain deposit address of the wallet to reindex. Must match the
            resolved wallet's address if `wallet_id` is also provided.
        caip2:
          allOf:
            - $ref: '#/components/schemas/WalletAutomationReindexCaip2'
            - description: The EVM, Solana, or Tron CAIP-2 chain identifier to check.
        chain:
          type: string
          minLength: 1
          maxLength: 64
          description: >-
            Human-readable chain name to check. Specify exactly one of `caip2`
            or `chain`.
        asset_address:
          type: string
          minLength: 1
          maxLength: 128
          description: Asset contract address to check; the native asset uses `native`.
      required:
        - asset_address
      additionalProperties: false
      description: >-
        Request body for re-checking a wallet against its wallet automations.
        Identify the wallet by wallet_id or deposit_address (at least one is
        required). If both are provided, wallet_id takes precedence and
        deposit_address must match that wallet's address. Specify exactly one of
        caip2 or chain, and the asset_address to check. Useful for recovering a
        deposit that was missed or failed to trigger its automation.
      title: WalletAutomationReindexRequestBody
      x-stainless-model: wallet_automations.wallet_automation_reindex_request_body
    WalletAutomationReindexResponse:
      type: object
      properties:
        wallet_id:
          type: string
        results:
          type: array
          items:
            $ref: '#/components/schemas/WalletAutomationReindexAssetResult'
      required:
        - wallet_id
        - results
      additionalProperties: false
      description: Result of re-checking a wallet against its wallet automations.
      title: WalletAutomationReindexResponse
      x-stainless-model: wallet_automations.wallet_automation_reindex_response
    WalletAutomationReindexCaip2:
      anyOf:
        - $ref: '#/components/schemas/EvmCaip2'
        - $ref: '#/components/schemas/SolanaCaip2'
        - $ref: '#/components/schemas/TronCaip2'
      description: >-
        An EVM, Solana, or Tron CAIP-2 chain identifier supported by wallet
        automation reindex.
      title: WalletAutomationReindexCaip2
      x-stainless-model: wallet_automations.wallet_automation_reindex_caip_2
    WalletAutomationReindexAssetResult:
      type: object
      properties:
        caip2:
          allOf:
            - $ref: '#/components/schemas/WalletAutomationReindexCaip2'
            - description: CAIP-2 chain ID the asset lives on.
        asset_address:
          type: string
          description: Asset contract address; the native asset uses `native`.
        status:
          $ref: '#/components/schemas/WalletAutomationReindexAssetStatus'
        raw_balance:
          type:
            - string
            - 'null'
          description: >-
            On-chain balance in base units. Populated when `status` is
            `submitted` or `skipped_zero_balance`; `null` otherwise. For
            example, 1 OUSD is `1000000`.
        existing_execution_id:
          type:
            - string
            - 'null'
          description: >-
            ID of the in-flight execution blocking a re-trigger. Populated only
            when `status` is `skipped_existing_execution`; `null` otherwise.
      required:
        - caip2
        - asset_address
        - status
        - raw_balance
        - existing_execution_id
      additionalProperties: false
      description: >-
        The outcome of checking one asset on the requested chain during a
        reindex.
      title: WalletAutomationReindexAssetResult
      x-stainless-model: wallet_automations.wallet_automation_reindex_asset_result
    EvmCaip2:
      type: string
      pattern: ^eip155:\d+$
      description: >-
        EVM CAIP-2 chain identifier (e.g. "eip155:4217" for Tempo, "eip155:1"
        for Ethereum).
      title: EvmCaip2
      x-stainless-model: shared.evm_caip_2
    SolanaCaip2:
      type: string
      pattern: ^solana:[a-zA-Z0-9]+$
      description: >-
        Solana CAIP-2 chain identifier (e.g.
        "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp").
      title: SolanaCaip2
      x-stainless-model: shared.solana_caip_2
    TronCaip2:
      type: string
      enum:
        - tron:mainnet
        - tron:nile
      description: >-
        Tron CAIP-2 chain identifier. Supported values: "tron:mainnet",
        "tron:nile".
      title: TronCaip2
      x-stainless-model: shared.tron_caip_2
    WalletAutomationReindexAssetStatus:
      type: string
      description: >-
        Outcome of checking a single asset during a wallet automation reindex.
        One of `submitted`, `skipped_zero_balance`, `skipped_no_match`,
        `skipped_existing_execution`, or `failed`. `submitted` confirms that an
        execution was enqueued.
      title: WalletAutomationReindexAssetStatus
      x-stainless-model: wallet_automations.wallet_automation_reindex_asset_status
  securitySchemes:
    appSecretAuth:
      type: http
      scheme: basic
      description: >-
        Basic Auth header with your app ID as the username and your app secret
        as the password.

````