{"openapi":"3.1.0","info":{"title":"SpearVPN Controller","version":"0.1.0"},"paths":{"/login":{"get":{"summary":"Login Deprecated","operationId":"login_deprecated_login_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Login Deprecated","operationId":"login_deprecated_login_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Login Deprecated","operationId":"login_deprecated_login_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/logout":{"get":{"summary":"Logout Deprecated","operationId":"logout_deprecated_logout_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Logout Deprecated","operationId":"logout_deprecated_logout_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin":{"get":{"summary":"Admin Deck","operationId":"admin_deck_admin_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/sync":{"post":{"summary":"Admin Sync Singbox","operationId":"admin_sync_singbox_admin_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/sales/checkout":{"post":{"summary":"Admin Sales Checkout","operationId":"admin_sales_checkout_admin_sales_checkout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/sales/pro":{"post":{"summary":"Admin Sales Pro","operationId":"admin_sales_pro_admin_sales_pro_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/users/create":{"post":{"summary":"Admin Create User","operationId":"admin_create_user_admin_users_create_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_create_user_admin_users_create_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/revoke":{"post":{"summary":"Admin Revoke User","operationId":"admin_revoke_user_admin_users_revoke_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_revoke_user_admin_users_revoke_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/unrevoke":{"post":{"summary":"Admin Unrevoke User","operationId":"admin_unrevoke_user_admin_users_unrevoke_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_unrevoke_user_admin_users_unrevoke_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/rotate":{"post":{"summary":"Admin Rotate User","operationId":"admin_rotate_user_admin_users_rotate_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_rotate_user_admin_users_rotate_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/extend":{"post":{"summary":"Admin Extend User","operationId":"admin_extend_user_admin_users_extend_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_extend_user_admin_users_extend_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/addquota":{"post":{"summary":"Admin Add Quota","operationId":"admin_add_quota_admin_users_addquota_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_add_quota_admin_users_addquota_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/deductquota":{"post":{"summary":"Admin Deduct Quota","operationId":"admin_deduct_quota_admin_users_deductquota_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_deduct_quota_admin_users_deductquota_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/delete":{"post":{"summary":"Admin Delete User Route","operationId":"admin_delete_user_route_admin_users_delete_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_delete_user_route_admin_users_delete_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/wipe":{"post":{"summary":"Admin Wipe User Route","operationId":"admin_wipe_user_route_admin_users_wipe_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_wipe_user_route_admin_users_wipe_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/payments/approve":{"post":{"summary":"Admin Payment Approve","operationId":"admin_payment_approve_admin_payments_approve_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_payment_approve_admin_payments_approve_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/payments/reject":{"post":{"summary":"Admin Payment Reject","operationId":"admin_payment_reject_admin_payments_reject_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_payment_reject_admin_payments_reject_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/nodes/toggle":{"post":{"summary":"Admin Toggle Node","operationId":"admin_toggle_node_admin_nodes_toggle_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_toggle_node_admin_nodes_toggle_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/nodes/delete":{"post":{"summary":"Admin Delete Node","operationId":"admin_delete_node_admin_nodes_delete_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_delete_node_admin_nodes_delete_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/singbox/{token}":{"get":{"summary":"Import Singbox","operationId":"import_singbox_singbox__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"device","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/import/{token}":{"get":{"summary":"Import Singbox","operationId":"import_singbox_import__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"device","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/download/windows":{"get":{"summary":"Download Windows","description":"Serves or redirects to the official pre-configured SpearVPN Windows client.","operationId":"download_windows_download_windows_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Download Windows","description":"Serves or redirects to the official pre-configured SpearVPN Windows client.","operationId":"download_windows_download_windows_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/download/macos":{"get":{"summary":"Download Macos","description":"Redirects directly to latest GUI.for.SingBox macOS Apple Silicon binary.","operationId":"download_macos_download_macos_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Download Macos","description":"Redirects directly to latest GUI.for.SingBox macOS Apple Silicon binary.","operationId":"download_macos_download_macos_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/download/android":{"get":{"summary":"Download Android","description":"Redirects directly to latest universal Sing-box Android APK binary.","operationId":"download_android_download_android_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Download Android","description":"Redirects directly to latest universal Sing-box Android APK binary.","operationId":"download_android_download_android_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sub/{token}":{"head":{"summary":"Subscription Endpoint","operationId":"subscription_endpoint_sub__token__head","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"}},{"name":"device","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Subscription Endpoint","operationId":"subscription_endpoint_sub__token__head","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"}},{"name":"device","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/qr.png":{"get":{"summary":"Get Qr Image","operationId":"get_qr_image_qr_png_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Get Qr Image","operationId":"get_qr_image_qr_png_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health":{"get":{"summary":"Health Check","operationId":"health_check_api_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Health Check","operationId":"health_check_api_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health Check","operationId":"health_check_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Health Check","operationId":"health_check_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/status":{"get":{"summary":"Public Status Page","operationId":"public_status_page_status_head","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"head":{"summary":"Public Status Page","operationId":"public_status_page_status_head","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/status":{"get":{"summary":"Public Status Api","operationId":"public_status_api_api_status_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Public Status Api","operationId":"public_status_api_api_status_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Root","operationId":"root__head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Body_admin_add_quota_admin_users_addquota_post":{"properties":{"username":{"type":"string","title":"Username"},"extra_gb":{"type":"number","title":"Extra Gb"}},"type":"object","required":["username","extra_gb"],"title":"Body_admin_add_quota_admin_users_addquota_post"},"Body_admin_create_user_admin_users_create_post":{"properties":{"username":{"type":"string","title":"Username"},"plan":{"type":"string","title":"Plan"},"quota_gb":{"type":"number","title":"Quota Gb"},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration"},"duration_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duration Unit"},"days":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Days"},"hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hours"},"ip_limit":{"type":"integer","title":"Ip Limit"}},"type":"object","required":["username","plan","quota_gb","ip_limit"],"title":"Body_admin_create_user_admin_users_create_post"},"Body_admin_deduct_quota_admin_users_deductquota_post":{"properties":{"username":{"type":"string","title":"Username"},"deduct_gb":{"type":"number","title":"Deduct Gb"}},"type":"object","required":["username","deduct_gb"],"title":"Body_admin_deduct_quota_admin_users_deductquota_post"},"Body_admin_delete_node_admin_nodes_delete_post":{"properties":{"node_id":{"type":"integer","title":"Node Id"}},"type":"object","required":["node_id"],"title":"Body_admin_delete_node_admin_nodes_delete_post"},"Body_admin_delete_user_route_admin_users_delete_post":{"properties":{"username":{"type":"string","title":"Username"}},"type":"object","required":["username"],"title":"Body_admin_delete_user_route_admin_users_delete_post"},"Body_admin_extend_user_admin_users_extend_post":{"properties":{"username":{"type":"string","title":"Username"},"days":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Days"},"hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hours"},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration"},"duration_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duration Unit"}},"type":"object","required":["username"],"title":"Body_admin_extend_user_admin_users_extend_post"},"Body_admin_payment_approve_admin_payments_approve_post":{"properties":{"payment_id":{"type":"integer","title":"Payment Id"}},"type":"object","required":["payment_id"],"title":"Body_admin_payment_approve_admin_payments_approve_post"},"Body_admin_payment_reject_admin_payments_reject_post":{"properties":{"payment_id":{"type":"integer","title":"Payment Id"}},"type":"object","required":["payment_id"],"title":"Body_admin_payment_reject_admin_payments_reject_post"},"Body_admin_revoke_user_admin_users_revoke_post":{"properties":{"username":{"type":"string","title":"Username"}},"type":"object","required":["username"],"title":"Body_admin_revoke_user_admin_users_revoke_post"},"Body_admin_rotate_user_admin_users_rotate_post":{"properties":{"username":{"type":"string","title":"Username"}},"type":"object","required":["username"],"title":"Body_admin_rotate_user_admin_users_rotate_post"},"Body_admin_toggle_node_admin_nodes_toggle_post":{"properties":{"node_id":{"type":"integer","title":"Node Id"}},"type":"object","required":["node_id"],"title":"Body_admin_toggle_node_admin_nodes_toggle_post"},"Body_admin_unrevoke_user_admin_users_unrevoke_post":{"properties":{"username":{"type":"string","title":"Username"}},"type":"object","required":["username"],"title":"Body_admin_unrevoke_user_admin_users_unrevoke_post"},"Body_admin_wipe_user_route_admin_users_wipe_post":{"properties":{"username":{"type":"string","title":"Username"}},"type":"object","required":["username"],"title":"Body_admin_wipe_user_route_admin_users_wipe_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}