{
"sessionId": "550e8400-e29b-41d4-a716-446655440000",
"sessionToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresAt": "2025-12-24T13:45:30.000Z",
"client": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corp",
"email": "[email protected]",
"paymasterEnabled": false,
"merchantKybVerified": true,
"logoUrl": "https://acme.com/logo.png"
}
}Create a modal session
Creates a modal session with constraints (recipient, token, chain, amount). Returns a session token valid for 60 minutes.
{
"sessionId": "550e8400-e29b-41d4-a716-446655440000",
"sessionToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresAt": "2025-12-24T13:45:30.000Z",
"client": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corp",
"email": "[email protected]",
"paymasterEnabled": false,
"merchantKybVerified": true,
"logoUrl": "https://acme.com/logo.png"
}
}Authorizations
Enter your Chainrails API key as a Bearer token
Body
Recipient wallet address on the destination chain
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"
Token address on the destination chain
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
Destination blockchain network
ARBITRUM_MAINNET, ARBITRUM_TESTNET, AVALANCHE_MAINNET, AVALANCHE_TESTNET, BASE_MAINNET, BASE_TESTNET, STARKNET_MAINNET, STARKNET_TESTNET, BSC_MAINNET, ETHEREUM_MAINNET, ETHEREUM_TESTNET, OPTIMISM_MAINNET, OPTIMISM_TESTNET, MONAD_MAINNET, MONAD_TESTNET, POLYGON_MAINNET, HYPEREVM_MAINNET, LISK_MAINNET, SOLANA_MAINNET, SOLANA_TESTNET, TRON_MAINNET "STARKNET_MAINNET"
Amount in human-readable format (e.g., "1" for 1 token, "100" for 100 tokens, "1.5" for 1.5 tokens). Set to "0" to allow user to input any amount > 0
"1"
Response
Session created successfully
Unique session identifier
"550e8400-e29b-41d4-a716-446655440000"
JWT session token for authentication
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
Token expiration timestamp
"2025-12-24T13:45:30.000Z"
Client details associated with this session
Show child attributes
Show child attributes
Was this page helpful?

