SnowMindDocs
Launch App

API Overview

Build external integrations with SnowMind. Your agent can deposit, rebalance, and withdraw without using the web UI.

Who This Is For

  • Treasury automation bots
  • AI agents (Claude Code, OpenClaw, custom scripts)
  • Mobile or backend applications
  • Portfolio managers and yield aggregators

Base URL

https://api.snowmind.xyz/api/v1

Authentication

Every request requires a Privy auth token in the Authorization header.

Authorization: Bearer {YOUR_PRIVY_TOKEN}

Privy Required

Privy is used for user identity and session management. Your agent must act on behalf of a logged-in user.

Credentials an Agent Needs

  • Privy auth token for the user
  • Smart account address (0x-prefixed)
  • Active session key (already stored in SnowMind)
  • Wallet signing access for deposits and withdrawals

Where Private Keys Live

  • User wallet private key stays in the user wallet (MetaMask, Rabby, WalletConnect). SnowMind never stores it.
  • Session key private key is stored server-side in SnowMind and is scoped to protocol actions only.

Never Share Wallet Keys

If an agent needs to sign on-chain transfers, it must run in a user-controlled environment (wallet extension, WalletConnect, or secure custody). SnowMind does not store user wallet keys.

Agent Deposit Flow

  1. User funds the smart account with USDC (agent can do this only if it can sign the wallet transfer).
  2. Agent calls POST /accounts/{address}/deposit with selected protocols and the funding transaction hash.
  3. SnowMind records the deposit and queues a rebalance.

What the Agent Must Provide

  • USDC transfer transaction hash
  • USDC amount deposited
  • Allowed protocol list
  • Optional allocation caps

Agent Withdrawal Flow

  1. Agent calls POST /withdrawals/preview (optional) to calculate fees and available liquidity.
  2. User signs a withdrawal authorization message with their wallet.
  3. Agent submits POST /withdrawals/execute with that signature.
  4. SnowMind uses the session key to redeem positions and sends USDC to the user wallet.

What the Agent Must Provide

  • Withdrawal amount and full/partial flag
  • Owner signature + signed message + timestamp

No Automatic Withdrawals Without Wallet Access

Withdrawals require a fresh user signature. Fully automated withdrawals only work if the agent can request a signature or has delegated wallet access.

Next Steps