1. 📢 Public
TunnelSats Public Wireguard API
  • About our team
  • 📢 Public
    • List available VPN servers
      GET
    • Create a new VPN subscription
      POST
    • Claim a WireGuard configuration after payment
      POST
    • Check subscription status via payment hash
      GET
    • Renew an existing VPN subscription
      POST
    • Get Subscription Status
      POST
  • 🔐 Authenticated
    • Sync Subscription
      POST
    • Create Referral Code
      POST
    • Referral History
      GET
    • List all active/paid subscriptions for the account
      GET
  • Announcements
    • 💫 What is TunnelSats?
    • 🚀 Introducing the TunnelSats Public API v1
    • How TunnelSats Leverages Public APIs for Confined VPN Management
  • Cookbook
    • 🛠️ Automation & Code Examples
    • 🐚 Bash One-Liners
    • 🛑 Error Codes & Troubleshooting
    • 🎁 Referral Program: Earn Bonus Months
    • 🚑 Node Health & Upkeep
    • 🛡️ Security & Authentication
  • Schemas
    • Server
    • InvoiceOrder
    • SubscriptionStatus
    • WireGuardConfig
    • ReferralCode
    • ReferralHistory
    • NodeLookup
    • ConnectivityResult
    • RenewalOrder
    • ClaimResult
    • ApiError
    • SubscriptionListItem
  1. 📢 Public

Create a new VPN subscription

POST
/api/public/v1/subscription/create

Request

Body Params application/jsonRequired

Examples

Responses

🟢201
application/json
Created
Body

🟠400
🔴503
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://tunnelsats.com/api/public/v1/subscription/create' \
--header 'Content-Type: application/json' \
--data-raw '{
    "serverId": "string",
    "duration": 1,
    "referralCode": "string"
}'
Response Response Example
201 - Example 1
{
    "invoice": "string",
    "paymentHash": "string",
    "amountSats": 0,
    "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5"
}
Modified at 2026-04-12 12:51:22
Previous
List available VPN servers
Next
Claim a WireGuard configuration after payment
Built with