---
title: "Deposit SPL Tokens"
method: POST
path: "/v1/spl/deposit"
---

# Deposit SPL Tokens

`POST /v1/spl/deposit`

Wraps the SDK `delegateSpl(...)` flow. The API generates `shuttleId` server-side and pins `escrowIndex` to `0`.

## Request body

- object
  - `owner` string, required
  - `cluster` union — Optional. Use `mainnet` for BASE_RPC_URL and EPHEMERAL_RPC_URL, `devnet` for BASE_DEVNET_RPC_URL and EPHEMERAL_DEVNET_RPC_URL, or provide a custom http(s) RPC URL to override the base RPC while keeping the configured ephemeral RPC.
    - 'mainnet' | 'devnet'
    - string
  - `mint` string — Optional. Defaults to Solana USDC on mainnet: `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`. On devnet it defaults to devnet USDC: `4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU`.
  - `amount` integer, required — Base-unit amount as an integer JSON value with minimum 1.
  - `validator` string — Optional. Defaults to the selected ephemeral RPC identity resolved via `getIdentity`.
  - `initIfMissing` boolean — Optional. Initialize the transfer queue if missing.
  - `initVaultIfMissing` boolean — Optional. Initialize the vault if missing.
  - `initAtasIfMissing` boolean — Optional. Initialize associated token accounts if missing.
  - `idempotent` boolean — Optional. When `true`, the API uses idempotent variants for any preparatory init instructions.
  - `private` boolean — Optional. When `true`, the deposited balance is kept private.

## Response `200`

Unsigned serialized transaction

- object
  - `kind` 'deposit', required
  - `version` 'legacy' | 'v0', required
  - `transactionBase64` string, required
  - `sendTo` 'base' | 'ephemeral', required
  - `recentBlockhash` string, required
  - `lastValidBlockHeight` integer, required
  - `instructionCount` integer, required
  - `requiredSigners` string[], required
  - `validator` string

## Other responses

- `400` — Build error
- `422` — Validation error

---

[API](https://skmtc.dev/magicblock/apis/magicblock-router-api.md) · [All operations](https://skmtc.dev/magicblock/apis/magicblock-router-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/magicblock/magicblock-router-api/revisions/f024efa907c6/schema)
