{"openapi":"3.1.0","info":{"title":"AraVPN","description":"AraVPN — VPN-сервис с акцентом на анонимность и безопасность. Мы не храним историю трафика и не передаём данные третьим лицам.","version":"1.0.0"},"paths":{"/auth/telegram":{"post":{"tags":["auth"],"summary":"Auth Telegram","operationId":"auth_telegram_auth_telegram_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramAuthRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/servers":{"get":{"tags":["servers"],"summary":"List Servers","operationId":"list_servers_servers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/servers/config":{"post":{"tags":["servers"],"summary":"Generate Config","operationId":"generate_config_servers_config_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/servers/auto-config":{"post":{"tags":["servers"],"summary":"Generate Auto Config","operationId":"generate_auto_config_servers_auto_config_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/me":{"get":{"tags":["me"],"summary":"Get Me","operationId":"get_me_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/status":{"get":{"tags":["status"],"summary":"Service Status","operationId":"service_status_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Service Status Status Get"}}}}}}},"/config":{"get":{"tags":["status"],"summary":"Public Config","operationId":"public_config_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Public Config Config Get"}}}}}}},"/partner/me":{"get":{"tags":["partner"],"summary":"Get Partner Info","operationId":"get_partner_info_partner_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerInfoResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/partner/apply":{"post":{"tags":["partner"],"summary":"Apply Referral Code","operationId":"apply_referral_code_partner_apply_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyReferralCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Apply Referral Code Partner Apply Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/plans":{"get":{"tags":["billing"],"summary":"Get Plans","operationId":"get_plans_billing_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPlansResponse"}}}}}}},"/billing/payments":{"get":{"tags":["billing"],"summary":"List Payments","operationId":"list_payments_billing_payments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentsListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/platega/create":{"post":{"tags":["billing"],"summary":"Create Platega Payment","operationId":"create_platega_payment_billing_platega_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/rollypay/create":{"post":{"tags":["billing"],"summary":"Create Rollypay Payment","operationId":"create_rollypay_payment_billing_rollypay_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/telegram-stars/create":{"post":{"tags":["billing"],"summary":"Create Telegram Stars Payment","operationId":"create_telegram_stars_payment_billing_telegram_stars_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/platega/webhook":{"post":{"tags":["billing"],"summary":"Platega Webhook","operationId":"platega_webhook_billing_platega_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Platega Webhook Billing Platega Webhook Post"}}}}}}},"/billing/rollypay/webhook":{"post":{"tags":["billing"],"summary":"Rollypay Webhook","operationId":"rollypay_webhook_billing_rollypay_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Rollypay Webhook Billing Rollypay Webhook Post"}}}}}}},"/billing/ip-addon/purchase":{"post":{"tags":["billing"],"summary":"Purchase Ip Addon","operationId":"purchase_ip_addon_billing_ip_addon_purchase_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseIpAddonRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseIpAddonResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/trial/start":{"post":{"tags":["billing"],"summary":"Start Trial","operationId":"start_trial_billing_trial_start_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialStartResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Health Get"}}}}}},"head":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Health Get"}}}}}}}},"components":{"schemas":{"AccessStateResponse":{"properties":{"trial_available":{"type":"boolean","title":"Trial Available"},"trial_active":{"type":"boolean","title":"Trial Active"},"paid_active":{"type":"boolean","title":"Paid Active"},"rescue_active":{"type":"boolean","title":"Rescue Active"},"has_access":{"type":"boolean","title":"Has Access"},"access_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Access Expires At"}},"type":"object","required":["trial_available","trial_active","paid_active","rescue_active","has_access","access_expires_at"],"title":"AccessStateResponse"},"ApplyReferralCodeRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"ApplyReferralCodeRequest"},"AutoConfigRequest":{"properties":{"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code","description":"ISO country code from client locale"},"client_type":{"type":"string","enum":["universal","happ","v2box","v2raytun","v2rayng","hiddify","nekoray","shadowrocket"],"title":"Client Type","description":"Client profile for compatibility tuning","default":"universal"}},"type":"object","title":"AutoConfigRequest"},"AutoConfigResponse":{"properties":{"server_id":{"type":"string","title":"Server Id"},"inbound_id":{"type":"integer","title":"Inbound Id"},"client_type":{"type":"string","enum":["universal","happ","v2box","v2raytun","v2rayng","hiddify","nekoray","shadowrocket"],"title":"Client Type"},"config_link":{"type":"string","title":"Config Link"},"rescue_config_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rescue Config Link"},"subscription_id":{"type":"integer","title":"Subscription Id"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"selected_server_name":{"type":"string","title":"Selected Server Name"},"selection_reason":{"type":"string","title":"Selection Reason"},"estimated_ping_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Ping Ms"}},"type":"object","required":["server_id","inbound_id","client_type","config_link","subscription_id","expires_at","selected_server_name","selection_reason"],"title":"AutoConfigResponse"},"BillingPlanResponse":{"properties":{"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"ip_limit":{"type":"integer","title":"Ip Limit"},"traffic_text":{"type":"string","title":"Traffic Text"},"speed_text":{"type":"string","title":"Speed Text"},"price_rub":{"type":"number","title":"Price Rub"},"price_stars":{"type":"integer","title":"Price Stars"}},"type":"object","required":["code","title","description","ip_limit","traffic_text","speed_text","price_rub","price_stars"],"title":"BillingPlanResponse"},"BillingPlansResponse":{"properties":{"plans":{"items":{"$ref":"#/components/schemas/BillingPlanResponse"},"type":"array","title":"Plans"}},"type":"object","required":["plans"],"title":"BillingPlansResponse"},"ConfigRequest":{"properties":{"server_id":{"type":"string","title":"Server Id","description":"Server ID from GET /servers"},"inbound_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Inbound Id","description":"Optional inbound ID override"},"client_type":{"type":"string","enum":["universal","happ","v2box","v2raytun","v2rayng","hiddify","nekoray","shadowrocket"],"title":"Client Type","description":"Client profile for compatibility tuning","default":"universal"}},"type":"object","required":["server_id"],"title":"ConfigRequest"},"ConfigResponse":{"properties":{"server_id":{"type":"string","title":"Server Id"},"inbound_id":{"type":"integer","title":"Inbound Id"},"client_type":{"type":"string","enum":["universal","happ","v2box","v2raytun","v2rayng","hiddify","nekoray","shadowrocket"],"title":"Client Type"},"config_link":{"type":"string","title":"Config Link"},"rescue_config_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rescue Config Link"},"subscription_id":{"type":"integer","title":"Subscription Id"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["server_id","inbound_id","client_type","config_link","subscription_id","expires_at"],"title":"ConfigResponse"},"CreatePaymentRequest":{"properties":{"plan_code":{"type":"string","title":"Plan Code","default":"basic"}},"type":"object","title":"CreatePaymentRequest"},"CreatePaymentResponse":{"properties":{"payment_id":{"type":"integer","title":"Payment Id"},"provider":{"type":"string","title":"Provider"},"status":{"type":"string","title":"Status"},"amount":{"type":"number","title":"Amount"},"currency":{"type":"string","title":"Currency"},"confirmation_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmation Url"}},"type":"object","required":["payment_id","provider","status","amount","currency","confirmation_url"],"title":"CreatePaymentResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InboundInfo":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark"},"protocol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Protocol"},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port"},"tls_flow_capable":{"type":"boolean","title":"Tls Flow Capable","default":false}},"type":"object","required":["id","remark","protocol","port"],"title":"InboundInfo"},"MeResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserResponse"},"access":{"$ref":"#/components/schemas/AccessStateResponse"},"subscriptions":{"items":{"$ref":"#/components/schemas/SubscriptionResponse"},"type":"array","title":"Subscriptions"},"recent_transactions":{"items":{"$ref":"#/components/schemas/TransactionResponse"},"type":"array","title":"Recent Transactions"}},"type":"object","required":["user","access","subscriptions","recent_transactions"],"title":"MeResponse"},"PartnerInfoResponse":{"properties":{"referral_code":{"type":"string","title":"Referral Code"},"referral_link":{"type":"string","title":"Referral Link"},"referred_users":{"type":"integer","title":"Referred Users"},"paid_referrals":{"type":"integer","title":"Paid Referrals"},"referral_earnings":{"type":"number","title":"Referral Earnings"},"referral_bonus_percent":{"type":"number","title":"Referral Bonus Percent"},"referral_lifetime_discount_percent":{"type":"number","title":"Referral Lifetime Discount Percent"},"referral_discount_steps":{"type":"integer","title":"Referral Discount Steps"},"max_referral_discount_percent":{"type":"number","title":"Max Referral Discount Percent","default":30.0}},"type":"object","required":["referral_code","referral_link","referred_users","paid_referrals","referral_earnings","referral_bonus_percent","referral_lifetime_discount_percent","referral_discount_steps"],"title":"PartnerInfoResponse"},"PaymentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"provider":{"type":"string","title":"Provider"},"status":{"type":"string","title":"Status"},"amount":{"type":"number","title":"Amount"},"currency":{"type":"string","title":"Currency"},"months":{"type":"integer","title":"Months"},"confirmation_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmation Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","provider","status","amount","currency","months","confirmation_url","description","created_at"],"title":"PaymentResponse"},"PaymentsListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PaymentResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"PaymentsListResponse"},"PurchaseIpAddonRequest":{"properties":{"quantity":{"type":"integer","title":"Quantity","default":1}},"type":"object","title":"PurchaseIpAddonRequest"},"PurchaseIpAddonResponse":{"properties":{"subscription_id":{"type":"integer","title":"Subscription Id"},"new_ip_limit":{"type":"integer","title":"New Ip Limit"},"charged_amount":{"type":"number","title":"Charged Amount"},"balance_after":{"type":"number","title":"Balance After"},"config_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Link"},"message":{"type":"string","title":"Message"}},"type":"object","required":["subscription_id","new_ip_limit","charged_amount","balance_after","config_link","message"],"title":"PurchaseIpAddonResponse"},"ServerInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"country":{"type":"string","title":"Country","default":""},"flag":{"type":"string","title":"Flag","default":""},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port"},"online":{"type":"boolean","title":"Online","default":false},"inbounds":{"items":{"$ref":"#/components/schemas/InboundInfo"},"type":"array","title":"Inbounds","default":[]}},"type":"object","required":["id","name"],"title":"ServerInfo"},"ServerListResponse":{"properties":{"servers":{"items":{"$ref":"#/components/schemas/ServerInfo"},"type":"array","title":"Servers"}},"type":"object","required":["servers"],"title":"ServerListResponse"},"SubscriptionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"server_id":{"type":"string","title":"Server Id"},"inbound_id":{"type":"integer","title":"Inbound Id"},"status":{"type":"string","title":"Status"},"ip_limit":{"type":"integer","title":"Ip Limit"},"traffic_limit_gb":{"type":"integer","title":"Traffic Limit Gb"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"config_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Link"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","server_id","inbound_id","status","ip_limit","traffic_limit_gb","expires_at","config_link","created_at"],"title":"SubscriptionResponse"},"TelegramAuthRequest":{"properties":{"init_data":{"type":"string","title":"Init Data","description":"Telegram WebApp initData string"}},"type":"object","required":["init_data"],"title":"TelegramAuthRequest"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token"],"title":"TokenResponse"},"TransactionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","title":"Type"},"amount":{"type":"number","title":"Amount"},"balance_after":{"type":"number","title":"Balance After"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","type","amount","balance_after","description","created_at"],"title":"TransactionResponse"},"TrialStartResponse":{"properties":{"trial_started_at":{"type":"string","format":"date-time","title":"Trial Started At"},"trial_expires_at":{"type":"string","format":"date-time","title":"Trial Expires At"},"message":{"type":"string","title":"Message"}},"type":"object","required":["trial_started_at","trial_expires_at","message"],"title":"TrialStartResponse"},"UserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"telegram_id":{"type":"integer","title":"Telegram Id"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"language_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language Code"},"referral_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Code"},"referred_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Referred By User Id"},"first_payment_discount_used":{"type":"boolean","title":"First Payment Discount Used"},"referral_reward_granted":{"type":"boolean","title":"Referral Reward Granted"},"referral_discount_steps":{"type":"integer","title":"Referral Discount Steps"},"referral_lifetime_discount_percent":{"type":"number","title":"Referral Lifetime Discount Percent"},"family_mode_enabled":{"type":"boolean","title":"Family Mode Enabled"},"trial_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Started At"},"trial_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Expires At"},"paid_access_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid Access Until"},"rescue_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rescue Started At"},"rescue_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rescue Expires At"},"rescue_trigger_paid_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rescue Trigger Paid Until"},"referral_earnings":{"type":"number","title":"Referral Earnings"},"balance":{"type":"number","title":"Balance"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","telegram_id","username","first_name","last_name","language_code","referral_code","referred_by_user_id","first_payment_discount_used","referral_reward_granted","referral_discount_steps","referral_lifetime_discount_percent","family_mode_enabled","trial_started_at","trial_expires_at","paid_access_until","rescue_started_at","rescue_expires_at","rescue_trigger_paid_until","referral_earnings","balance","is_active","created_at"],"title":"UserResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}