cURL
curl --request POST \ --url https://api.tokenlayer.network/functions/v1/enter-referral-code \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "referral_code": "alice2025", "network_mode": "mainnet" } '
{ "success": true, "referrer_code": "alice2025", "message": "Referral code successfully applied" }
Enter a referral code to establish a referral relationship. The code owner becomes your referrer for protocol-level benefits.
Using a referral code gives you a 4% cashback on your trading fees.
Restrictions:
JWT token or API key
The referral code to enter
"alice2025"
Network mode for this referral code
testnet
mainnet
both
"mainnet"
Successful response
true
The referral code that was entered
Success message
"Referral code successfully applied"