Skip to main content
POST
Transfer SPL Tokens

Authorizations

Authorization
string
header
required

Token obtained from the /v1/spl/login flow.

Body

application/json
from
string
required

Sender wallet pubkey.

Example:

"3rXKwQ1kpjBd5tdcco32qsvqUh1BnZjcYnS5kYrP7AYE"

to
string
required

Recipient wallet pubkey, or an initialized stealth handle (e.g. alice@magicblock.id). When a non-pubkey handle is provided it is resolved via its stealth pool and requires visibility: private, fromBalance: base, toBalance: base.

Example:

"Bt9oNR5cCtnfuMmXgWELd6q5i974PdEMQDUE55nBC57L"

mint
string
required

SPL mint pubkey.

Example:

"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

amount
integer
required

Base-unit amount as a non-negative integer JSON value.

Required range: x >= 0
Example:

1000000

cluster

Optional, defaults to mainnet. mainnet and devnet route to the public ephemeral RPC for that network; mainnet-private and devnet-private route to the TEE-backed Private Ephemeral Rollup and are required for auth and bearer-token-gated reads. A custom http(s) RPC URL overrides only the base RPC while keeping the configured ephemeral RPC.

Available options:
mainnet,
devnet,
mainnet-private,
devnet-private
Example:

"mainnet"

visibility
enum<string>

Optional. Defaults to private. Use public for a transparent SPL transfer or private for a private transfer. A private transfer runs on the TEE-backed Private Ephemeral Rollup only with cluster: mainnet-private or devnet-private; with mainnet or devnet it runs on the public ephemeral rollup.

Available options:
public,
private
fromBalance
enum<string>

Optional. Defaults to base. Where the sender's balance is held. Drives which RPC the API uses for blockhash and where the client should submit.

Available options:
base,
ephemeral
toBalance
enum<string>

Optional. Defaults to base. Where the recipient should receive the funds.

Available options:
base,
ephemeral
exactOut
boolean

Optional. When true, treats amount as the exact amount the recipient should receive (relevant when fees are deducted).

validator
string

Optional. When this transfer route needs a validator and none is provided, the API resolves it from the selected ephemeral RPC via getIdentity.

Example:

"MAS1Dt9qreoRMQ14YQuhg8UTZMMzDdKhmkZMECCzk57"

initIfMissing
boolean

Optional. Initialize the transfer queue if missing.

initAtasIfMissing
boolean

Optional. Initialize associated token accounts if missing.

initVaultIfMissing
boolean

Optional. Initialize the vault if missing. Defaults to false.

platformFeeBps
integer

Optional platform fee in basis points, charged in the transferred token.

Required range: 0 <= x <= 10000
Example:

100

platformFeeAccount
string

Required when platformFeeBps is greater than 0. Token account (not a wallet address) that collects the platform fee, for the transferred mint, e.g. the fee collector's USDC ATA for a USDC transfer, or their WSOL ATA for native SOL transfers. Expected to already exist on-chain; the API does not verify it, so a wallet address, uninitialized ATA, or wrong-mint token account still returns 200 and the built transaction fails at simulation with an SPL Token error.

Example:

"6QxLzE2KfM1NAB7sTzUPk4cNsA6V9fB3eYq9s6d9r9hP"

memo
string

Optional. Appends a final Memo Program instruction with this UTF-8 message.

Example:

"Order #1042"

minDelayMs
string

Optional. Private transfer only. Defaults to 0. Earliest (ms) the queued transfer may settle.

Pattern: ^\d+$
Example:

"0"

maxDelayMs
string

Optional. Private transfer only. Defaults to 0 when omitted, or to minDelayMs when only minDelayMs is set. Must be >= minDelayMs.

Pattern: ^\d+$
Example:

"0"

clientRefId
string

Optional. Private transfer only. Encrypted client reference ID that can be used to confirm a payment.

Pattern: ^\d+$
Example:

"42"

split
integer

Optional. Private transfer only. Defaults to 1. Number of queue entries to split the transfer across. Must be between 1 and 15 and cannot exceed amount.

Required range: x <= 15
Example:

1

gasless
boolean

Optional. When true, the API uses the configured sponsor as transaction fee payer and prepends a relay-fee token transfer to the sponsor ATA.

Example:

true

legacy
boolean

Optional. Defaults to false. When true, skips lookup-table compilation and returns a legacy transaction. Private base -> base transfers may otherwise return a v0 transaction when a useful lookup table is configured.

Response

Unsigned serialized transaction

kind
enum<string>
required
Available options:
transfer
version
enum<string>
required
Available options:
legacy,
v0
transactionBase64
string
required
sendTo
enum<string>
required
Available options:
base,
ephemeral
recentBlockhash
string
required
lastValidBlockHeight
integer
required
instructionCount
integer
required
Required range: x >= 0
requiredSigners
string[]
required
from
enum<string>

Mirrors the request fromBalance.

Available options:
base,
ephemeral
validator
string
fees
object

Fees applied to the transfer, in base units.