{"openapi":"3.1.0","info":{"title":"API Docs | Nodesty","description":"API Documentation for Nodesty."},"servers":[{"url":"https://nodesty.com","description":"Local Development Server","variables":{}}],"paths":{"/api/help-requests/{id}":{"get":{"tags":["User"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Help Request ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"200":{"description":"Help request details for the specified ID","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the help request","example":"1"},"subject":{"type":"string","description":"Subject of the help request","example":"Issue with my VPS"},"status":{"type":"string","description":"Current status of the help request","example":"OPEN"},"priority":{"type":"string","description":"Priority level of the help request","example":"HIGH"},"lastReply":{"type":"string","format":"date-time","description":"Timestamp of the last reply to the help request","example":"2023-10-01T12:00:00Z"},"marked":{"type":"boolean","default":false,"description":"Indicates if the help request is marked as important","example":true},"messages":{"type":"array","description":"List of messages associated with the help request","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the message","example":"1"},"messageId":{"type":"string","description":"Message ID for tracking purposes","example":"346534763346"},"content":{"type":"string","description":"Content of the message","example":"This is a message content"},"attachments":{"type":"array","items":{"type":"string"}}}}}}}}}}},"summary":"Get Help Request","description":"Get the current user help request by ID"}},"/api/help-requests":{"get":{"tags":["User"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true}],"responses":{"200":{"description":"List of help requests for the current user","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the help request","example":"1"},"subject":{"type":"string","description":"Subject of the help request","example":"Issue with my VPS"},"status":{"type":"string","description":"Current status of the help request","example":"OPEN"},"priority":{"type":"string","description":"Priority level of the help request","example":"HIGH"},"lastReply":{"type":"string","format":"date-time","description":"Timestamp of the last reply to the help request","example":"2023-10-01T12:00:00Z"},"marked":{"type":"boolean","default":false,"description":"Indicates if the help request is marked as important","example":true}}}}}}}},"summary":"Get Help Requests","description":"Get the current user help requests"}},"/api/services/{id}/dedicated/action":{"post":{"tags":["Dedicated Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"204":{"description":"Action executed successfully"},"404":{"description":"Dedicated server not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Perform Action","description":"Perform an action on a dedicated server","requestBody":{"description":"Action to perform on the dedicated server","content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["setPowerOff","setPowerOn","setPowerReset"],"description":"Action to perform on the dedicated server","example":"setPowerOn"}},"required":["action"]}}},"required":true}}},"/api/services/{id}/dedicated/hardware":{"get":{"tags":["Dedicated Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"200":{"description":"List of hardware components for the dedicated server","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"component":{"type":"string","description":"Hardware component name","example":"CPU Model"},"model":{"type":"string","description":"Model of the hardware component","example":"AMD Ryzen 9 9950X"},"value":{"type":"integer","description":"Value of the hardware component","example":5000},"valueSuffix":{"type":"string","description":"Unit of the value","example":" MHz"}}}}}}},"404":{"description":"Dedicated server not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get Hardware Components","description":"Retrieve hardware components of a dedicated server"}},"/api/services/{id}/dedicated/info":{"get":{"tags":["Dedicated Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"200":{"description":"Information about the dedicated server","content":{"application/json":{"schema":{"type":"object","properties":{"dedicatedId":{"type":"string","description":"Unique identifier for the dedicated server","example":"1"},"status":{"type":"boolean","description":"Current status of the dedicated server","example":true},"availableActions":{"type":"array","description":"List of available actions for the dedicated server","items":{"type":"string","enum":["setPowerOn","setPowerOff","setPowerReset"]}},"mainboard":{"type":"string","description":"Model of the mainboard","example":"ASUS ROG Strix X570-E Gaming"},"ram":{"type":"integer","description":"Amount of RAM in GB","example":128},"disk":{"type":"integer","description":"Total disk space in GB","example":1000},"cpu":{"type":"object","properties":{"model":{"type":"string","description":"Model of the CPU","example":"AMD Ryzen 9 5950X"},"speed":{"type":"integer","description":"Base speed of the CPU in MHz","example":3500},"turboSpeed":{"type":"integer","description":"Turbo speed of the CPU in MHz","example":4900},"cores":{"type":"integer","description":"Number of CPU cores","example":16},"threads":{"type":"integer","description":"Number of CPU threads","example":32}}}}}}}},"404":{"description":"Dedicated server not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get Information","description":"Get information about a dedicated server"}},"/api/services/{id}/dedicated/os-templates":{"get":{"tags":["Dedicated Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"200":{"description":"List of available OS templates","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"OS version ID","example":1},"name":{"type":"string","description":"OS version name","example":"Debian 9.5"}}}}}}},"404":{"description":"Dedicated server not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get OS Templates","description":"Get available OS templates for a dedicated server"}},"/api/services/{id}/dedicated/reinstall-status":{"get":{"tags":["Dedicated Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"200":{"description":"Dedicated server reinstall status","content":{"application/json":{"schema":{"type":"object","properties":{"completed":{"type":"boolean","description":"Whether the reinstall process is completed","example":true},"step":{"type":"integer","description":"Current step of the reinstall process","example":1,"enum":[1,2,3]}}}}}},"404":{"description":"Dedicated server not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get Reinstall Status","description":"Get dedicated server reinstall status"}},"/api/services/{id}/dedicated/reinstall":{"post":{"tags":["Dedicated Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"204":{"description":"VPS reinstallation initiated successfully"},"404":{"description":"VPS not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Reinstall","description":"Reinstall a dedicated server with a new OS","requestBody":{"description":"Reinstall dedicated server with a new OS","content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New root password for the dedicated server","example":"StrongPassword123!"},"osId":{"type":"integer","description":"ID of the new OS to install","example":1}},"required":["password","osId"]}}},"required":true}}},"/api/services/{id}/dedicated/tasks":{"get":{"tags":["Dedicated Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"200":{"description":"List of dedicated server tasks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","description":"Description of the task action","example":"Server reboot initiated"},"startedAt":{"type":"integer","description":"Unix timestamp when the task started","example":1625251200000},"updatedAt":{"type":"integer","description":"Unix timestamp when the task was last updated","example":1625254800000}}}}}}},"404":{"description":"Dedicated server not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get Tasks","description":"Get dedicated server tasks"}},"/api/services/{id}/firewall/{ip}/attack-logs":{"get":{"tags":["Firewall"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}},{"in":"path","name":"ip","description":"IP Address","required":true,"schema":{"type":"string","example":"77.90.14.1"}}],"responses":{"200":{"description":"List of attack logs for the specified IP address","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"startedAt":{"type":"integer","description":"Timestamp when the attack started","example":1700000000000},"endedAt":{"type":"integer","description":"Timestamp when the attack ended, null if ongoing","example":1700000000000,"nullable":true},"vectors":{"type":"array","items":{"type":"string","description":"Type of attack vector (e.g., TCP_SYN, ICMP, UDP)"},"description":"List of attack vectors used during the attack","example":["TCP_SYN","ICMP"]},"peak":{"type":"integer","description":"Peak traffic during the attack","example":449455557}}}}}}},"404":{"description":"Service or IP not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get Attack Logs","description":"Get nShield statistics for a specific IP address on a Virtual or Dedicated Server"}},"/api/services/{id}/firewall/{ip}/attack-notification":{"get":{"tags":["Firewall"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}},{"in":"path","name":"ip","description":"IP Address","required":true,"schema":{"type":"string","example":"77.90.14.1"}}],"responses":{"200":{"description":"Attack notification settings for the specified service and IP address","content":{"application/json":{"schema":{"type":"object","properties":{"emailNotification":{"type":"boolean","description":"Whether email notifications are enabled for attack alerts","example":true},"discordWebhookURL":{"type":"string","description":"Discord webhook URL for attack notifications","example":"https://discord.com/api/webhooks/123456789012345678/abcdefghijklmnopqrstuvwxyz","nullable":true}}}}}},"404":{"description":"Service or IP address not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get Attack Notification Settings","description":"Get attack notification settings for a specific IP address on a Virtual or Dedicated Server"},"put":{"tags":["Firewall"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}},{"in":"path","name":"ip","description":"IP Address","required":true,"schema":{"type":"string","example":"77.90.14.1"}}],"responses":{"200":{"description":"Attack notification settings updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"emailNotification":{"type":"boolean","description":"Whether email notifications are enabled","example":true},"discordWebhookURL":{"type":"string","description":"Discord webhook URL for attack notifications","example":"https://discord.com/api/webhooks/123456789012345678/abcdefghijklmnopqrstuvwxyz"}}}}}},"404":{"description":"Service or IP address not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Update Attack Notification Settings","description":"Update attack notification settings for a specific IP address on a Virtual or Dedicated Server","requestBody":{"description":"Attack notification settings to update","content":{"application/json":{"schema":{"type":"object","properties":{"emailNotification":{"type":"boolean","description":"Whether email notifications are enabled","example":true},"discordWebhookURL":{"type":"string","description":"Discord webhook URL for attack notifications","example":"https://discord.com/api/webhooks/123456789012345678/abcdefghijklmnopqrstuvwxyz","nullable":true}},"required":[]}}}}}},"/api/services/{id}/firewall/{ip}/rdns":{"delete":{"tags":["Firewall"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}},{"in":"path","name":"ip","description":"IP Address","required":true,"schema":{"type":"string","example":"77.90.14.1"}}],"responses":{"204":{"description":"Reverse DNS (rDNS) set successfully"},"404":{"description":"Service, IP address, or reverse DNS (rDNS) not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Reset Reverse DNS","description":"Reset reverse DNS (rDNS) for a specific IP address on a Virtual or Dedicated Server"},"get":{"tags":["Firewall"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}},{"in":"path","name":"ip","description":"IP Address","required":true,"schema":{"type":"string","example":"77.90.14.1"}}],"responses":{"200":{"description":"Reverse DNS (rDNS) for the specified IP address","content":{"application/json":{"schema":{"type":"object","properties":{"rdns":{"type":"string","description":"Reverse DNS entry for the IP address","example":"example.domain.com","nullable":true}}}}}},"404":{"description":"Service or IP address not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get Reverse DNS","description":"Get reverse DNS (rDNS) for a specific IP address on a Virtual or Dedicated Server"},"put":{"tags":["Firewall"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}},{"in":"path","name":"ip","description":"IP Address","required":true,"schema":{"type":"string","example":"77.90.14.1"}}],"responses":{"204":{"description":"Reverse DNS (rDNS) set successfully"},"400":{"description":"Invalid Reverse DNS (rDNS)","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Service or IP address not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Upsert Reverse DNS","description":"Set or update reverse DNS (rDNS) for a specific IP address on a Virtual or Dedicated Server","requestBody":{"description":"Reverse DNS entry to set for the IP address","content":{"application/json":{"schema":{"type":"object","properties":{"rdns":{"type":"string","description":"Reverse DNS entry to set","example":"example.domain.com"}},"required":["rdns"]}}},"required":true}}},"/api/services/{id}/firewall/{ip}/rules/{ruleId}":{"delete":{"tags":["Firewall"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}},{"in":"path","name":"ip","description":"IP Address","required":true,"schema":{"type":"string","example":"77.90.14.1"}},{"in":"path","name":"ruleId","description":"Rule ID","required":true,"schema":{"type":"string","example":"12345"}}],"responses":{"204":{"description":"Rule deleted successfully"},"404":{"description":"Service, IP address, or rule not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Delete Rule","description":"Delete a nShield rule for a specific IP address on a Virtual or Dedicated Server"}},"/api/services/{id}/firewall/{ip}/rules":{"get":{"tags":["Firewall"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}},{"in":"path","name":"ip","description":"IP Address","required":true,"schema":{"type":"string","example":"77.90.14.1"}}],"responses":{"200":{"description":"List of nShield rules for the specified service and IP address","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Rule ID","example":12345},"protocol":{"type":"string","description":"Protocol used by the rule","example":"TCP"},"service":{"type":"string","description":"Service associated with the rule","example":"Minecraft"},"port":{"type":"integer","description":"Port number for the rule","example":25565}}}}}}},"404":{"description":"Service or IP not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get Rules","description":"Get nShield rules for a specific IP address on a Virtual or Dedicated Server"}},"/api/services/{id}/firewall/{ip}/stats":{"get":{"tags":["Firewall"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}},{"in":"path","name":"ip","description":"IP Address","required":true,"schema":{"type":"string","example":"77.90.14.1"}}],"responses":{"200":{"description":"nShield statistics for the specified IP address","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"integer","format":"date-time","description":"Unix timestamp of the traffic data","example":1704067200000},"totalPassTraffic":{"type":"string","description":"Total traffic that passed through the nShield","example":"10248576"},"totalDropTraffic":{"type":"string","description":"Total traffic that was dropped by the nShield","example":"2048576"}}}}}}},"404":{"description":"Service or IP not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get Statistics","description":"Get nShield statistics for a specific IP address on a Virtual or Dedicated Server"}},"/api/services/{id}/mail/info":{"get":{"tags":["Mail Hosting"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"200":{"description":"Information about the mail hosting service","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["active","pending"],"description":"Current status of the mail hosting service","example":"active"},"spamExperts":{"type":"boolean","description":"Indicates if SpamExperts is enabled","example":true},"fileStorage":{"type":"boolean","description":"Indicates if file storage is enabled","example":true},"office":{"type":"boolean","description":"Indicates if Office integration is enabled","example":true},"domainAlias":{"type":"object","properties":{"count":{"type":"integer","description":"Number of domain aliases","example":2},"limit":{"type":"integer","description":"Maximum number of domain aliases","example":5}}},"disk":{"type":"object","properties":{"usage":{"type":"integer","description":"Disk usage in bytes","example":104857600},"limit":{"type":"integer","description":"Disk limit in bytes","example":524288000}}},"users":{"type":"object","properties":{"count":{"type":"integer","description":"Number of users","example":10},"limit":{"type":"integer","description":"Maximum number of users","example":20},"aliasCount":{"type":"integer","description":"Number of user aliases","example":5},"aliasLimit":{"type":"integer","description":"Maximum number of user aliases","example":10}}},"archiveYears":{"type":"object","properties":{"number":{"type":"integer","description":"Number of archived years","example":0},"status":{"type":"string","description":"Status of archived years","enum":["enabled","disabled"],"example":"disabled"}}},"verified":{"type":"object","properties":{"status":{"type":"boolean","description":"Verification status","example":true},"type":{"type":"string","description":"Type of verification record","enum":["TXT"],"example":"TXT"},"record":{"type":"string","description":"Verification TXT record","example":"b9959b96-4d2a-4e54-b148-2a18f003de90"}}},"dns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"DNS record name","example":"mail.example.com"},"type":{"type":"string","description":"DNS record type","enum":["MX","CNAME","TXT"],"example":"MX"},"value":{"type":"string","description":"DNS record value","example":"mail.example.com."},"priority":{"type":"integer","description":"DNS record priority","example":10},"status":{"type":"boolean","description":"Status of DNS record verification","example":true}}}},"dkim":{"type":"object","properties":{"name":{"type":"string","description":"DKIM record name","example":"asdDjskladl2184._domainKey"},"type":{"type":"string","description":"DKIM record type","enum":["TXT"],"example":"MX"},"value":{"type":"string","description":"DKIM record value","example":"mail.example.com."},"status":{"type":"boolean","description":"Status of DKIM record verification","example":true}},"nullable":true}}}}}}},"404":{"description":"Mail Hosting not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get Information","description":"Get information about a mail hosting service"}},"/api/services/{id}/vps/action":{"post":{"tags":["Virtual Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"204":{"description":"Action executed successfully"},"404":{"description":"VPS not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Perform Action","description":"Perform an action on a Virtual Server","requestBody":{"description":"Action to perform on the VPS","content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["start","shutdown","reset","stop"],"description":"Action to perform on the VPS","example":"start"}},"required":["action"]}}},"required":true}}},"/api/services/{id}/vps/backups/{file}":{"patch":{"tags":["Virtual Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"204":{"description":"Backup updated successfully"},"404":{"description":"VPS not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Update Backup","description":"Update a backup for the VPS","requestBody":{"description":"Backup update request","content":{"application/json":{"schema":{"type":"object","properties":{"locked":{"type":"boolean","description":"Whether the backup is locked","example":true},"notes":{"type":"string","description":"Notes about the backup","example":"Backup created before major update"}},"required":[]}}}}}},"/api/services/{id}/vps/backups/{file}/restore":{"post":{"tags":["Virtual Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"204":{"description":"VPS backup restore initiated successfully"},"404":{"description":"VPS not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Restore Backup","description":"Restore a backup for the VPS"}},"/api/services/{id}/vps/backups/daily-backups":{"put":{"tags":["Virtual Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"204":{"description":"Daily backup status changed successfully"},"404":{"description":"VPS not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Change Daily Backup Status","description":"Change the daily backup status of a Virtual Server","requestBody":{"description":"Daily backup configuration","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether daily backups are enabled","example":true}},"required":["enabled"]}}},"required":true}}},"/api/services/{id}/vps/backups":{"get":{"tags":["Virtual Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"200":{"description":"List of VPS backups","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string","description":"Name of the backup file","example":"backup-pool:backup/vm/2702/2025-08-09T18:11:41Z"},"notes":{"type":"string","description":"Notes about the backup","example":"Backup created before major update"},"createdAt":{"type":"integer","description":"Unix timestamp when the backup was created","example":1754763101000}}}}}}},"404":{"description":"VPS not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get Backups","description":"Get VPS backups"},"post":{"tags":["Virtual Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"204":{"description":"VPS backup request received and is being processed"},"404":{"description":"VPS not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Create Backup","description":"Create a new backup for the VPS"}},"/api/services/{id}/vps/change-password":{"post":{"tags":["Virtual Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"204":{"description":"Password changed successfully"},"404":{"description":"VPS not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Change Password","description":"Change the password of a Virtual Server","requestBody":{"description":"Change the password of a Virtual Server","content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","description":"User whose password will be changed","example":"Administrator"},"password":{"type":"string","description":"New password for the VPS","example":"StrongPassword123!"}},"required":["username","password"]}}},"required":true}}},"/api/services/{id}/vps/graphs":{"get":{"tags":["Virtual Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"200":{"description":"VPS usage statistics graphs","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"netOut":{"type":"integer","description":"Network outbound traffic in bytes","example":12345},"netIn":{"type":"integer","description":"Network inbound traffic in bytes","example":12345},"ramUsage":{"type":"integer","description":"RAM usage in bytes","example":12345},"cpuUsage":{"type":"integer","description":"CPU usage in percentage","example":12.34},"diskRead":{"type":"integer","description":"Disk read in bytes","example":12345},"diskWrite":{"type":"integer","description":"Disk write in bytes","example":12345},"timestamp":{"type":"integer","format":"date-time","description":"Unix timestamp of the data","example":1704067200000}}}}}}},"404":{"description":"VPS not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get Graphs","description":"Get VPS usage statistics graphs"}},"/api/services/{id}/vps/info":{"get":{"tags":["Virtual Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"200":{"description":"Information about the VPS","content":{"application/json":{"schema":{"type":"object","properties":{"vpsId":{"type":"integer","description":"Unique identifier for the VPS","example":12345},"proxmoxId":{"type":"integer","description":"Proxmox ID of the VPS","example":67890},"hostname":{"type":"string","description":"Hostname of the VPS","example":"vps.example.com"},"status":{"type":"boolean","description":"Current status of the VPS (true for active, false for inactive)","example":true},"os":{"type":"object","properties":{"id":{"type":"string","description":"ID of the operating system","example":"debian"},"name":{"type":"string","description":"Name of the operating system","example":"Debian GNU/Linux 12 (bookworm)"}}},"disk":{"type":"integer","description":"Total disk space in bytes","example":10737418240},"ips":{"type":"array","items":{"type":"string","description":"IP addresses assigned to the VPS","example":"192.168.1.100"}},"cpu":{"type":"object","properties":{"percent":{"type":"number","format":"float","description":"CPU usage percentage","example":75.5},"cores":{"type":"integer","description":"Number of CPU cores assigned to the VPS","example":4}}},"ram":{"type":"object","properties":{"limit":{"type":"integer","description":"RAM limit in bytes","example":2147483648},"used":{"type":"integer","description":"Used RAM in bytes","example":1073741824},"free":{"type":"integer","description":"Free RAM in bytes","example":1073741824},"percent":{"type":"number","format":"float","description":"Percentage of used RAM","example":50}}}}}}}},"404":{"description":"VPS not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get Information","description":"Get information about a Virtual Server"}},"/api/services/{id}/vps/os-templates":{"get":{"tags":["Virtual Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"200":{"description":"List of available OS templates","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"OS version ID","example":1},"name":{"type":"string","description":"OS version name","example":"Debian 9.5"}}}}}}},"404":{"description":"VPS not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get OS Templates","description":"Get available OS templates for a Virtual Server"}},"/api/services/{id}/vps/reinstall":{"post":{"tags":["Virtual Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"204":{"description":"VPS reinstallation initiated successfully"},"404":{"description":"VPS not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Reinstall","description":"Reinstall a Virtual Server with a new OS","requestBody":{"description":"Reinstall VPS with a new OS","content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New root password for the VPS","example":"StrongPassword123!"},"osId":{"type":"integer","description":"ID of the new OS to install","example":1}},"required":["password","osId"]}}},"required":true}}},"/api/services/{id}/vps/tasks":{"get":{"tags":["Virtual Server"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Service ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"200":{"description":"List of VPS tasks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","description":"Action of the task","example":"qmshutdown"},"status":{"type":"string","description":"Status of the task","example":"OK"},"startedAt":{"type":"integer","description":"Unix timestamp when the task started","example":1625251200000},"endedAt":{"type":"integer","description":"Unix timestamp when the task ended or null if not ended","example":1625254800000,"nullable":true}}}}}}},"404":{"description":"VPS not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Get Tasks","description":"Get VPS tasks"}},"/api/services":{"get":{"tags":["User"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true}],"responses":{"200":{"description":"List of services for the current user","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the service","example":1},"productId":{"type":"integer","description":"Product ID associated with the service","example":123},"groupId":{"type":"integer","nullable":true,"description":"Group ID of the service, if applicable","example":456},"name":{"type":"string","description":"Name of the service","example":"Dedicated Server - i7-7700"},"rawName":{"type":"string","description":"Raw name of the service without any modifications","example":"Dedicated Server - i7-7700"},"nameWithoutGroupName":{"type":"string","description":"Name of the service without the group name prefix","example":"i7-7700"},"domain":{"type":"string","description":"Domain associated with the service","example":"abcdefgh.nodesty.com"},"firstPaymentAmount":{"type":"number","description":"Amount charged for the first payment","example":100},"recurringAmount":{"type":"number","description":"Recurring amount charged for the service","example":50},"billingCycle":{"type":"string","enum":["Monthly","Quarterly","Semi-Annually","Annually","Biennially","Triennially"],"description":"Billing cycle for the service","example":"Monthly"},"nextDueDate":{"type":"integer","format":"date-time","description":"Unix timestamp of the next due date for payment","example":1704067200000},"status":{"type":"string","enum":["Pending","Active","Suspended","Terminated","Completed","Cancelled","Fraud"],"description":"Current status of the service","example":"Active"},"username":{"type":"string","nullable":true,"description":"Username associated with the service","example":"user123"},"password":{"type":"string","nullable":true,"description":"Password associated with the service","example":"securepassword123"},"vpsId":{"type":["number","null"],"description":"VPS ID if applicable, otherwise null","example":12345},"dedicatedId":{"type":["string","null"],"description":"Dedicated server ID if applicable, otherwise null","example":["s100","28572"]},"isVPS":{"type":"boolean","description":"Indicates if the service is a Virtual Server","example":true},"isWebHosting":{"type":"boolean","description":"Indicates if the service is web hosting","example":false},"isDedicated":{"type":"boolean","description":"Indicates if the service is a dedicated server","example":true},"isMailHosting":{"type":"boolean","description":"Indicates if the service is mail hosting","example":false},"dedicatedServerLocation":{"type":["string","null"],"description":"Location code of the dedicated server if applicable, otherwise null","example":"FRA","enum":["FRA","USA"]},"addons":{"type":"array","description":"List of addons associated with the service","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the addon","example":"2x IPv4 Addresses"},"recurringAmount":{"type":"number","description":"Recurring amount for the addon","example":10},"billingCycle":{"type":"string","enum":["Monthly","Quarterly","Semi-Annually","Annually","Biennially","Triennially"],"description":"Billing cycle for the addon","example":"Monthly"},"status":{"type":"string","enum":["Pending","Active","Suspended","Terminated","Completed","Cancelled","Fraud"],"description":"Current status of the addon","example":"Active"},"registerDate":{"type":"integer","format":"date-time","description":"Unix timestamp of the registration date for the addon","example":1704067200000},"nextDueDate":{"type":"integer","format":"date-time","description":"Unix timestamp of the next due date for the addon","example":1704067200000}}}},"features":{"type":"array","description":"List of features associated with the service","items":{"type":"string"},"example":["Unlimited Bandwidth","24/7 Support","Free SSL Certificate"]},"ips":{"type":"array","description":"List of IP addresses associated with the service","items":{"type":"string"},"example":["192.168.1.1","192.168.1.2"]},"teamId":{"type":["number","null"],"description":"Team ID if the service is associated with a team, otherwise null","example":789},"owner":{"type":"boolean","description":"Indicates if the current user is the owner of the service","example":true},"suspensionReason":{"type":["string","null"],"description":"Suspension reason if the service is suspended, otherwise null","example":"Abuse report #1234"}}}}}}},"summary":"Get Services","description":"Get the current user services"}},"/api/store/{groupId}/{productId}/order":{"post":{"tags":["Billing"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"groupId","description":"Group ID","required":true,"schema":{"type":"string","example":"14"}},{"in":"path","name":"productId","description":"Product ID","required":true,"schema":{"type":"string","example":"197"}}],"responses":{"200":{"description":"The new invoice ID","content":{"application/json":{"schema":{"type":"object","properties":{"invoiceId":{"type":"integer","description":"Invoice ID for the new order"}}}}}}},"summary":"Add Order","description":"Add a new order","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name for the web/mail hosting order","example":"example.com","nullable":true},"promoCode":{"type":"string","description":"Promo code","example":"PROMOCODE","nullable":true},"options":{"type":"object","description":"Configuration options","additionalProperties":{"type":"number","description":"Config option value"},"example":{"10":80},"nullable":true},"billingCycle":{"type":"string","description":"Billing cycle","enum":["Monthly","Quarterly","Semi-Annually","Annually"]}}}}}}}},"/api/store/{groupId}":{"get":{"tags":["Billing"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"groupId","description":"Group ID","required":true,"schema":{"type":"string","example":"14"}}],"responses":{"200":{"description":"List of products in the group","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Product ID"},"groupId":{"type":"integer","description":"Group ID"},"type":{"type":"string","description":"Product type"},"name":{"type":"string","description":"Product name"},"stockControl":{"type":"boolean","description":"Stock control"},"stockLevel":{"type":"integer","description":"Stock level"},"pricing":{"type":"object","description":"Product pricing"},"features":{"type":"array","items":{"type":"string"},"description":"Product features"},"options":{"type":"array","items":{"type":"object"},"description":"Product options"}}}}}}}},"summary":"Get Products by Group ID","description":"Get all products by group ID"}},"/api/store/groups":{"get":{"tags":["Billing"],"parameters":[],"responses":{"200":{"description":"Store Groups","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"Group ID","example":14},"name":{"type":"string","description":"Group Name","example":"Sanal Sunucu (Ryzen 9 9950x)"}}}}}}}},"summary":"Get Store Groups","description":"Get all products groups"}},"/api/users/@me":{"get":{"tags":["User"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true}],"responses":{"200":{"description":"Current user information","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the user","example":"12345"},"firstName":{"type":"string","description":"User's first name","example":"John"},"lastName":{"type":"string","description":"User's last name","example":"Doe"},"fullName":{"type":"string","description":"User's full name","example":"John Doe"},"email":{"type":"string","description":"User's email address","example":"john.doe@example.com"},"country":{"type":"string","description":"User's country","example":"US"},"city":{"type":"string","description":"User's city","example":"New York"},"state":{"type":"string","description":"User's state","example":"NY"},"address":{"type":"string","description":"User's address","example":"123 Main St"},"postCode":{"type":"string","description":"User's postal code","example":"10001"},"currency":{"type":"string","description":"User's currency","example":"USD"},"currencySymbol":{"type":"string","description":"Symbol for the user's currency","example":"$"},"phoneNumber":{"type":"string","description":"User's phone number in international format","example":"+1 1234567890"},"banStatus":{"type":"string","enum":["BANNED_AND_CANNOT_CREATE_TICKETS","BANNED_BUT_CAN_CREATE_TICKETS","NOT_BANNED"],"description":"The ban status of the user","example":"NOT_BANNED"},"currentSessionId":{"type":"string","description":"ID of the user's current session","example":"abcdef123456"},"totpEnabled":{"type":"boolean","description":"Whether TOTP (Authentication App) is enabled for the user","example":true},"stats":{"type":"object","description":"User statistics","properties":{"activeServices":{"type":"integer","description":"Number of active services for the user","example":5},"unpaidInvoices":{"type":"integer","description":"Number of unpaid invoices for the user","example":2},"balance":{"type":"number","description":"User's account balance","example":150.75,"format":"float"},"activeTickets":{"type":"integer","description":"Number of active support tickets for the user","example":1}}},"companyName":{"type":"string","description":"User's company name, if applicable","example":"Example Corp","nullable":true},"taxId":{"type":"string","description":"User's tax identification number, if applicable","example":"TAX123456","nullable":true}}}}}}},"summary":"Get Current User","description":"Get the current user information"}},"/api/users/@me/invoices/{id}":{"get":{"tags":["User"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Invoice ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"200":{"description":"Invoice details for the specified ID","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the invoice","example":1},"date":{"type":"integer","description":"Unix timestamp of the invoice creation date","example":1700000000000,"format":"date-time"},"dueDate":{"type":"integer","description":"Unix timestamp of the invoice due date","example":1700000000000,"format":"date-time"},"datePaid":{"type":"integer","description":"Unix timestamp of the invoice payment date, null if not paid","example":1700000000000,"format":"date-time","nullable":true},"subTotal":{"type":"number","description":"Subtotal amount of the invoice","example":100},"total":{"type":"number","description":"Total amount of the invoice","example":120},"status":{"type":"string","description":"Status of the invoice","example":"Unpaid","enum":["Draft","Paid","Unpaid","Overdue","Cancelled","Refunded","Payment Pending"]},"appliedBalance":{"type":"number","description":"Balance applied to the invoice","example":20},"isServiceInvoice":{"type":"boolean","description":"Whether the invoice is for a service or an add funds invoice","example":true},"items":{"type":"array","description":"List of items in the invoice","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the invoice item","example":1},"type":{"type":"string","description":"Type of the invoice item","example":"Hosting"},"description":{"type":"string","description":"Description of the invoice item","example":"Web Hosting Service"},"amount":{"type":"number","description":"Amount for the invoice item","example":10}}}}}}}}}},"summary":"Get Invoice","description":"Get the current user invoice by ID"}},"/api/users/@me/invoices/{id}/pay":{"post":{"tags":["Billing"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true},{"in":"path","name":"id","description":"Invoice ID","required":true,"schema":{"type":"string","example":"1"}}],"responses":{"200":{"description":"Payment methods for the user","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the payment was successful","example":true},"paymentMethodUsed":{"type":"string","description":"Payment method used","enum":["CARD","BALANCE"],"example":"CARD"},"cardDetails":{"type":"object","description":"Card details used for payment. Only available when `paymentMethodUsed` is `CARD`.","properties":{"id":{"type":"string","description":"Payment method ID","example":"pm_1234567890"},"brand":{"type":"string","description":"Card brand","example":"visa"},"last4":{"type":"string","description":"Last 4 digits of card","example":"4242"}},"nullable":true}}}}}},"400":{"description":"Invalid payment method or insufficient balance","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"summary":"Make Payment","description":"Make a payment for an invoice","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"paymentMethod":{"type":"string","enum":["FIRST_AVAILABLE","CARD","BALANCE"],"default":"FIRST_AVAILABLE"},"cardId":{"type":"string","description":"Card ID to use for payment. Only available when `paymentMethod` is `CARD` or `FIRST_AVAILABLE` and system balance is insufficient","example":"pm_1234567890"}},"required":[]}}}}}},"/api/users/@me/invoices":{"get":{"tags":["User"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true}],"responses":{"200":{"description":"List of invoices for current user","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the invoice","example":1},"date":{"type":"integer","description":"Unix timestamp of the invoice creation date","example":1700000000000,"format":"date-time"},"dueDate":{"type":"integer","description":"Unix timestamp of the invoice due date","example":1700000000000,"format":"date-time"},"datePaid":{"type":"integer","description":"Unix timestamp of the invoice payment date, null if not paid","example":1700000000000,"format":"date-time","nullable":true},"subTotal":{"type":"number","description":"Subtotal amount of the invoice","example":100},"total":{"type":"number","description":"Total amount of the invoice","example":120},"status":{"type":"string","description":"Status of the invoice","example":"Unpaid","enum":["Draft","Paid","Unpaid","Overdue","Cancelled","Refunded","Payment Pending"]},"appliedBalance":{"type":"number","description":"Balance applied to the invoice","example":20},"isServiceInvoice":{"type":"boolean","description":"Whether the invoice is for a service or an add funds invoice","example":true}}}}}}}},"summary":"Get Invoices","description":"Get the current user invoices"}},"/api/users/@me/referral":{"get":{"tags":["User"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true}],"responses":{"200":{"description":"Current user referral code","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Referral code of the user","example":"cmdvq1hjm000008kvmkkk4gb6"},"uses":{"type":"object","properties":{"count":{"type":"integer","description":"Number of times the referral code has been used","example":5},"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"integer","description":"Timestamp of when the referral was used","example":1700000000000},"amount":{"type":"number","description":"Amount earned from the referral use","example":10}}}}}}}}}}}},"summary":"Get Referral Code","description":"Get the current user referral code"}},"/api/users/@me/sessions":{"get":{"tags":["User"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true}],"responses":{"200":{"description":"List of user sessions","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the session"},"ip":{"type":"string","description":"IP address of the session","example":"192.168.1.1"},"location":{"type":"string","description":"Geographical location of the session","example":"New York, USA"},"os":{"type":"string","enum":["Desktop","Mobile"],"description":"Operating system of the session","example":"Desktop"},"platform":{"type":"string","description":"Platform of the session, such as web browser","example":"Chrome"},"lastSeen":{"type":"integer","format":"date-time","description":"Timestamp of the last time the session was active","example":"2023-10-01T12:00:00Z"}}}}}}}},"summary":"Get Sessions","description":"Get the current user sessions"}},"/api/users/@me/stripe/payment-methods":{"get":{"tags":["Billing"],"parameters":[{"in":"header","name":"Authorization","description":"Personal Access Token","schema":{"type":"string","example":"PAT <your_personal_access_token>"},"required":true}],"responses":{"200":{"description":"Current payment methods for the user","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID"},"brand":{"type":"string","description":"Card brand"},"expireMonth":{"type":"integer","description":"Expiration month"},"expireYear":{"type":"integer","description":"Expiration year"},"last4":{"type":"string","description":"Last 4 digits of card number"},"createdAt":{"type":"integer","description":"Created at (Unix timestamp in milliseconds)"},"isDefault":{"type":"boolean","description":"Is default payment method"}}}}}}}},"summary":"Get Payment Methods","description":"Get all payment methods for the current user"}}}}