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

🐚 Bash One-Liners

For sysadmins who prefer the terminal, you can interact with TunnelSats using standard curl and jq.

1. Get a Lightning Invoice#

Generate a 1-month invoice for a specific region directly to your console.
Create Subscription

2. Check Payment Status#

Replace <payment_hash> with the hash returned from the previous step.
Check Status / Heal

3. Claim & Save Config (Dual-Key Support)#

Once paid, run this to save your WireGuard config. Note that we handle both .fullConfig and .config keys to ensure compatibility.
Claim Subscription

4. List All Subscriptions (Snake Case Alert)#

When listing all subscriptions for an authenticated account, the API returns snake_case keys (e.g., payment_hash instead of paymentHash).

5. Auto-Renewal Cron Job#

Add this script to your crontab to check expiry and generate a new invoice if needed.

6. Bandwidth Top-Up ($1 for +100GB)#

Request an instant bandwidth reset invoice for an active WireGuard key when usage exceeds 70%.
Modified at 2026-08-31 20:24:39
Previous
⚡ Bandwidth Top-Up ($1 for +100GB)
Next
Server
Built with