{
  "openapi": "3.0.3",
  "info": {
    "title": "InstantNode PAT API",
    "version": "1.3.0",
    "description": "The **Personal Access Token (PAT) API** is the single API surface for your InstantNode account. It operates strictly on the token owner's own resources - read your services, control power, provision and manage vServers, game servers, Discord bots, webspaces and domains, run and schedule backups, manage host firewall rules, and read billing history.\n\n**Base URL:** `https://instantnode.eu/api/pat`  •  **Auth:** `Authorization: Bearer inpat_...`  •  JSON in, JSON out; every response carries an `ok` boolean.\n\n**Retired:** the old reseller API (`/api/resell`) now returns `410 Gone` - PATs are the single API surface.\n\n**Poll politely:** at most once per 30 seconds per endpoint; excessive polling may be rate-limited (`429`).\n\n**Panel-only surfaces** return `403 not_available_via_api` by design (account-security / abuse boundaries): the file manager, console/VNC access, live SSE streams, sharing/manager management, server **deletion** (servers always run to the end of the paid billing period - cancel by disabling auto-renew), secret-token rotation, and payments/top-ups.\n\n**Compatibility:** breaking changes ship under a new version prefix; additive fields may appear within `v1` at any time - ignore unknown fields.",
    "contact": {
      "name": "InstantNode",
      "url": "https://instantnode.eu/contact"
    }
  },
  "servers": [
    {
      "url": "https://instantnode.eu/api/pat"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Services & power",
      "description": "See what you host and switch it on and off."
    },
    {
      "name": "Provisioning",
      "description": "Create and manage vServers from code - same pipeline, pricing and balance checks as the panel."
    },
    {
      "name": "Backups",
      "description": "List, run, schedule and restore backups - up to 3 kept per server."
    },
    {
      "name": "Firewall",
      "description": "Host-level firewall rules, up to 50 per server."
    },
    {
      "name": "Game servers",
      "description": "Provision, control, update and mod game servers."
    },
    {
      "name": "Bots",
      "description": "Provision and manage Discord bot hosting."
    },
    {
      "name": "Webspaces",
      "description": "Managed web hosting."
    },
    {
      "name": "Domains",
      "description": "Register domains, manage DNS and nameservers."
    },
    {
      "name": "Billing & account",
      "description": "Read billing history and maintain your profile."
    }
  ],
  "paths": {
    "/v1/services": {
      "get": {
        "tags": [
          "Services & power"
        ],
        "summary": "List all your services",
        "description": "A single flat inventory of everything the token owner hosts: vServers/containers, game servers, Discord bots and webspaces, each with its current status. Ideal as the entry point for a dashboard or bot. Status is the last known state; call the per-resource detail endpoint for a live power state.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "containers": [
                    {
                      "id": "6f1c…",
                      "name": "web01",
                      "type": "kvm",
                      "status": "running",
                      "ipv4": "94.249.230.10"
                    }
                  ],
                  "gameservers": [
                    {
                      "id": "a2…",
                      "name": "Minecraft",
                      "game": "minecraft",
                      "status": "running",
                      "address": "94.249.230.122:25565"
                    }
                  ],
                  "bots": [
                    {
                      "id": "b3…",
                      "name": "MyBot",
                      "status": "running",
                      "runtime": "nodejs"
                    }
                  ],
                  "webspaces": [
                    {
                      "id": "c4…",
                      "name": "my-site",
                      "status": "active"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/balance": {
      "get": {
        "tags": [
          "Services & power"
        ],
        "summary": "Get account balance",
        "description": "Your current InstantNode balance in EUR. Check before provisioning - creation is charged from this balance.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "balance": 42.5
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/{action}": {
      "post": {
        "tags": [
          "Services & power"
        ],
        "summary": "Power control a vServer",
        "description": "Start, stop or restart one of your vServers (KVM/LXC/VDS/Windows/Storage). `action` is one of `start`, `stop`, `restart`. A suspended server returns 403.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          },
          {
            "name": "action",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "start",
                "stop",
                "restart"
              ]
            },
            "description": "Power action."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "message": "Container restarted"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/{action}": {
      "post": {
        "tags": [
          "Services & power"
        ],
        "summary": "Power control a game server",
        "description": "Start, stop or restart one of your game servers. Same actions as containers.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          },
          {
            "name": "action",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "start",
                "stop",
                "restart"
              ]
            },
            "description": "Power action."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "message": "Gameserver started"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bots/{id}/{action}": {
      "post": {
        "tags": [
          "Services & power"
        ],
        "summary": "Power control a Discord bot",
        "description": "Start, stop or restart one of your Discord bots.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          },
          {
            "name": "action",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "start",
                "stop",
                "restart"
              ]
            },
            "description": "Power action."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "status": "running"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/create-options": {
      "get": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Provisioning presets & OS templates",
        "description": "Valid plan presets and OS templates for provisioning a vServer. VDS plans come with dedicated, pinned CPU cores. Pass the returned `template` value and a preset id when creating.",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "kvm",
                "vds",
                "windows-kvm",
                "storage",
                "lxc"
              ],
              "default": "kvm"
            },
            "description": "Product family."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "type": "kvm",
                  "presets": [
                    {
                      "id": "loki",
                      "cpu": 2,
                      "ram": 4,
                      "disk": 40,
                      "monthly": 7.99
                    }
                  ],
                  "templates": [
                    {
                      "template": "9034",
                      "name": "Ubuntu-24.04"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers": {
      "get": {
        "tags": [
          "Provisioning"
        ],
        "summary": "List your vServers",
        "description": "All vServers on the account with their stored state.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "containers": [
                    {
                      "id": "6f1c…",
                      "hostname": "web01",
                      "status": "running",
                      "virtType": "kvm",
                      "category": "kvm",
                      "ipv4": "94.249.230.10",
                      "cpu": 2,
                      "ram": 4096,
                      "disk": 40,
                      "autoRenew": true,
                      "hasRootPassword": true
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Provision a vServer",
        "description": "Create a server through the exact same pipeline, pricing and balance checks as the panel (presets only). The cost is charged to your balance. Returns 402 `insufficient_balance` (with `required`) or 409 `profile_incomplete` if billing details are missing.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "virtType": {
                    "type": "string",
                    "enum": [
                      "kvm",
                      "vds",
                      "windows-kvm",
                      "storage",
                      "lxc"
                    ]
                  },
                  "preset": {
                    "type": "string",
                    "description": "Preset id from create-options."
                  },
                  "template": {
                    "type": "string",
                    "description": "OS template id/volid from create-options."
                  },
                  "hostname": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string",
                    "description": "Root password (min 8)."
                  },
                  "billingCycle": {
                    "type": "string",
                    "enum": [
                      "hourly",
                      "monthly"
                    ],
                    "default": "monthly"
                  }
                },
                "required": [
                  "virtType",
                  "preset",
                  "template"
                ]
              },
              "example": {
                "virtType": "kvm",
                "preset": "loki",
                "template": "9034",
                "hostname": "api-test-01",
                "password": "S3cure-Pass!",
                "billingCycle": "monthly"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "container": {
                    "id": "6f1c…",
                    "hostname": "api-test-01",
                    "status": "installing",
                    "virtType": "kvm",
                    "category": "kvm",
                    "ipv4": "94.249.230.11",
                    "cpu": 2,
                    "ram": 4096,
                    "disk": 40,
                    "autoRenew": true,
                    "hasRootPassword": true
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}": {
      "get": {
        "tags": [
          "Provisioning"
        ],
        "summary": "vServer detail",
        "description": "Full detail including the LIVE power state (polled from the hypervisor). `hasRootPassword` tells you whether a root password is stored; the plaintext is never in this payload - reveal it deliberately via `/root-password`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "container": {
                    "id": "6f1c…",
                    "hostname": "web01",
                    "displayName": null,
                    "status": "running",
                    "virtType": "kvm",
                    "category": "kvm",
                    "ipv4": "94.249.230.10",
                    "cpu": 2,
                    "ram": 4096,
                    "disk": 40,
                    "hourlyRate": 0.011,
                    "autoRenew": true,
                    "hasRootPassword": true,
                    "createdAt": "2026-08-01T12:00:00.000Z"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/stats": {
      "get": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Live resource usage",
        "description": "Live CPU / memory / disk / network usage for the server, read from the hypervisor.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "status": {
                    "status": "running",
                    "cpu": 0.03,
                    "mem": 1073741824,
                    "maxmem": 4294967296,
                    "disk": 8589934592,
                    "maxdisk": 42949672960,
                    "netin": 1440595042,
                    "netout": 3508012905
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/guest": {
      "get": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Guest agent info",
        "description": "Information reported by the QEMU guest agent (interfaces, addresses) when the agent is running inside the guest.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "guest": {
                    "addresses": [
                      {
                        "interface": "eth0",
                        "address": "94.249.230.10",
                        "family": "ipv4"
                      }
                    ]
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/auto-renew": {
      "post": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Set auto-renew (cancel a server)",
        "description": "Servers cannot be deleted via the API (or the panel) - they always run until the end of the paid billing period. Disabling auto-renew IS the cancellation: the billing cron expires the server once the paid runtime is over. Re-enable any time before expiry to keep it.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled"
                ]
              },
              "example": {
                "enabled": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "autoRenew": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/extend": {
      "post": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Extend runtime",
        "description": "Charge your balance and extend the paid runtime by N billing cycles.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cycles": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 1
                  }
                }
              },
              "example": {
                "cycles": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "chargeAmount": 7.99,
                  "nextBillingDate": "2026-10-01T12:00:00.000Z"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/reinstall-data": {
      "get": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Reinstall options",
        "description": "The templates/options available for reinstalling this server, to build a reinstall request.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "templates": [
                    {
                      "template": "9034",
                      "name": "Ubuntu-24.04"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/reinstall": {
      "post": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Reinstall the OS (destructive)",
        "description": "DESTRUCTIVE. Wipes the server and reinstalls it from the chosen template. All data is lost.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "template": "9034",
                "password": "S3cure-Pass!"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "status": "installing"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/reset": {
      "post": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Reset the server (destructive)",
        "description": "DESTRUCTIVE. Resets the server to a clean state of its current OS. All data is lost.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "status": "installing"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/upgrade/quote": {
      "get": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Upgrade price quote",
        "description": "A price quote for upgrading the server's resources, before committing.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "presets": [
                    {
                      "id": "thor",
                      "cpu": 4,
                      "ram": 8,
                      "disk": 80,
                      "monthly": 15.99,
                      "priceDelta": 8.0
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/upgrade": {
      "post": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Upgrade resources",
        "description": "Upgrade the server to a larger preset. Charges the prorated difference from your balance.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "preset": {
                    "type": "string"
                  }
                },
                "required": [
                  "preset"
                ]
              },
              "example": {
                "preset": "thor"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "container": {
                    "id": "6f1c…",
                    "cpu": 4,
                    "ram": 8192,
                    "disk": 80
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/ips": {
      "get": {
        "tags": [
          "Provisioning"
        ],
        "summary": "List IP addresses",
        "description": "The IPv4 addresses assigned to this server (primary + any additional).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "ips": [
                    {
                      "address": "94.249.230.10",
                      "primary": true
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/ips/purchase": {
      "post": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Buy an additional IP",
        "description": "Purchase and attach an additional IPv4 address (charged from balance).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "ip": {
                    "address": "94.249.230.55",
                    "primary": false
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/ips/{address}": {
      "delete": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Release an additional IP",
        "description": "Release a previously purchased additional IPv4 address.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          },
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The IPv4 address to release."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/rdns/mark-applied": {
      "post": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Mark rDNS as applied",
        "description": "Acknowledge that a requested reverse-DNS (PTR) change has been applied.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/password": {
      "post": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Change the root password",
        "description": "Set a new root/administrator password on the server itself. This is the server credential, not your account password.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "password": {
                    "type": "string",
                    "minLength": 8
                  }
                },
                "required": [
                  "password"
                ]
              },
              "example": {
                "password": "N3w-S3cure-Pass!"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/display-name": {
      "put": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Set display name",
        "description": "Set a cosmetic display label for the server (does not change the hostname). Empty resets to the hostname.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 64
                  }
                }
              },
              "example": {
                "name": "Prod web"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "displayName": "Prod web"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/password-note": {
      "put": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Set the password note",
        "description": "Store a free-text credentials note for the server (shown to the owner alongside the password).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "passwordNote": {
                    "type": "string",
                    "maxLength": 255
                  }
                }
              },
              "example": {
                "passwordNote": "root / see vault"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/root-password": {
      "get": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Reveal the root password",
        "description": "Deliberate, owner-only reveal of the stored root password. Intentionally NOT part of any routine payload (so a status poll never carries the secret); each reveal is logged. Returns null when none is stored (e.g. Windows KVM keeps no recoverable password).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "rootPassword": "S3cure-Pass!"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/provisioning/current": {
      "get": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Current provisioning job",
        "description": "The most recent provisioning job for your account, to follow an install right after POST /v1/containers.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "job": {
                    "id": "job_…",
                    "hostname": "api-test-01",
                    "serviceType": "kvm",
                    "status": "running",
                    "step": "creating_guest"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/provisioning/{jobId}": {
      "get": {
        "tags": [
          "Provisioning"
        ],
        "summary": "Provisioning job status",
        "description": "Status of a specific provisioning job.",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Provisioning job id."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "job": {
                    "id": "job_…",
                    "status": "done",
                    "step": "done",
                    "containerId": "6f1c…"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/backups": {
      "get": {
        "tags": [
          "Backups"
        ],
        "summary": "List backups",
        "description": "List this server's backups (max 3 kept) plus the current daily schedule.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "backups": [
                    {
                      "volid": "local:backup/vzdump-qemu-…",
                      "name": "vzdump-qemu-…",
                      "createdAt": "2026-08-20T03:00:00.000Z",
                      "size": "2.1 GB",
                      "storage": "local"
                    }
                  ],
                  "schedule": {
                    "enabled": true,
                    "hour": 3,
                    "keep": 3
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/backups/run": {
      "post": {
        "tags": [
          "Backups"
        ],
        "summary": "Run a backup now",
        "description": "Start a manual backup immediately. Rate-limited to one manual run per server per 30 minutes (429 `backup_cooldown`).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/backups/schedule": {
      "post": {
        "tags": [
          "Backups"
        ],
        "summary": "Set backup schedule",
        "description": "Configure the daily backup schedule, or disable it.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "hour": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 23
                  },
                  "keep": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3
                  }
                }
              },
              "example": {
                "enabled": true,
                "hour": 3,
                "keep": 3
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "schedule": {
                    "enabled": true,
                    "hour": 3,
                    "keep": 3
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/backups/{volumeId}/restore": {
      "post": {
        "tags": [
          "Backups"
        ],
        "summary": "Restore a backup (destructive)",
        "description": "DESTRUCTIVE. Restore the server from a backup volume - the current disk is replaced. The server stays stopped afterwards; start it separately.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          },
          {
            "name": "volumeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Backup volid from the list endpoint."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "status": "restoring"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/backups/{volumeId}/rename": {
      "post": {
        "tags": [
          "Backups"
        ],
        "summary": "Rename a backup",
        "description": "Set a friendly name/note on a backup.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          },
          {
            "name": "volumeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Backup volid."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "name": "pre-upgrade"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/firewall": {
      "get": {
        "tags": [
          "Firewall"
        ],
        "summary": "List firewall rules",
        "description": "The host-level firewall rules for this server.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "rules": [
                    {
                      "pos": 0,
                      "type": "in",
                      "action": "ACCEPT",
                      "proto": "tcp",
                      "dport": "443",
                      "source": "",
                      "enable": true,
                      "comment": ""
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Firewall"
        ],
        "summary": "Add a firewall rule",
        "description": "Add a rule (max 50 per server). `dport` requires a `proto`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "in",
                      "out"
                    ]
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "ACCEPT",
                      "DROP",
                      "REJECT"
                    ]
                  },
                  "proto": {
                    "type": "string",
                    "enum": [
                      "tcp",
                      "udp",
                      "icmp"
                    ]
                  },
                  "dport": {
                    "type": "string",
                    "description": "e.g. \"80,443\" or \"8000:8100\" (requires proto)."
                  },
                  "source": {
                    "type": "string",
                    "description": "IPv4 or CIDR."
                  }
                },
                "required": [
                  "type",
                  "action"
                ]
              },
              "example": {
                "type": "in",
                "action": "ACCEPT",
                "proto": "tcp",
                "dport": "443"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/containers/{id}/firewall/{pos}": {
      "delete": {
        "tags": [
          "Firewall"
        ],
        "summary": "Delete a firewall rule",
        "description": "Delete the rule at position `pos` (from the list endpoint).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          },
          {
            "name": "pos",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Rule position."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers": {
      "get": {
        "tags": [
          "Game servers"
        ],
        "summary": "List game servers",
        "description": "All your game servers.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "gameservers": [
                    {
                      "id": "a2…",
                      "name": "Minecraft",
                      "game": "minecraft",
                      "status": "running",
                      "port": 25565,
                      "autoRenew": true
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Game servers"
        ],
        "summary": "Create a game server",
        "description": "Provision a new game server (charged from balance). See create-options for games/plans.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "game": "minecraft",
                "plan": "starter",
                "version": "1.21.1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "gameserver": {
                    "id": "a2…",
                    "name": "Minecraft",
                    "game": "minecraft",
                    "status": "running",
                    "port": 25565,
                    "autoRenew": true
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/create-options": {
      "get": {
        "tags": [
          "Game servers"
        ],
        "summary": "Game server presets",
        "description": "Games, plans and options for provisioning.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "games": [
                    "minecraft",
                    "rust"
                  ],
                  "plans": [
                    {
                      "id": "starter",
                      "ram": 2,
                      "monthly": 4.99
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/versions": {
      "get": {
        "tags": [
          "Game servers"
        ],
        "summary": "Available versions",
        "description": "Installable versions for a game.",
        "parameters": [
          {
            "name": "game",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Game key."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "versions": [
                    "1.21.1",
                    "1.20.4"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/forge-builds": {
      "get": {
        "tags": [
          "Game servers"
        ],
        "summary": "Forge builds",
        "description": "Forge builds for a Minecraft version.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "builds": [
                    "47.3.0"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}": {
      "get": {
        "tags": [
          "Game servers"
        ],
        "summary": "Game server detail",
        "description": "Full detail incl. live status.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "gameserver": {
                    "id": "a2…",
                    "name": "Minecraft",
                    "game": "minecraft",
                    "status": "running",
                    "port": 25565,
                    "autoRenew": true
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/resources": {
      "get": {
        "tags": [
          "Game servers"
        ],
        "summary": "Live resources",
        "description": "Live CPU/RAM/disk usage.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "cpu": 12.4,
                  "ramMb": 1536,
                  "diskMb": 5120
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/install-progress": {
      "get": {
        "tags": [
          "Game servers"
        ],
        "summary": "Install progress",
        "description": "Progress of an ongoing install/reinstall.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "progress": 100,
                  "state": "done"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/command": {
      "post": {
        "tags": [
          "Game servers"
        ],
        "summary": "Send a console command",
        "description": "Send a command to the game server console (e.g. a Minecraft command). This is the in-game console only, not OS shell access.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "command": {
                    "type": "string"
                  }
                },
                "required": [
                  "command"
                ]
              },
              "example": {
                "command": "say hello"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/update": {
      "post": {
        "tags": [
          "Game servers"
        ],
        "summary": "Update the server",
        "description": "Update the game server to the latest build of its version.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/reinstall": {
      "post": {
        "tags": [
          "Game servers"
        ],
        "summary": "Reinstall (destructive)",
        "description": "DESTRUCTIVE reinstall - world/data lost unless you keep it explicitly.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "game": "minecraft",
                "version": "1.21.1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/name": {
      "put": {
        "tags": [
          "Game servers"
        ],
        "summary": "Rename",
        "description": "Set the display name.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "name": "SMP"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/auto-renew": {
      "post": {
        "tags": [
          "Game servers"
        ],
        "summary": "Set auto-renew",
        "description": "Disable to cancel (runs to end of paid period).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "enabled": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "autoRenew": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/auto-update": {
      "post": {
        "tags": [
          "Game servers"
        ],
        "summary": "Set auto-update",
        "description": "Toggle automatic updates on restart.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "enabled": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "autoUpdate": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/upgrade": {
      "post": {
        "tags": [
          "Game servers"
        ],
        "summary": "Upgrade plan",
        "description": "Move to a larger plan (charges the difference).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "plan": "pro"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/plugins/installed": {
      "get": {
        "tags": [
          "Game servers"
        ],
        "summary": "Installed plugins",
        "description": "Plugins/mods currently installed.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "plugins": [
                    {
                      "name": "EssentialsX",
                      "version": "2.20.1"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/plugins/suggested": {
      "get": {
        "tags": [
          "Game servers"
        ],
        "summary": "Suggested plugins",
        "description": "Popular plugins for this game.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "plugins": []
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/plugins/search": {
      "get": {
        "tags": [
          "Game servers"
        ],
        "summary": "Search plugins",
        "description": "Search the plugin catalogue.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search query."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "results": []
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/plugins/versions/{projectId}": {
      "get": {
        "tags": [
          "Game servers"
        ],
        "summary": "Plugin versions",
        "description": "Available versions of a plugin.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Plugin/project id."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "versions": []
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/plugins/install": {
      "post": {
        "tags": [
          "Game servers"
        ],
        "summary": "Install a plugin",
        "description": "Install a plugin/mod by project id.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "projectId": "essentialsx",
                "version": "2.20.1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/plugins/remove": {
      "post": {
        "tags": [
          "Game servers"
        ],
        "summary": "Remove a plugin",
        "description": "Uninstall a plugin/mod.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "file": "EssentialsX.jar"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/plugins/install-modpack": {
      "post": {
        "tags": [
          "Game servers"
        ],
        "summary": "Install a modpack",
        "description": "Install a full modpack by project/version.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "projectId": "all-the-mods-9",
                "version": "0.2.60"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/modpacks/search": {
      "get": {
        "tags": [
          "Game servers"
        ],
        "summary": "Search modpacks",
        "description": "Search the modpack catalogue.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search query."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "results": []
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gameservers/{id}/modpacks/versions/{projectId}": {
      "get": {
        "tags": [
          "Game servers"
        ],
        "summary": "Modpack versions",
        "description": "Available versions of a modpack.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Modpack/project id."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "versions": []
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bots": {
      "get": {
        "tags": [
          "Bots"
        ],
        "summary": "List bots",
        "description": "All your Discord bots.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "bots": [
                    {
                      "id": "b3…",
                      "name": "MyBot",
                      "status": "running",
                      "runtime": "nodejs",
                      "autoRenew": true
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Bots"
        ],
        "summary": "Create a bot",
        "description": "Provision a new Discord bot host (charged from balance).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "name": "MyBot",
                "runtime": "nodejs",
                "plan": "starter"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "bot": {
                    "id": "b3…",
                    "name": "MyBot",
                    "status": "running",
                    "runtime": "nodejs",
                    "autoRenew": true
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bots/create-options": {
      "get": {
        "tags": [
          "Bots"
        ],
        "summary": "Bot presets",
        "description": "Runtimes and plans for provisioning.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "runtimes": [
                    "nodejs",
                    "python"
                  ],
                  "plans": [
                    {
                      "id": "starter",
                      "ramMb": 512,
                      "monthly": 1.99
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bots/{id}": {
      "get": {
        "tags": [
          "Bots"
        ],
        "summary": "Bot detail",
        "description": "Full detail incl. status.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "bot": {
                    "id": "b3…",
                    "name": "MyBot",
                    "status": "running",
                    "runtime": "nodejs",
                    "autoRenew": true
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bots/{id}/logs": {
      "get": {
        "tags": [
          "Bots"
        ],
        "summary": "Bot logs",
        "description": "Recent stdout/stderr log lines.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "logs": "…"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bots/{id}/stats": {
      "get": {
        "tags": [
          "Bots"
        ],
        "summary": "Bot stats",
        "description": "Live CPU/RAM usage.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "cpu": 1.2,
                  "ramMb": 210
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bots/{id}/reinstall": {
      "post": {
        "tags": [
          "Bots"
        ],
        "summary": "Reinstall (destructive)",
        "description": "DESTRUCTIVE reinstall of the runtime.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "runtime": "nodejs"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bots/{id}/name": {
      "put": {
        "tags": [
          "Bots"
        ],
        "summary": "Rename",
        "description": "Set the display name.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "name": "MyBot"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bots/{id}/auto-renew": {
      "post": {
        "tags": [
          "Bots"
        ],
        "summary": "Set auto-renew",
        "description": "Disable to cancel (runs to end of paid period).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "enabled": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "autoRenew": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bots/{id}/storage-upgrade": {
      "post": {
        "tags": [
          "Bots"
        ],
        "summary": "Upgrade storage",
        "description": "Add storage to the bot host (charged from balance).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "extraMb": 512
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bots/{id}/install": {
      "post": {
        "tags": [
          "Bots"
        ],
        "summary": "Install packages",
        "description": "Install runtime dependencies. Use this generic endpoint, or the `/install/npm` and `/install/pip` subpaths for the respective package managers.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packages": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "example": {
                "packages": [
                  "discord.js"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "output": "…"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webspaces/plans": {
      "get": {
        "tags": [
          "Webspaces"
        ],
        "summary": "Webspace plans",
        "description": "Available web hosting plans.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "plans": [
                    {
                      "id": "web-s",
                      "storageGb": 10,
                      "monthly": 2.99
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webspaces": {
      "get": {
        "tags": [
          "Webspaces"
        ],
        "summary": "List webspaces",
        "description": "All your webspaces.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "webspaces": [
                    {
                      "id": "c4…",
                      "label": "my-site",
                      "status": "active"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webspaces/{id}": {
      "get": {
        "tags": [
          "Webspaces"
        ],
        "summary": "Webspace detail",
        "description": "Full detail of a webspace.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "webspace": {
                    "id": "c4…",
                    "label": "my-site",
                    "status": "active",
                    "plan": "web-s"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webspaces/orders": {
      "post": {
        "tags": [
          "Webspaces"
        ],
        "summary": "Order a webspace",
        "description": "Create/order a new webspace (charged from balance).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "plan": "web-s",
                "label": "my-site"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "webspace": {
                    "id": "c4…",
                    "status": "provisioning"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webspaces/{id}/auto-renew": {
      "patch": {
        "tags": [
          "Webspaces"
        ],
        "summary": "Set auto-renew",
        "description": "Disable to cancel at period end.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "enabled": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "autoRenew": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webspaces/{id}/reset-password": {
      "post": {
        "tags": [
          "Webspaces"
        ],
        "summary": "Reset password",
        "description": "Reset the webspace/FTP password.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webspaces/{id}/reinstall": {
      "post": {
        "tags": [
          "Webspaces"
        ],
        "summary": "Reinstall (destructive)",
        "description": "DESTRUCTIVE reset of the webspace.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webspaces/{id}/change-plan": {
      "post": {
        "tags": [
          "Webspaces"
        ],
        "summary": "Change plan",
        "description": "Move the webspace to another plan.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "plan": "web-m"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webspaces/{id}/sso": {
      "post": {
        "tags": [
          "Webspaces"
        ],
        "summary": "One-time login link",
        "description": "Return a one-time SSO link into the webspace control panel.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "url": "https://…"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webspaces/{id}/usage": {
      "get": {
        "tags": [
          "Webspaces"
        ],
        "summary": "Usage",
        "description": "Current storage/traffic usage.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "storageMb": 1200,
                  "trafficMb": 5400
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webspaces/{id}/usage/history": {
      "get": {
        "tags": [
          "Webspaces"
        ],
        "summary": "Usage history",
        "description": "Historical usage series.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "history": []
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/tlds": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "TLD pricing",
        "description": "Supported TLDs and their pricing.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "tlds": [
                    {
                      "tld": "com",
                      "register": 11.0,
                      "renew": 12.0
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/suggest": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "Name suggestions",
        "description": "Domain name suggestions for a query.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search query."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "suggestions": [
                    "example.com"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/suggest-one": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "Single suggestion",
        "description": "One best suggestion for a query.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search query."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "suggestion": "example.com"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/check": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "Availability check",
        "description": "Check whether a domain is available.",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "domain": "example.com",
                  "available": true,
                  "price": 11.0
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/orders": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "Domain orders",
        "description": "Your domain orders.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "orders": []
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Register a domain",
        "description": "Register a domain (charged from balance).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "domain": "example.com",
                "years": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "domain": {
                    "id": "d5…",
                    "name": "example.com",
                    "status": "registering"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "List domains",
        "description": "All your domains.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "domains": [
                    {
                      "id": "d5…",
                      "name": "example.com",
                      "status": "active",
                      "autoRenew": true
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/{id}": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "Domain detail",
        "description": "Detail incl. nameservers and DNS records.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "domain": {
                    "id": "d5…",
                    "name": "example.com",
                    "status": "active",
                    "nameservers": [
                      "ns1.instantnode.eu"
                    ],
                    "records": []
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/{id}/nameservers": {
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Set nameservers",
        "description": "Replace the domain's nameservers.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nameservers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "nameservers"
                ]
              },
              "example": {
                "nameservers": [
                  "ns1.example.com",
                  "ns2.example.com"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/{id}/renew": {
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Renew a domain",
        "description": "Renew the domain (charged from balance).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "years": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/transfer": {
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Transfer in",
        "description": "Start a domain transfer in with an auth/EPP code.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "domain": "example.com",
                "authCode": "…"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/{id}/dns": {
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Add DNS record",
        "description": "Add a DNS record.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "example": "A"
                  },
                  "name": {
                    "type": "string"
                  },
                  "content": {
                    "type": "string"
                  },
                  "ttl": {
                    "type": "integer"
                  },
                  "prio": {
                    "type": "integer"
                  }
                },
                "required": [
                  "type",
                  "name",
                  "content"
                ]
              },
              "example": {
                "type": "A",
                "name": "@",
                "content": "94.249.230.10",
                "ttl": 3600
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "record": {
                    "id": "r1",
                    "type": "A",
                    "name": "@",
                    "content": "94.249.230.10"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/{id}/dns/{recordId}": {
      "patch": {
        "tags": [
          "Domains"
        ],
        "summary": "Update DNS record",
        "description": "Update an existing DNS record.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          },
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "DNS record id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "content": "94.249.230.11",
                "ttl": 3600
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Domains"
        ],
        "summary": "Delete DNS record",
        "description": "Delete a DNS record.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          },
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "DNS record id."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/{id}/dns/point-at-container": {
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Point domain at a server",
        "description": "Create A/AAAA records pointing the domain at one of your servers.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "containerId": {
                    "type": "string"
                  }
                },
                "required": [
                  "containerId"
                ]
              },
              "example": {
                "containerId": "6f1c…"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/{id}/auto-renew": {
      "patch": {
        "tags": [
          "Domains"
        ],
        "summary": "Set auto-renew",
        "description": "Toggle auto-renew for the domain.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource id (UUID)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "enabled": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "autoRenew": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing": {
      "get": {
        "tags": [
          "Billing & account"
        ],
        "summary": "Billing overview (read-only)",
        "description": "Read-only billing: current balance, invoices (last 200) and transactions (last 500). Top-ups and payments cannot be initiated via the API.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "balance": 42.5,
                  "invoices": [
                    {
                      "id": "i1",
                      "invoiceNumber": "IN-2026-0001",
                      "totalAmount": 7.99,
                      "status": "paid",
                      "createdAt": "2026-08-01T12:00:00.000Z"
                    }
                  ],
                  "transactions": [
                    {
                      "id": "t1",
                      "type": "debit",
                      "amount": 7.99,
                      "balanceAfter": 34.51,
                      "description": "Auto renewal for web01 (monthly)",
                      "createdAt": "2026-08-01T12:00:00.000Z"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/profile": {
      "get": {
        "tags": [
          "Billing & account"
        ],
        "summary": "Get profile",
        "description": "Your profile and billing address.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "profile": {
                    "id": "u1",
                    "username": "you",
                    "email": "you@example.com",
                    "billingName": "You",
                    "billingCountry": "DE",
                    "customAvatarUrl": null
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Billing & account"
        ],
        "summary": "Update profile",
        "description": "Update your billing address and avatar only. Username, e-mail and password can NOT be changed via the API.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "billingName": {
                    "type": "string"
                  },
                  "billingAddressLine1": {
                    "type": "string"
                  },
                  "billingAddressLine2": {
                    "type": "string"
                  },
                  "billingPostalCode": {
                    "type": "string"
                  },
                  "billingCity": {
                    "type": "string"
                  },
                  "billingState": {
                    "type": "string"
                  },
                  "billingCountry": {
                    "type": "string"
                  },
                  "customAvatarUrl": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "billingName": "You",
                "billingAddressLine1": "Street 1",
                "billingPostalCode": "10115",
                "billingCity": "Berlin",
                "billingCountry": "DE",
                "customAvatarUrl": "https://example.com/a.png"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "updated": [
                    "billingCity"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/email-preferences": {
      "get": {
        "tags": [
          "Billing & account"
        ],
        "summary": "Get email preferences",
        "description": "Which notification e-mails are enabled.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "emailPreferences": {
                    "loginAlerts": true,
                    "billingEmails": true,
                    "lowBalance": true
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Billing & account"
        ],
        "summary": "Update email preferences",
        "description": "Toggle notification e-mails. Security, deletion and cancellation e-mails are always sent.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "loginAlerts": {
                    "type": "boolean"
                  },
                  "billingEmails": {
                    "type": "boolean"
                  },
                  "lowBalance": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "billingEmails": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "emailPreferences": {
                    "loginAlerts": true,
                    "billingEmails": false,
                    "lowBalance": true
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "inpat_...",
        "description": "Personal Access Token. Create one in the panel under Profile -> API."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "example": false
          },
          "error": {
            "type": "string",
            "example": "not_found"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "ok",
          "error"
        ]
      },
      "Ok": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "example": true
          }
        },
        "required": [
          "ok"
        ]
      },
      "Container": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "hostname": {
            "type": "string"
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "example": "running"
          },
          "virtType": {
            "type": "string",
            "example": "kvm"
          },
          "category": {
            "type": "string",
            "example": "kvm"
          },
          "ipv4": {
            "type": "string"
          },
          "cpu": {
            "type": "integer"
          },
          "ram": {
            "type": "integer",
            "description": "MB"
          },
          "disk": {
            "type": "integer",
            "description": "GB"
          },
          "hourlyRate": {
            "type": "number"
          },
          "autoRenew": {
            "type": "boolean"
          },
          "hasRootPassword": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GameServer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "game": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "port": {
            "type": "integer"
          },
          "autoRenew": {
            "type": "boolean"
          }
        }
      },
      "Bot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "runtime": {
            "type": "string"
          },
          "autoRenew": {
            "type": "boolean"
          }
        }
      },
      "Webspace": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          }
        }
      },
      "Domain": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "autoRenew": {
            "type": "boolean"
          },
          "nameservers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Transaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "credit",
              "debit"
            ]
          },
          "amount": {
            "type": "number"
          },
          "balanceAfter": {
            "type": "number"
          },
          "description": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Invoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "invoiceNumber": {
            "type": "string"
          },
          "totalAmount": {
            "type": "number"
          },
          "status": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "FirewallRule": {
        "type": "object",
        "properties": {
          "pos": {
            "type": "integer"
          },
          "type": {
            "type": "string",
            "enum": [
              "in",
              "out"
            ]
          },
          "action": {
            "type": "string",
            "enum": [
              "ACCEPT",
              "DROP",
              "REJECT"
            ]
          },
          "proto": {
            "type": "string"
          },
          "dport": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "enable": {
            "type": "boolean"
          }
        }
      },
      "Backup": {
        "type": "object",
        "properties": {
          "volid": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "size": {
            "type": "string"
          },
          "storage": {
            "type": "string"
          }
        }
      },
      "Preset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "cpu": {
            "type": "integer"
          },
          "ram": {
            "type": "integer"
          },
          "disk": {
            "type": "integer"
          },
          "monthly": {
            "type": "number"
          }
        }
      },
      "Template": {
        "type": "object",
        "properties": {
          "template": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      }
    }
  }
}