{"openapi":"3.1.0","info":{"title":"Sitequest API","version":"1.0.0","description":"Manage VPS instances, domains, DNS records, and more via the Sitequest REST API.","contact":{"name":"Sitequest","url":"https://site.quest"}},"servers":[{"url":"https://site.quest/api/v1","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key with `sq_live_` prefix. Create keys in Dashboard > Settings > Security."}},"schemas":{"Error":{"type":"object","required":["error","code","status"],"properties":{"error":{"type":"string","description":"Human-readable error message"},"code":{"type":"string","description":"Machine-readable error code"},"status":{"type":"integer","description":"HTTP status code"}}},"DnsRecord":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string","enum":["A","AAAA","CNAME","ALIAS","MX","SRV","TXT","CAA","NS","TLSA","SSHFP"]},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":"integer"},"priority":{"type":"integer","nullable":true}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier for tracing","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Maximum requests per window","schema":{"type":"string"}},"X-RateLimit-Remaining":{"description":"Remaining requests in window","schema":{"type":"string"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets","schema":{"type":"string"}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Authorization header required","code":"MISSING_AUTH","status":401}}}},"Forbidden":{"description":"API key lacks required scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This API key lacks the required scope(s): vps:manage","code":"INSUFFICIENT_SCOPE","status":403}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"VPS not found","code":"NOT_FOUND","status":404}}}},"RateLimited":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Rate limit exceeded","code":"RATE_LIMITED","status":429}}}},"ProviderError":{"description":"Upstream provider error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Provider error","code":"PROVIDER_ERROR","status":502}}}}}},"tags":[{"name":"General","description":"Health check and service status"},{"name":"VPS","description":"Virtual Private Server management"},{"name":"SSH & SFTP","description":"Remote command execution and file operations"},{"name":"Domains","description":"Domain and DNS management"},{"name":"Orders","description":"Order status and tracking"}],"paths":{"/ping":{"get":{"tags":["General"],"operationId":"ping","summary":"Health check","description":"Confirm authentication and measure response time.","responses":{"200":{"description":"Authenticated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"authenticated":{"type":"boolean","example":true},"key":{"type":"object","properties":{"prefix":{"type":"string","example":"sq_live_a1b2c3d4"},"name":{"type":"string","example":"Production key"},"scopes":{"type":"array","items":{"type":"string"},"example":["vps:read","domains:manage"]}}},"responseTimeMs":{"type":"number","example":45},"timestamp":{"type":"string","format":"date-time"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/vps":{"get":{"tags":["VPS"],"operationId":"listVps","summary":"List VPS instances","description":"Returns all VPS instances accessible to the API key.","responses":{"200":{"description":"VPS list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["running","stopped","error"]},"cores":{"type":"integer"},"mem":{"type":"integer","description":"Memory in GB"},"nvme":{"type":"integer","description":"NVMe storage in GB"},"hdd":{"type":"integer","description":"HDD storage in GB"},"os":{"type":"string"},"datacenter":{"type":"string"},"country":{"type":"string"},"ip":{"type":"string"},"cpuUsage":{"type":"number","nullable":true},"memUsage":{"type":"number","nullable":true},"nvmeUsage":{"type":"number","nullable":true},"hddUsage":{"type":"number","nullable":true},"availability":{"type":"number","nullable":true},"createdAt":{"type":"string","format":"date-time"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/vps/pricing":{"get":{"tags":["VPS"],"operationId":"getVpsPricing","summary":"Get VPS pricing","description":"Returns VPS component sell prices grouped by hostsystem. When resource amounts are provided as query parameters, calculates the total monthly and yearly price for the given configuration. No special scope required.","parameters":[{"name":"hostsystem","in":"query","required":false,"schema":{"type":"string"},"description":"Host system identifier (required for calculation mode)","example":"de_epyc"},{"name":"core","in":"query","required":false,"schema":{"type":"number","minimum":0},"description":"CPU cores"},{"name":"mem","in":"query","required":false,"schema":{"type":"number","minimum":0},"description":"RAM in GB"},{"name":"nvme","in":"query","required":false,"schema":{"type":"number","minimum":0},"description":"NVMe storage in GB"},{"name":"ipv4","in":"query","required":false,"schema":{"type":"number","minimum":0},"description":"Number of IPv4 addresses"},{"name":"backup","in":"query","required":false,"schema":{"type":"number","minimum":0},"description":"Backup slots"},{"name":"network","in":"query","required":false,"schema":{"type":"number","minimum":0},"description":"Network speed in Mbit/s"},{"name":"hdd","in":"query","required":false,"schema":{"type":"number","minimum":0},"description":"Additional HDD storage in GB"},{"name":"currency","in":"query","required":false,"schema":{"type":"string","enum":["EUR","USD"],"default":"EUR"}},{"name":"display","in":"query","required":false,"schema":{"type":"string","enum":["gross","net"],"default":"gross"}}],"responses":{"200":{"description":"Pricing data or calculated configuration total","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Pricing table grouped by hostsystem, or calculated configuration breakdown"}}}}}},"400":{"description":"Invalid parameter or missing hostsystem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Hostsystem not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/vps/create":{"post":{"tags":["VPS"],"operationId":"createVps","summary":"Create a VPS","description":"Provision a new VPS. Creates an order, charges the saved payment mandate, and starts server creation. Requires vps:provision scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["hostsystem","os","cores","mem","disk"],"properties":{"hostsystem":{"type":"string","description":"Host system identifier","example":"de_epyc"},"os":{"type":"string","description":"Operating system","example":"ubuntu-24.04"},"cores":{"type":"integer","minimum":1,"description":"CPU cores"},"mem":{"type":"integer","minimum":1,"description":"RAM in GB"},"disk":{"type":"integer","minimum":1,"description":"NVMe storage in GB"},"ips":{"type":"integer","minimum":1,"default":1,"description":"Number of IPv4 addresses"},"backupSlots":{"type":"integer","minimum":0,"default":2,"description":"Backup slots"},"networkSpeed":{"type":"integer","minimum":100,"default":1000,"description":"Network speed in Mbit/s"},"storage":{"type":"integer","description":"Additional HDD storage in GB"},"name":{"type":"string","description":"Display name for the VPS"}}}}}},"responses":{"200":{"description":"VPS provisioning completed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"orderId":{"type":"string"},"orderToken":{"type":"string"},"hostsystem":{"type":"string"},"os":{"type":"string"},"cores":{"type":"integer"},"mem":{"type":"integer","description":"RAM in GB"},"disk":{"type":"integer"},"status":{"type":"string","enum":["completed","payment_pending","payment_failed"]},"paymentId":{"type":"string"}}}}}}}},"202":{"description":"Payment pending — poll order status via GET /orders/{id}"},"400":{"description":"Invalid or missing fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Payment failed or no mandate on file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/vps/{id}":{"get":{"tags":["VPS"],"operationId":"getVps","summary":"Get VPS details","description":"Returns detailed information for a single VPS including live provider data.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"responses":{"200":{"description":"VPS details","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"cores":{"type":"integer"},"mem":{"type":"integer","description":"Memory in GB"},"nvme":{"type":"integer","description":"NVMe storage in GB"},"hdd":{"type":"integer","description":"HDD storage in GB"},"ips":{"type":"integer"},"backupSlots":{"type":"integer"},"networkSpeed":{"type":"integer"},"os":{"type":"string"},"iso":{"type":"string","nullable":true},"datacenter":{"type":"string"},"country":{"type":"string"},"cpuUsage":{"type":"number","nullable":true},"memUsage":{"type":"number","nullable":true},"nvmeUsage":{"type":"number","nullable":true},"hddUsage":{"type":"number","nullable":true},"availability":{"type":"number","nullable":true},"ipv4":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"gateway":{"type":"string"},"rdns":{"type":"string"}}}},"ipv6":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"}}}},"config":{"type":"object"},"liveStatus":{"type":"object"},"createdAt":{"type":"string","format":"date-time"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"tags":["VPS"],"operationId":"deleteVps","summary":"Delete a VPS","description":"Permanently delete a VPS at the provider and remove all associated data. This is irreversible. Requires vps:provision scope and explicit confirmation.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["confirm"],"properties":{"confirm":{"type":"boolean","description":"Must be true to proceed"}}}}}},"responses":{"200":{"description":"VPS deleted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"deleted":{"type":"boolean","example":true}}}}}}}},"400":{"description":"Missing confirmation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/vps/{id}/upgrade":{"post":{"tags":["VPS"],"operationId":"upgradeVps","summary":"Upgrade VPS resources","description":"Upgrade CPU, RAM, disk, or other resources on a VPS. Only upgrades are allowed (new values must be >= current). Requires vps:provision scope.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cores":{"type":"integer","minimum":1,"description":"CPU cores"},"mem":{"type":"integer","minimum":1,"description":"RAM in GB"},"disk":{"type":"integer","minimum":1,"description":"NVMe storage in GB"},"storage":{"type":"integer","minimum":0,"description":"HDD storage in GB"},"backupSlots":{"type":"integer","minimum":0,"description":"Backup slots"},"networkSpeed":{"type":"integer","minimum":100,"description":"Network speed in Mbit/s"}}}}}},"responses":{"200":{"description":"VPS upgraded","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"cores":{"type":"integer"},"mem":{"type":"integer","description":"RAM in GB"},"disk":{"type":"integer"},"backupSlots":{"type":"integer"},"networkSpeed":{"type":"integer"},"changes":{"type":"array","items":{"type":"string"},"description":"Human-readable change descriptions"}}}}}}}},"400":{"description":"Downgrade attempted or no changes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/vps/{id}/monitoring":{"get":{"tags":["VPS"],"operationId":"getVpsMonitoring","summary":"Get VPS monitoring data","description":"Returns CPU, memory, and ping history along with uptime statistics.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"responses":{"200":{"description":"Monitoring data","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"timings":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"cpu":{"type":"number"},"memory":{"type":"number"},"ping":{"type":"number"}}}},"incidents":{"type":"object","properties":{"statistic":{"type":"object"},"incidents":{"type":"array","items":{"type":"object"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/vps/{id}/traffic":{"get":{"tags":["VPS"],"operationId":"getVpsTraffic","summary":"Get VPS traffic data","description":"Returns bandwidth usage and daily traffic log for the current month.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"responses":{"200":{"description":"Traffic data","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"usage":{"type":"object","properties":{"month":{"type":"string"},"inbound":{"type":"integer","description":"Bytes"},"outbound":{"type":"integer","description":"Bytes"},"total":{"type":"integer","description":"Bytes"}}},"log":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"inbound":{"type":"integer"},"outbound":{"type":"integer"},"total":{"type":"integer"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/vps/{id}/power":{"post":{"tags":["VPS"],"operationId":"vpsPower","summary":"Power action","description":"Start, stop, or restart a VPS.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["start","stop","restart"]}}}}}},"responses":{"200":{"description":"Action executed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string"},"success":{"type":"boolean"}}}}}}}},"400":{"description":"Invalid action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/vps/{id}/os":{"post":{"tags":["VPS"],"operationId":"vpsReinstallOs","summary":"Reinstall OS","description":"Reinstall the operating system on a VPS. This is destructive.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["os"],"properties":{"os":{"type":"string","description":"Operating system name"}}}}}},"responses":{"200":{"description":"OS reinstall started","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"os":{"type":"string"},"success":{"type":"boolean"}}}}}}}},"400":{"description":"Invalid OS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/vps/{id}/iso":{"post":{"tags":["VPS"],"operationId":"vpsMountIso","summary":"Mount or unmount ISO","description":"Mount an ISO image on a VPS, or pass `null` to unmount.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["os"],"properties":{"os":{"oneOf":[{"type":"string","description":"ISO name to mount"},{"type":"null","description":"Unmount current ISO"}]}}}}}},"responses":{"200":{"description":"ISO mounted/unmounted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"mounted":{"type":"boolean"},"os":{"type":"string","nullable":true},"success":{"type":"boolean"}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/vps/{id}/reset-password":{"post":{"tags":["VPS"],"operationId":"vpsResetPassword","summary":"Reset root password","description":"Generate a new root password for a VPS.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"responses":{"200":{"description":"New password generated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"password":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/vps/{id}/rename":{"post":{"tags":["VPS"],"operationId":"vpsRename","summary":"Rename VPS","description":"Update the display name of a VPS (local only, does not affect the hosting provider).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":32,"description":"New display name (1-32 characters)"}}}}}},"responses":{"200":{"description":"VPS renamed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string"},"success":{"type":"boolean"}}}}}}}},"400":{"description":"Invalid name (must be 1-32 characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"name must be 1-32 characters","code":"INVALID_NAME","status":400}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/vps/{id}/backups":{"get":{"tags":["VPS"],"operationId":"listBackups","summary":"List backups","description":"List all backups for a VPS.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"responses":{"200":{"description":"Backup list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"backupId":{"type":"string"},"os":{"type":"string"},"description":{"type":"string"},"size":{"type":"integer","description":"Size in bytes"},"created":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["finished","pending"]}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}},"post":{"tags":["VPS"],"operationId":"createBackup","summary":"Create backup","description":"Create a new backup of a VPS.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"responses":{"200":{"description":"Backup created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"backupId":{"type":"string"},"success":{"type":"boolean"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/vps/{id}/backups/{backupId}":{"post":{"tags":["VPS"],"operationId":"restoreBackup","summary":"Restore backup","description":"Restore a backup on a VPS. This will overwrite current data.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"},{"name":"backupId","in":"path","required":true,"schema":{"type":"string"},"description":"Backup ID"}],"responses":{"200":{"description":"Restore started","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"backupId":{"type":"string"},"success":{"type":"boolean"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}},"delete":{"tags":["VPS"],"operationId":"deleteBackup","summary":"Delete backup","description":"Delete a backup from a VPS.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"},{"name":"backupId","in":"path","required":true,"schema":{"type":"string"},"description":"Backup ID"}],"responses":{"200":{"description":"Backup deleted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"backupId":{"type":"string"},"success":{"type":"boolean"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/vps/{id}/firewall":{"get":{"tags":["VPS"],"operationId":"getFirewall","summary":"Get firewall status","description":"Get firewall status, default policies, and current rules for a VPS. Reads via SSH.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"responses":{"200":{"description":"Firewall status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tool":{"type":"string","enum":["ufw","firewalld","windows","none"]},"active":{"type":"boolean"},"defaultIncoming":{"type":"string","enum":["allow","deny","reject"]},"defaultOutgoing":{"type":"string","enum":["allow","deny","reject"]},"rules":{"type":"array","items":{"type":"object","properties":{"port":{"type":"string"},"proto":{"type":"string"},"action":{"type":"string","enum":["allow","deny"]},"direction":{"type":"string","enum":["in","out"]},"source":{"type":"string"},"comment":{"type":"string"}}}},"readViaSSH":{"type":"boolean"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"tags":["VPS"],"operationId":"addFirewallRule","summary":"Add firewall rule","description":"Add a firewall rule to a VPS via SSH.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["port","proto","action"],"properties":{"port":{"type":"string","description":"Port or port range (e.g. '80', '8000:8100')"},"proto":{"type":"string","enum":["tcp","udp","both"]},"action":{"type":"string","enum":["allow","deny"]},"source":{"type":"string","description":"Source IP/CIDR or 'any' (default: 'any')"},"comment":{"type":"string","description":"Optional comment"}}}}}},"responses":{"200":{"description":"Rule added","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"port":{"type":"string"},"proto":{"type":"string"},"action":{"type":"string"},"source":{"type":"string"},"success":{"type":"boolean"}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}},"put":{"tags":["VPS"],"operationId":"toggleFirewall","summary":"Enable or disable firewall","description":"Toggle the firewall on or off for a VPS. When enabling, the SSH port is automatically allowed.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Firewall toggled","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"enabled":{"type":"boolean"},"success":{"type":"boolean"}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/vps/{id}/firewall/{ruleId}":{"delete":{"tags":["VPS"],"operationId":"deleteFirewallRule","summary":"Remove firewall rule","description":"Remove a firewall rule from a VPS. The ruleId is formatted as 'port-proto-action' (e.g. '80-tcp-allow'). Use the source query parameter to specify the source IP (defaults to 'any').","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"},{"name":"ruleId","in":"path","required":true,"schema":{"type":"string"},"description":"Rule identifier: port-proto-action (e.g. '80-tcp-allow')"},{"name":"source","in":"query","required":false,"schema":{"type":"string","default":"any"},"description":"Source IP/CIDR for the rule"}],"responses":{"200":{"description":"Rule removed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"port":{"type":"string"},"proto":{"type":"string"},"action":{"type":"string"},"source":{"type":"string"},"success":{"type":"boolean"}}}}}}}},"400":{"description":"Invalid ruleId format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/vps/{id}/exec":{"post":{"tags":["SSH & SFTP"],"operationId":"execCommand","summary":"Execute SSH command","description":"Run a one-shot SSH command on a VPS. Max command length 8192 chars, max timeout 300 s.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["command"],"properties":{"command":{"type":"string","maxLength":8192},"timeout":{"type":"integer","minimum":1,"maximum":300,"default":30,"description":"Timeout in seconds"}}}}}},"responses":{"200":{"description":"Command result","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"exitCode":{"type":"integer"},"stdout":{"type":"string"},"stderr":{"type":"string"},"durationMs":{"type":"integer"}}}}}}}},"400":{"description":"Invalid command or timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"408":{"description":"Command timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"SSH connection or auth error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vps/{id}/sftp/list":{"get":{"tags":["SSH & SFTP"],"operationId":"sftpList","summary":"List directory contents","description":"List files and directories at a given path on a VPS via SFTP. Requires scope: vps:manage.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"},{"name":"path","in":"query","required":true,"schema":{"type":"string"},"description":"Absolute directory path","example":"/var/log"}],"responses":{"200":{"description":"Directory listing","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"isDirectory":{"type":"boolean"},"size":{"type":"integer"},"modifiedAt":{"type":"string"}}}}}}}}}}},"400":{"description":"Missing or invalid path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"408":{"description":"Timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"SSH error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vps/{id}/sftp/read":{"get":{"tags":["SSH & SFTP"],"operationId":"sftpRead","summary":"Read file content","description":"Read file content from a VPS via SFTP. Max file size 10 MB. Requires scope: vps:manage.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"},{"name":"path","in":"query","required":true,"schema":{"type":"string"},"description":"Absolute file path","example":"/etc/hostname"},{"name":"encoding","in":"query","required":false,"schema":{"type":"string","enum":["utf8","base64"],"default":"utf8"},"description":"Response encoding"}],"responses":{"200":{"description":"File content","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"path":{"type":"string"},"content":{"type":"string"},"encoding":{"type":"string","enum":["utf8","base64"]},"size":{"type":"integer"}}}}}}}},"400":{"description":"Missing or invalid path/encoding","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"408":{"description":"Timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File exceeds 10 MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"SSH error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vps/{id}/sftp/write":{"put":{"tags":["SSH & SFTP"],"operationId":"sftpWrite","summary":"Write file content","description":"Write content to a file on a VPS via SFTP. Max content size 10 MB. Parent directories are created automatically. Requires scope: vps:manage.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["path","content"],"properties":{"path":{"type":"string","description":"Absolute file path"},"content":{"type":"string","description":"File content"},"encoding":{"type":"string","enum":["utf8","base64"],"default":"utf8","description":"Content encoding"}}}}}},"responses":{"200":{"description":"File written","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"path":{"type":"string"},"size":{"type":"integer"}}}}}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"408":{"description":"Timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Content exceeds 10 MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"SSH error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vps/{id}/ssh/security":{"get":{"tags":["SSH & SFTP"],"operationId":"sshSecurityStatus","summary":"Get SSH security status","description":"Read SSH security settings from a VPS including password authentication, HMAC algorithms, banner visibility, post-quantum key exchange, and legacy cipher status.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"responses":{"200":{"description":"SSH security status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"passwordAuth":{"type":"boolean"},"sha1HmacEnabled":{"type":"boolean"},"bannerHidden":{"type":"boolean"},"bannerSupported":{"type":"boolean"},"postQuantumKexEnabled":{"type":"boolean"},"legacyCiphersEnabled":{"type":"boolean"},"postQuantumSupported":{"type":"boolean"},"opensshVersion":{"type":"string"},"opensshPackageVersion":{"type":"string"},"opensshLatestAvailable":{"type":"string"},"updateAvailable":{"type":"boolean"},"readViaSSH":{"type":"boolean"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"put":{"tags":["SSH & SFTP"],"operationId":"sshSecurityUpdate","summary":"Update SSH security setting","description":"Toggle an SSH security setting on a VPS. When SSH is unreachable, set `useHypervisor: true` with `setting: \"passwordAuth\"` to apply the change via the hypervisor API.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"VPS ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["setting","enabled"],"properties":{"setting":{"type":"string","enum":["passwordAuth","sha1Hmac","bannerHidden","postQuantumKex","legacyCiphers"],"description":"The SSH security setting to change"},"enabled":{"type":"boolean","description":"Whether to enable or disable the setting"},"useHypervisor":{"type":"boolean","description":"When true and setting is passwordAuth, applies via the hypervisor API (no SSH needed)"}}}}}},"responses":{"200":{"description":"Setting updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"setting":{"type":"string"},"enabled":{"type":"boolean"},"appliedVia":{"type":"string","enum":["ssh","hypervisor"]}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/domains":{"get":{"tags":["Domains"],"operationId":"listDomains","summary":"List domains","description":"Returns all domains accessible to the API key.","responses":{"200":{"description":"Domain list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tld":{"type":"string"},"sld":{"type":"string"},"status":{"type":"string"},"terminated":{"type":"boolean"},"autoRenew":{"type":"boolean"},"isLocked":{"type":"boolean"},"isPrivacyEnabled":{"type":"boolean"},"isDnssecEnabled":{"type":"boolean"},"dnsRecordCount":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/domains/pricing":{"get":{"tags":["Domains"],"operationId":"getDomainPricing","summary":"Get domain pricing","description":"Returns domain TLD sell prices. When a domain is provided, also checks availability and returns premium info. No special scope required.","parameters":[{"name":"tld","in":"query","required":false,"schema":{"type":"string"},"description":"Single TLD lookup (e.g. com)","example":"com"},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Full domain to check pricing and availability","example":"example.com"},{"name":"currency","in":"query","required":false,"schema":{"type":"string","enum":["EUR","USD"],"default":"EUR"}},{"name":"display","in":"query","required":false,"schema":{"type":"string","enum":["gross","net"],"default":"gross"}}],"responses":{"200":{"description":"Pricing data","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"object","description":"Single TLD or domain result","properties":{"tld":{"type":"string"},"price":{"type":"number"},"domain":{"type":"string"},"available":{"type":"boolean"},"premium":{"type":"boolean"},"premiumFee":{"type":"number","nullable":true}}},{"type":"array","description":"All TLDs","items":{"type":"object","properties":{"tld":{"type":"string"},"price":{"type":"number"}}}}]},"currency":{"type":"string"},"display":{"type":"string"},"count":{"type":"integer","description":"Number of TLDs (list mode only)"}}}}}},"400":{"description":"Invalid domain format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"TLD not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/domains/check":{"post":{"tags":["Domains"],"operationId":"checkDomain","summary":"Check domain availability","description":"Check whether a domain is available for registration. Supports single domain or multi-TLD batch check. No special scope required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string","description":"Full domain (e.g. example.com) or base name for multi-TLD mode"},"tlds":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"TLDs to check (multi-TLD mode). Max 20."},"currency":{"type":"string","enum":["EUR","USD"],"default":"EUR"},"display":{"type":"string","enum":["gross","net"],"default":"gross"}}}}}},"responses":{"200":{"description":"Availability result","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"object","description":"Single domain result","properties":{"domain":{"type":"string"},"tld":{"type":"string"},"available":{"type":"boolean"},"price":{"type":"number","nullable":true},"premium":{"type":"boolean"},"premiumFee":{"type":"number","nullable":true}}},{"type":"array","description":"Multi-TLD results","items":{"type":"object","properties":{"domain":{"type":"string"},"tld":{"type":"string"},"available":{"type":"boolean"},"price":{"type":"number","nullable":true},"premium":{"type":"boolean"},"premiumFee":{"type":"number","nullable":true}}}}]},"currency":{"type":"string"},"display":{"type":"string"}}}}}},"400":{"description":"Invalid domain or too many TLDs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/domains/register":{"post":{"tags":["Domains"],"operationId":"registerDomain","summary":"Register a domain","description":"Register a new domain. Creates an order, charges the saved payment mandate, and provisions the domain. Requires domains:provision scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string","description":"Domain to register","example":"example.com"},"period":{"type":"integer","minimum":1,"default":1,"description":"Registration period in years"},"nameservers":{"type":"array","items":{"type":"string"},"description":"Custom nameservers"},"whoisPrivacy":{"type":"boolean","description":"Enable WHOIS privacy"}}}}}},"responses":{"200":{"description":"Domain registration completed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"orderId":{"type":"string"},"orderToken":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string","enum":["completed","payment_pending","payment_failed"]},"paymentId":{"type":"string"}}}}}}}},"202":{"description":"Payment pending — poll order status via GET /orders/{id}"},"400":{"description":"Invalid domain or missing fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Payment failed or no mandate on file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/domains/transfer":{"post":{"tags":["Domains"],"operationId":"transferDomain","summary":"Transfer a domain","description":"Transfer an existing domain to Sitequest. Creates an order, charges the saved payment mandate, and initiates the transfer. Requires domains:provision scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain","authCode"],"properties":{"domain":{"type":"string","description":"Domain to transfer","example":"example.com"},"authCode":{"type":"string","description":"Transfer authorization code from current registrar"},"period":{"type":"integer","minimum":1,"default":1,"description":"Registration period in years"}}}}}},"responses":{"200":{"description":"Domain transfer initiated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"orderId":{"type":"string"},"orderToken":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string","enum":["completed","payment_pending","payment_failed"]},"paymentId":{"type":"string"}}}}}}}},"202":{"description":"Payment pending — poll order status via GET /orders/{id}"},"400":{"description":"Invalid domain or missing auth code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Payment failed or no mandate on file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/domains/{id}":{"get":{"tags":["Domains"],"operationId":"getDomain","summary":"Get domain details","description":"Returns detailed domain info including DNS records and registrar data.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain ID"}],"responses":{"200":{"description":"Domain details","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tld":{"type":"string"},"sld":{"type":"string"},"status":{"type":"string"},"terminated":{"type":"boolean"},"autoRenew":{"type":"boolean"},"isLocked":{"type":"boolean"},"isPrivacyEnabled":{"type":"boolean"},"isDnssecEnabled":{"type":"boolean"},"nameservers":{"type":"array","items":{"type":"string"}},"dnsRecords":{"type":"array","items":{"$ref":"#/components/schemas/DnsRecord"}},"registrar":{"type":"object"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"tags":["Domains"],"operationId":"deleteDomain","summary":"Cancel a domain","description":"Cancel a domain at the registrar and mark it as terminated. This is irreversible. Requires domains:provision scope and explicit confirmation.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["confirm"],"properties":{"confirm":{"type":"boolean","description":"Must be true to proceed"}}}}}},"responses":{"200":{"description":"Domain cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"terminated":{"type":"boolean","example":true}}}}}}}},"400":{"description":"Missing confirmation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/domains/{id}/dns":{"get":{"tags":["Domains"],"operationId":"listDnsRecords","summary":"List DNS records","description":"Returns all DNS records for a domain.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain ID"}],"responses":{"200":{"description":"DNS record list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DnsRecord"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"tags":["Domains"],"operationId":"addDnsRecord","summary":"Add DNS record","description":"Create a new DNS record for a domain.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","name","ttl","data"],"properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","ALIAS","MX","SRV","TXT","CAA","NS","TLSA","SSHFP"]},"name":{"type":"string","description":"Record name (e.g. www, @)"},"ttl":{"type":"integer","minimum":60,"description":"TTL in seconds"},"data":{"type":"string","description":"Record value"}}}}}},"responses":{"200":{"description":"Record created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}},"400":{"description":"Invalid record data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/domains/{id}/dns/{recordId}":{"put":{"tags":["Domains"],"operationId":"updateDnsRecord","summary":"Update DNS record","description":"Update the value of an existing DNS record.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain ID"},{"name":"recordId","in":"path","required":true,"schema":{"type":"integer"},"description":"DNS record ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"string","description":"New record value"}}}}}},"responses":{"200":{"description":"Record updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}},"delete":{"tags":["Domains"],"operationId":"deleteDnsRecord","summary":"Delete DNS record","description":"Remove a DNS record from a domain.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain ID"},{"name":"recordId","in":"path","required":true,"schema":{"type":"integer"},"description":"DNS record ID"}],"responses":{"200":{"description":"Record deleted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}},"400":{"description":"Invalid record ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/domains/{id}/nameservers":{"put":{"tags":["Domains"],"operationId":"updateNameservers","summary":"Update nameservers","description":"Set nameservers for a domain. Requires at least ns1 and ns2.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ns1","ns2"],"properties":{"ns1":{"type":"string"},"ns2":{"type":"string"},"ns3":{"type":"string"},"ns4":{"type":"string"},"ns5":{"type":"string"}}}}}},"responses":{"200":{"description":"Nameservers updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"400":{"description":"Invalid nameservers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/domains/{id}/transfer-lock":{"put":{"tags":["Domains"],"operationId":"setTransferLock","summary":"Set transfer lock","description":"Enable or disable transfer lock on a domain.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["locked"],"properties":{"locked":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Transfer lock updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"locked":{"type":"boolean"},"success":{"type":"boolean"}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/domains/{id}/whois-privacy":{"put":{"tags":["Domains"],"operationId":"setWhoisPrivacy","summary":"Set WHOIS privacy","description":"Enable or disable WHOIS privacy for a domain.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"WHOIS privacy updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"enabled":{"type":"boolean"},"success":{"type":"boolean"}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/domains/{id}/dnssec":{"put":{"tags":["Domains"],"operationId":"setDnssec","summary":"Set DNSSEC","description":"Enable or disable DNSSEC for a domain.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"DNSSEC updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"enabled":{"type":"boolean"},"success":{"type":"boolean"}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/domains/{id}/authcode":{"get":{"tags":["Domains"],"operationId":"getAuthcode","summary":"Get auth code","description":"Retrieve the transfer authorization code for a domain.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain ID"}],"responses":{"200":{"description":"Auth code","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"authcode":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ProviderError"}}}},"/orders/{id}":{"get":{"tags":["Orders"],"operationId":"getOrder","summary":"Get order status","description":"Retrieve the status and details of a provisioning order. The id parameter accepts either the order ID or order token. Scope required depends on order type: vps:provision for VM orders, domains:provision for domain orders.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Order ID or token"}],"responses":{"200":{"description":"Order details","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"token":{"type":"string"},"status":{"type":"string"},"type":{"type":"string","enum":["VM","DOMAIN"]},"channel":{"type":"string"},"totalNet":{"type":"number"},"totalGross":{"type":"number"},"currency":{"type":"string"},"interval":{"type":"string"},"provisionedResourceId":{"type":"string","nullable":true},"provisionedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}}}}