> ## 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.

# Deposit into vault

> Deposit assets from a wallet into an ERC-4626 vault. This endpoint generates and broadcasts the necessary approval and deposit transactions.



## OpenAPI

````yaml post /v1/wallets/{wallet_id}/ethereum_yield_deposit
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/wallets/{wallet_id}/ethereum_yield_deposit:
    post:
      tags:
        - Yield
      summary: Deposit into Vault
      description: >-
        Deposit assets from a wallet into an ERC-4626 vault. This endpoint
        generates and broadcasts the necessary approval and deposit
        transactions.
      operationId: ethereumYieldDeposit
      parameters:
        - schema:
            type: string
            description: ID of the wallet.
          required: true
          name: wallet_id
          in: path
        - schema:
            type: string
            description: ID of your Privy app.
          required: true
          name: privy-app-id
          in: header
        - schema:
            type: string
            description: >-
              Request authorization signature. If multiple signatures are
              required, they should be comma separated.
          required: false
          name: privy-authorization-signature
          in: header
        - schema:
            type: string
            description: >-
              Request expiry. Value is a Unix timestamp in milliseconds
              representing the deadline by which the request must be processed.
          required: false
          name: privy-request-expiry
          in: header
        - schema:
            type: string
            description: >-
              Idempotency keys ensure API requests are executed only once within
              a 24-hour window.
          required: false
          name: privy-idempotency-key
          in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EthereumYieldDepositInput'
      responses:
        '200':
          description: Yield sweep created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EthereumYieldSweepResponse'
      security:
        - appSecretAuth: []
components:
  schemas:
    EthereumYieldDepositInput:
      type: object
      properties:
        vault_id:
          type: string
          description: The ID of the vault to deposit into.
        asset_amount:
          type: string
          minLength: 1
          maxLength: 78
          pattern: ^\d+$
          description: >-
            The amount of the underlying asset to deposit, in the smallest unit
            (e.g., wei for ETH, 6 decimals for USDC). Must be a non-negative
            integer string.
      required:
        - vault_id
        - asset_amount
      additionalProperties: false
      description: Input for depositing assets into an ERC-4626 vault.
      title: EthereumYieldDepositInput
      example:
        vault_id: cm7oxq1el000e11o8iwp7d0d0
        asset_amount: '1000000'
      x-stainless-model: yield.ethereum_yield_deposit_input
    EthereumYieldSweepResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the yield sweep.
        wallet_id:
          type: string
          description: The ID of the wallet involved in the sweep.
        vault_id:
          type: string
          description: The ID of the vault involved in the sweep.
        type:
          $ref: '#/components/schemas/EthereumYieldSweepType'
        status:
          $ref: '#/components/schemas/EthereumYieldSweepStatus'
        asset_amount:
          type:
            - string
            - 'null'
          description: >-
            The amount of underlying assets involved. Set after the sweep is
            confirmed on-chain.
        share_amount:
          type:
            - string
            - 'null'
          description: >-
            The amount of vault shares involved. Set after the sweep is
            confirmed on-chain.
        created_at:
          type: number
          description: Unix timestamp of when the sweep was created, in milliseconds.
        updated_at:
          type: number
          description: Unix timestamp of when the sweep was last updated, in milliseconds.
      required:
        - id
        - wallet_id
        - vault_id
        - type
        - status
        - asset_amount
        - share_amount
        - created_at
        - updated_at
      description: A yield sweep record representing a deposit or withdrawal.
      title: EthereumYieldSweepResponse
      example:
        id: cm7oxq1el000e11o8iwp7d0d0
        wallet_id: fmfdj6yqly31huorjqzq38zc
        vault_id: cm7oxq1el000e11o8iwp7d0d0
        type: deposit
        status: pending
        asset_amount: '1000000'
        share_amount: '987654321'
        created_at: 1631573050000
        updated_at: 1631573050000
      x-stainless-model: yield.ethereum_yield_sweep_response
    EthereumYieldSweepType:
      type: string
      enum:
        - deposit
        - withdraw
      description: Type of yield sweep.
      title: EthereumYieldSweepType
      x-stainless-model: yield.ethereum_yield_sweep_type
    EthereumYieldSweepStatus:
      type: string
      enum:
        - pending
        - confirmed
        - failed
      description: Status of a yield sweep.
      title: EthereumYieldSweepStatus
      x-stainless-model: yield.ethereum_yield_sweep_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.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.