1. 🔄 Lifecycle
TunnelSats Public Wireguard API
  • Announcements
    • 👋 About our team
    • 💫 What is TunnelSats?
    • 🚀 Introducing the TunnelSats Public API v1
    • 🧩 How the TunnelSats StartOS Package Uses the Public API
    • 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 Usage Reset)
      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 Usage Reset)
    • 🛡️ Security & Authentication
    • 🎁 Referral Program: Earn Bonus Months
    • 🛑 Error Codes & Troubleshooting
  • Schemas
    • Server
    • InvoiceOrder
    • SubscriptionStatus
    • NodeLookup
    • ConnectivityResult
    • ApiError
    • ClaimResult
    • BandwidthResetResponse
    • PublicKeyStatusResponse
    • SubscriptionListItem
    • ReferralCode
    • ReferralHistory
    • BandwidthResetPaymentStatus
    • RenewalOrder
    • SyncResult
Tunnelsats Github
Tunnelsats Telegram
  1. 🔄 Lifecycle

Request Bandwidth Top-Up ($1 Usage Reset)

POST
https://tunnelsats.com/api/public/v1/subscription/bandwidth-reset
Generates a $1 USD Lightning invoice for a bandwidth reset. Once it is paid, the key's usage counter for the current month goes back to 0, so its full allowance is available again; a reset does not add allowance on top, and unused allowance does not carry over. A reset also re-enables a peer that was disabled for exceeding its allowance. There is no usage threshold: a reset is available at any usage while the subscription is active, so automated clients should apply their own usage policy before paying. While an unpaid invoice for the key is still open, a new request returns that same invoice instead of creating another one. Rate limit: 10 requests/min per IP. Monthly limit: 2 resets per key per UTC calendar month; an open invoice holds its slot until it is paid or expires.

Request

Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
Bandwidth reset invoice generated
Bodyapplication/json

🟠400Bad Request
🟠403Record Not Found
🟠404OK
🟠429
🔴503
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://tunnelsats.com/api/public/v1/subscription/bandwidth-reset' \
--header 'Accept;' \
--header 'Content-Type: application/json' \
--data '{
    "wgPublicKey": "pWyZTQx8C4gzzgMVJHiN1ptI46wDtyJSMRa+wxtkXOM=",
    "serverId": "us-east"
}'
Response Response Example
200 - Success
{
    "invoice": "lnbc30000n1p...",
    "paymentHash": "c3d4e5f6a1b2...",
    "resetId": "d7b2277f-5990-4721-a565-6816babadc59",
    "amountSats": 3000,
    "amountUsd": "1.00",
    "currentUsagePercent": "85.4",
    "resetsThisMonth": 0,
    "maxResetsPerMonth": 2,
    "expiresAt": "2026-09-27T11:00:00.000Z"
}
Modified at 2026-10-10 22:07:24
Previous
Renew an Existing VPN Subscription (Anonymous)
Next
List Account Subscriptions (Authenticated)
Built with