Authentication
All endpoints require the following headers unless otherwise noted:Bearer token (JWT) for end-user authentication. Format:
Bearer YOUR_JWT_TOKENYour Magic secret key for application-level authentication.
Sign Data
Sign data with the authenticated user’s Magic wallet.cURL
Request Parameters
A
0x-prefixed hex hash to sign directly. Provide either this or message.A plain text message to hash (keccak256) and sign. Provide either this or
raw_data_hash.Response Fields
Whether the signing operation completed successfully.
The hex-encoded signature.
The hash that was signed.
The user identifier from your application.
Withdraw to External Address
Send funds from the authenticated user’s Magic wallet to an external address.cURL
Request Parameters
The recipient wallet address.
The amount to withdraw as a decimal string.
The token to withdraw. Values:
ETH, WETH, USDC, USDC.E, POL, SOLThe chain to withdraw on. Values:
ETH, ARB, POL, SOL, STRK, INKSupported Token/Chain Combinations
| Chain | Supported Tokens |
|---|---|
| ETH | ETH, WETH, USDC, USDC.E |
| ARB | ETH, WETH, USDC, USDC.E |
| POL | POL, USDC, USDC.E |
| SOL | SOL, USDC |
| STRK | ETH, USDC |
| INK | ETH, WETH, USDC |
Response Fields
Whether the withdrawal was executed successfully.
The on-chain transaction hash.
The sender’s wallet address.
The recipient’s wallet address.
The amount withdrawn.
The token that was withdrawn.
The chain the withdrawal was executed on.
Human-readable status message.