TunnelSats API#
Programmatic access to TunnelSats VPN subscriptions.β‘ Quick Start#
1.
List Servers: GET /servers - See available locations.
2.
Create Subscription: POST /create - Get a Lightning invoice.
3.
Pay: Pay the invoice with any Lightning wallet.
4.
Claim: POST /claim - Receive your WireGuard config.
π° Pricing#
| Duration | Price | Discount |
|---|
| 1 month | $3.00 | - |
| 3 months | $8.55 | 5% |
| 6 months | $16.20 | 10% |
| 12 months | $28.80 | 20% |
Prices converted to Sats at current BTC/USD rate.π Server IDs#
| ID | Location |
|---|
us-east | Ashburn, USA |
us-west | Hillsboro, USA |
eu-de | Nuremberg, DE |
asia-sg | Singapore |
sa-br | Sao Paulo, BR |
π Referral Program#
Include referralCode in /create for bonus months:3mo plan β +1 month free
6mo plan β +2 months free
12mo plan β +3 months free
π Authentication#
Most endpoints are public - no auth needed to buy!For account endpoints (List My Subs, Sync):| Method | Header | How to Get |
|---|
| API Key (recommended) | Authorization: {{vault:bearer-token}} | Dashboard β Settings β API Keys |
| NIP-98 (advanced) | Authorization: Nostr | Requires Nostr signing (e.g. Alby extension) |
β FAQ#
Q: Do I need an API Key to buy a subscription?
A: No! The purchase flow is completely public. Keys are only for managing your account.Q: Where do I get an API Key?
A: Log in at tunnelsats.com β Dashboard β Settings β Generate API Key.Q: What's the difference between API Key and NIP-98?
A: API Keys are simple Bearer tokens. NIP-98 uses Nostr-signed events - useful for Nostr-native apps but requires cryptographic signing.Q: Can I use my own WireGuard keys?
A: Yes! Pass wgPublicKey in /claim to bring your own keys. Otherwise we generate them for you.β±οΈ Rate Limits#
π₯οΈ Base URL#
Public endpoints that donβt require authentication.
Use these to discover available servers and basic status info.
Start here to get yourΒ first 200 OK.Modified atΒ 2026-02-10 22:20:31