1. 🔑 Account
TunnelSats Public Wireguard API
  • Announcements
    • 👋 About our team
    • 💫 What is TunnelSats?
    • 🚀 Introducing the TunnelSats Public API v1
    • How TunnelSats Leverages Public APIs for Confined VPN Management
  • 📡 Discovery
    • List Available WireGuard Servers & Regions
      GET
  • ⚡ Purchase
    • Create a New WireGuard Subscription (Invoice Generation)
      POST
    • Check Invoice Status & Polling by Payment Hash
      GET
    • Claim WireGuard Configuration After Payment Settlement
      POST
  • 🔄 Lifecycle
    • Get Subscription & Bandwidth Status by WireGuard Public Key
      POST
    • Sync Subscription (Real-Time Server Refresh)
      POST
    • Renew an Existing VPN Subscription (Anonymous)
      POST
    • Request Bandwidth Top-Up ($1 for +100GB)
      POST
  • 🔑 Account
    • List Account Subscriptions (Authenticated)
      GET
    • Create Referral Code
      POST
    • Get Referral Code
      GET
    • Referral History
      GET
  • 🔧 Tools
    • Lightning Node Network Address Discovery
      POST
    • Universal Connectivity & Latency Probe
      POST
  • Cookbook
    • 🛠️ Automation & Code Examples
    • 🐚 Bash One-Liners
    • 🚑 Node Health & Upkeep
    • ⚡ Bandwidth Top-Up ($1 for +100GB)
    • 🛡️ Security & Authentication
    • 🎁 Referral Program: Earn Bonus Months
    • 🛑 Error Codes & Troubleshooting
  • Schemas
    • Server
    • InvoiceOrder
    • SubscriptionStatus
    • NodeLookup
    • ConnectivityResult
    • ApiError
    • ClaimResult
    • BandwidthResetResponse
    • ReferralCode
    • ReferralHistory
    • BandwidthResetPaymentStatus
    • PublicKeyStatusResponse
    • RenewalOrder
    • SubscriptionListItem
    • SyncResult
Tunnelsats Github
Tunnelsats Telegram
  1. 🔑 Account

Get Referral Code

GET
https://tunnelsats.com/api/referral/create
Returns the referral code of your authenticated account, or null if you have not created one yet (use POST /api/referral/create). Rate limit: 30 requests/min per account, separate from the POST budget.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Header Params

Responses

🟢200
application/json
Your referral code, or null if none exists yet
Bodyapplication/json

🟠401
🟠429
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://tunnelsats.com/api/referral/create' \
--header 'Accept;' \
--header 'Authorization: Bearer <token>'
Response Response Example
200 - Success
{
    "code": "REF-7K2Q9Z",
    "created_at": "2026-01-15 09:30:00",
    "usage_count": 3
}
Modified at 2026-09-27 20:22:45
Previous
Create Referral Code
Next
Referral History
Built with