{
  "openapi": "3.0.3",
  "info": {
    "title": "SNG Hosting API",
    "version": "1.0.0",
    "description": "Control SNG VPS and dedicated servers, their network, and DDoS protection from your own code.\n\nAuthenticate with an API token created in the SNG control panel: `Authorization: Bearer <token>`. Every token carries explicit scopes; a request outside them is refused with `insufficient_scope`.",
    "contact": {
      "name": "SNG Hosting",
      "url": "https://snghosting.com"
    }
  },
  "servers": [
    {
      "url": "https://api.snghosting.com/api/v1"
    }
  ],
  "tags": [
    {
      "name": "Account",
      "description": "Check the token and the account it belongs to."
    },
    {
      "name": "Servers",
      "description": "VPS, VDS, and dedicated servers, power, and operations."
    },
    {
      "name": "Network",
      "description": "IP addresses, reverse DNS, and traffic."
    },
    {
      "name": "DDoS protection",
      "description": "Protection mode, filter rules, and attacks."
    },
    {
      "name": "Firewall",
      "description": "VPS firewall rule sets."
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Scopes:\n- `servers:read`: Read servers, resource usage, and operation status.\n- `servers:power`: Start and reboot servers.\n- `servers:control`: Shut down, force off, and hard-reset servers. Use together with servers:power.\n- `network:read`: Read IP addresses, reverse DNS, traffic, DDoS protection, and firewall.\n- `network:write`: Change reverse DNS, IP descriptions, DDoS protection mode, and firewall."
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/connect": {
      "get": {
        "operationId": "testConnection",
        "tags": ["Account"],
        "summary": "Test the API token",
        "description": "Confirms the token works and shows its scopes. Needs no scope.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "accountId": {
                          "type": "integer"
                        },
                        "token": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "enum": ["personal_token", "reseller_token"]
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": ["name", "type", "scopes"],
                          "additionalProperties": false
                        },
                        "sourceIp": {
                          "type": "string"
                        },
                        "apiVersion": {
                          "type": "string",
                          "enum": ["v1"]
                        }
                      },
                      "required": ["accountId", "token", "sourceIp", "apiVersion"],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "observedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stale": {
                          "type": "boolean",
                          "description": "True when live data was unavailable and the last good value was returned."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing, invalid, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope, or the source address is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or does not belong to this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/servers": {
      "get": {
        "operationId": "listServers",
        "tags": ["Servers"],
        "summary": "List servers",
        "description": "Every VPS, VDS, and dedicated server on the account, including shared ones.",
        "security": [
          {
            "bearerAuth": ["servers:read"]
          }
        ],
        "x-required-scope": "servers:read",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
                            "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
                          },
                          "type": {
                            "type": "string",
                            "enum": ["vps", "vds", "dedicated"]
                          },
                          "name": {
                            "type": "string"
                          },
                          "hostname": {
                            "type": "string",
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "provisioning",
                              "building",
                              "suspended",
                              "failed",
                              "terminated"
                            ],
                            "description": "Service state. Actions are only accepted while `active`."
                          },
                          "power": {
                            "type": "string",
                            "enum": ["running", "stopped", "unknown"]
                          },
                          "ipv4": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "ipv6": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "os": {
                            "type": "string",
                            "nullable": true
                          },
                          "resources": {
                            "type": "object",
                            "properties": {
                              "cpuCores": {
                                "type": "number",
                                "nullable": true
                              },
                              "memoryMb": {
                                "type": "number",
                                "nullable": true
                              },
                              "storageGb": {
                                "type": "number",
                                "nullable": true
                              },
                              "trafficGb": {
                                "type": "number",
                                "nullable": true,
                                "description": "Monthly traffic allowance; null when unmetered."
                              }
                            },
                            "required": ["cpuCores", "memoryMb", "storageGb", "trafficGb"],
                            "additionalProperties": false
                          },
                          "accessRole": {
                            "type": "string",
                            "enum": ["primary", "secondary"],
                            "description": "`secondary` means the server was shared with this account: read-only."
                          },
                          "serviceId": {
                            "type": "integer",
                            "nullable": true,
                            "description": "SNG billing service id."
                          },
                          "createdAt": {
                            "type": "string",
                            "description": "ISO 8601 timestamp.",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "name",
                          "hostname",
                          "status",
                          "power",
                          "ipv4",
                          "ipv6",
                          "os",
                          "resources",
                          "accessRole",
                          "serviceId",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "observedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stale": {
                          "type": "boolean",
                          "description": "True when live data was unavailable and the last good value was returned."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing, invalid, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope, or the source address is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or does not belong to this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/servers/{serverId}": {
      "get": {
        "operationId": "getServer",
        "tags": ["Servers"],
        "summary": "Get a server",
        "description": "Includes the power actions this token can run now and any action in progress.",
        "security": [
          {
            "bearerAuth": ["servers:read"]
          }
        ],
        "x-required-scope": "servers:read",
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`.",
            "schema": {
              "type": "string",
              "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
              "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
                          "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
                        },
                        "type": {
                          "type": "string",
                          "enum": ["vps", "vds", "dedicated"]
                        },
                        "name": {
                          "type": "string"
                        },
                        "hostname": {
                          "type": "string",
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "provisioning",
                            "building",
                            "suspended",
                            "failed",
                            "terminated"
                          ],
                          "description": "Service state. Actions are only accepted while `active`."
                        },
                        "power": {
                          "type": "string",
                          "enum": ["running", "stopped", "unknown"]
                        },
                        "ipv4": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "ipv6": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "os": {
                          "type": "string",
                          "nullable": true
                        },
                        "resources": {
                          "type": "object",
                          "properties": {
                            "cpuCores": {
                              "type": "number",
                              "nullable": true
                            },
                            "memoryMb": {
                              "type": "number",
                              "nullable": true
                            },
                            "storageGb": {
                              "type": "number",
                              "nullable": true
                            },
                            "trafficGb": {
                              "type": "number",
                              "nullable": true,
                              "description": "Monthly traffic allowance; null when unmetered."
                            }
                          },
                          "required": ["cpuCores", "memoryMb", "storageGb", "trafficGb"],
                          "additionalProperties": false
                        },
                        "accessRole": {
                          "type": "string",
                          "enum": ["primary", "secondary"],
                          "description": "`secondary` means the server was shared with this account: read-only."
                        },
                        "serviceId": {
                          "type": "integer",
                          "nullable": true,
                          "description": "SNG billing service id."
                        },
                        "createdAt": {
                          "type": "string",
                          "description": "ISO 8601 timestamp.",
                          "nullable": true
                        },
                        "actions": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": ["start", "shutdown", "power_off", "reboot", "reset"],
                            "description": "`shutdown` and `reboot` ask the operating system; `power_off` and `reset` act on the hardware immediately."
                          },
                          "description": "Power actions this token can run on the server right now."
                        },
                        "currentOperation": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "serverId": {
                              "type": "string",
                              "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
                              "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
                            },
                            "action": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "running",
                                "succeeded",
                                "failed",
                                "timed_out",
                                "outcome_unknown"
                              ],
                              "description": "`outcome_unknown` means the request was sent but its result could not be confirmed: check the server state before retrying."
                            },
                            "message": {
                              "type": "string",
                              "nullable": true
                            },
                            "requestedAt": {
                              "type": "string",
                              "description": "ISO 8601 timestamp.",
                              "nullable": true
                            },
                            "completedAt": {
                              "type": "string",
                              "description": "ISO 8601 timestamp.",
                              "nullable": true
                            }
                          },
                          "required": [
                            "id",
                            "serverId",
                            "action",
                            "status",
                            "message",
                            "requestedAt",
                            "completedAt"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "name",
                        "hostname",
                        "status",
                        "power",
                        "ipv4",
                        "ipv6",
                        "os",
                        "resources",
                        "accessRole",
                        "serviceId",
                        "createdAt",
                        "actions",
                        "currentOperation"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "observedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stale": {
                          "type": "boolean",
                          "description": "True when live data was unavailable and the last good value was returned."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing, invalid, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope, or the source address is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or does not belong to this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/servers/{serverId}/metrics": {
      "get": {
        "operationId": "getServerMetrics",
        "tags": ["Servers"],
        "summary": "Get resource usage",
        "description": "CPU, memory, disk, and monthly bandwidth. Dedicated servers report usage through the SNG agent.",
        "security": [
          {
            "bearerAuth": ["servers:read"]
          }
        ],
        "x-required-scope": "servers:read",
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`.",
            "schema": {
              "type": "string",
              "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
              "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "sampledAt": {
                          "type": "string",
                          "description": "ISO 8601 timestamp.",
                          "nullable": true
                        },
                        "cpuPercent": {
                          "type": "number",
                          "nullable": true
                        },
                        "memory": {
                          "type": "object",
                          "properties": {
                            "totalBytes": {
                              "type": "number"
                            },
                            "usedBytes": {
                              "type": "number"
                            },
                            "usagePercent": {
                              "type": "number",
                              "nullable": true
                            }
                          },
                          "required": ["totalBytes", "usedBytes", "usagePercent"],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "storage": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "mount": {
                                "type": "string"
                              },
                              "totalBytes": {
                                "type": "number"
                              },
                              "usedBytes": {
                                "type": "number"
                              },
                              "usagePercent": {
                                "type": "number",
                                "nullable": true
                              }
                            },
                            "required": ["mount", "totalBytes", "usedBytes", "usagePercent"],
                            "additionalProperties": false
                          }
                        },
                        "bandwidth": {
                          "type": "object",
                          "properties": {
                            "usedBytes": {
                              "type": "number"
                            },
                            "limitBytes": {
                              "type": "number",
                              "nullable": true
                            }
                          },
                          "required": ["usedBytes", "limitBytes"],
                          "additionalProperties": false,
                          "nullable": true,
                          "description": "Traffic used in the current billing month, when the server reports it."
                        }
                      },
                      "required": ["sampledAt", "cpuPercent", "memory", "storage", "bandwidth"],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "observedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stale": {
                          "type": "boolean",
                          "description": "True when live data was unavailable and the last good value was returned."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing, invalid, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope, or the source address is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or does not belong to this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/servers/{serverId}/actions": {
      "post": {
        "operationId": "runServerAction",
        "tags": ["Servers"],
        "summary": "Run a power action",
        "description": "`start` and `reboot` need `servers:power`; `shutdown`, `power_off`, and `reset` also need `servers:control`. Starts the action and returns an operation. A `202` means it is still running: poll GET /servers/{serverId}/operations/{operationId} until it reaches a final status. The API never reports success before the server confirms it.",
        "security": [
          {
            "bearerAuth": ["servers:power"]
          }
        ],
        "x-required-scope": "servers:power",
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`.",
            "schema": {
              "type": "string",
              "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
              "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A unique value per intended action (8–128 characters). Repeating a request with the same key returns the first result instead of running the action again.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": ["start", "shutdown", "power_off", "reboot", "reset"],
                    "description": "`shutdown` and `reboot` ask the operating system; `power_off` and `reset` act on the hardware immediately."
                  }
                },
                "required": ["action"],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "operation": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "serverId": {
                              "type": "string",
                              "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
                              "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
                            },
                            "action": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "running",
                                "succeeded",
                                "failed",
                                "timed_out",
                                "outcome_unknown"
                              ],
                              "description": "`outcome_unknown` means the request was sent but its result could not be confirmed: check the server state before retrying."
                            },
                            "message": {
                              "type": "string",
                              "nullable": true
                            },
                            "requestedAt": {
                              "type": "string",
                              "description": "ISO 8601 timestamp.",
                              "nullable": true
                            },
                            "completedAt": {
                              "type": "string",
                              "description": "ISO 8601 timestamp.",
                              "nullable": true
                            }
                          },
                          "required": [
                            "id",
                            "serverId",
                            "action",
                            "status",
                            "message",
                            "requestedAt",
                            "completedAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": ["operation"],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "observedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stale": {
                          "type": "boolean",
                          "description": "True when live data was unavailable and the last good value was returned."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing, invalid, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope, or the source address is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or does not belong to this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The resource is not in a state that allows this request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The Idempotency-Key was already used with a different request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "423": {
            "description": "The service is suspended or locked.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "The action failed on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "The server did not confirm the action in time.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/servers/{serverId}/operations/{operationId}": {
      "get": {
        "operationId": "getOperation",
        "tags": ["Servers"],
        "summary": "Get an operation",
        "security": [
          {
            "bearerAuth": ["servers:read"]
          }
        ],
        "x-required-scope": "servers:read",
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`.",
            "schema": {
              "type": "string",
              "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
              "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
            }
          },
          {
            "name": "operationId",
            "in": "path",
            "required": true,
            "description": "Operation id returned by an action.",
            "schema": {
              "type": "string",
              "pattern": "^([0-9a-f-]{36}|q\\d{1,12})$",
              "description": "Operation id returned by an action."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "serverId": {
                          "type": "string",
                          "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
                          "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
                        },
                        "action": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued",
                            "running",
                            "succeeded",
                            "failed",
                            "timed_out",
                            "outcome_unknown"
                          ],
                          "description": "`outcome_unknown` means the request was sent but its result could not be confirmed: check the server state before retrying."
                        },
                        "message": {
                          "type": "string",
                          "nullable": true
                        },
                        "requestedAt": {
                          "type": "string",
                          "description": "ISO 8601 timestamp.",
                          "nullable": true
                        },
                        "completedAt": {
                          "type": "string",
                          "description": "ISO 8601 timestamp.",
                          "nullable": true
                        }
                      },
                      "required": [
                        "id",
                        "serverId",
                        "action",
                        "status",
                        "message",
                        "requestedAt",
                        "completedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "observedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stale": {
                          "type": "boolean",
                          "description": "True when live data was unavailable and the last good value was returned."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing, invalid, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope, or the source address is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or does not belong to this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/servers/{serverId}/ips": {
      "get": {
        "operationId": "listServerIps",
        "tags": ["Network"],
        "summary": "List IP addresses",
        "security": [
          {
            "bearerAuth": ["network:read"]
          }
        ],
        "x-required-scope": "network:read",
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`.",
            "schema": {
              "type": "string",
              "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
              "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "address": {
                            "type": "string"
                          },
                          "version": {
                            "type": "string",
                            "enum": ["ipv4", "ipv6"]
                          },
                          "primary": {
                            "type": "boolean"
                          }
                        },
                        "required": ["address", "version", "primary"],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "observedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stale": {
                          "type": "boolean",
                          "description": "True when live data was unavailable and the last good value was returned."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing, invalid, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope, or the source address is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or does not belong to this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/servers/{serverId}/ips/{ip}": {
      "get": {
        "operationId": "getIpSettings",
        "tags": ["Network"],
        "summary": "Get IP settings",
        "description": "Reverse DNS, description, and DDoS protection mode of one address.",
        "security": [
          {
            "bearerAuth": ["network:read"]
          }
        ],
        "x-required-scope": "network:read",
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`.",
            "schema": {
              "type": "string",
              "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
              "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
            }
          },
          {
            "name": "ip",
            "in": "path",
            "required": true,
            "description": "An IPv4 address assigned to the server.",
            "schema": {
              "type": "string",
              "format": "ipv4",
              "description": "An IPv4 address assigned to the server."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string"
                        },
                        "rdns": {
                          "type": "string",
                          "nullable": true
                        },
                        "description": {
                          "type": "string",
                          "nullable": true
                        },
                        "protection": {
                          "type": "object",
                          "properties": {
                            "layer4": {
                              "type": "string",
                              "enum": ["dynamic", "permanent"]
                            },
                            "layer7": {
                              "type": "string",
                              "enum": ["off", "permanent", "only"]
                            }
                          },
                          "required": ["layer4", "layer7"],
                          "additionalProperties": false,
                          "nullable": true,
                          "description": "DDoS protection mode. `dynamic` filters only during an attack; `permanent` filters all the time. Layer 7 `only` filters web traffic only."
                        },
                        "editable": {
                          "type": "object",
                          "properties": {
                            "rdns": {
                              "type": "boolean"
                            },
                            "description": {
                              "type": "boolean"
                            },
                            "protection": {
                              "type": "boolean"
                            }
                          },
                          "required": ["rdns", "description", "protection"],
                          "additionalProperties": false
                        }
                      },
                      "required": ["address", "rdns", "description", "protection", "editable"],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "observedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stale": {
                          "type": "boolean",
                          "description": "True when live data was unavailable and the last good value was returned."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing, invalid, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope, or the source address is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or does not belong to this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateIpSettings",
        "tags": ["Network"],
        "summary": "Change IP settings",
        "description": "Change reverse DNS, the description, or the DDoS protection mode of a dedicated server address. Send one change per request.",
        "security": [
          {
            "bearerAuth": ["network:write"]
          }
        ],
        "x-required-scope": "network:write",
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`.",
            "schema": {
              "type": "string",
              "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
              "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
            }
          },
          {
            "name": "ip",
            "in": "path",
            "required": true,
            "description": "An IPv4 address assigned to the server.",
            "schema": {
              "type": "string",
              "format": "ipv4",
              "description": "An IPv4 address assigned to the server."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A unique value per intended action (8–128 characters). Repeating a request with the same key returns the first result instead of running the action again.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "rdns": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 253
                      }
                    },
                    "required": ["rdns"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "maxLength": 255
                      }
                    },
                    "required": ["description"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "protection": {
                        "type": "object",
                        "properties": {
                          "layer4": {
                            "type": "string",
                            "enum": ["dynamic", "permanent"]
                          },
                          "layer7": {
                            "type": "string",
                            "enum": ["off", "permanent", "only"]
                          }
                        },
                        "required": ["layer4", "layer7"],
                        "additionalProperties": false
                      }
                    },
                    "required": ["protection"],
                    "additionalProperties": false
                  }
                ],
                "description": "Exactly one change per request: `rdns`, `description`, or `protection`."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string"
                        },
                        "rdns": {
                          "type": "string",
                          "nullable": true
                        },
                        "description": {
                          "type": "string",
                          "nullable": true
                        },
                        "protection": {
                          "type": "object",
                          "properties": {
                            "layer4": {
                              "type": "string",
                              "enum": ["dynamic", "permanent"]
                            },
                            "layer7": {
                              "type": "string",
                              "enum": ["off", "permanent", "only"]
                            }
                          },
                          "required": ["layer4", "layer7"],
                          "additionalProperties": false,
                          "nullable": true,
                          "description": "DDoS protection mode. `dynamic` filters only during an attack; `permanent` filters all the time. Layer 7 `only` filters web traffic only."
                        },
                        "editable": {
                          "type": "object",
                          "properties": {
                            "rdns": {
                              "type": "boolean"
                            },
                            "description": {
                              "type": "boolean"
                            },
                            "protection": {
                              "type": "boolean"
                            }
                          },
                          "required": ["rdns", "description", "protection"],
                          "additionalProperties": false
                        }
                      },
                      "required": ["address", "rdns", "description", "protection", "editable"],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "observedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stale": {
                          "type": "boolean",
                          "description": "True when live data was unavailable and the last good value was returned."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing, invalid, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope, or the source address is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or does not belong to this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The resource is not in a state that allows this request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The Idempotency-Key was already used with a different request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "423": {
            "description": "The service is suspended or locked.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/servers/{serverId}/traffic": {
      "get": {
        "operationId": "getServerTraffic",
        "tags": ["Network"],
        "summary": "Get traffic",
        "description": "Dedicated servers return the last 24 hours of port rates in Mbps (`kind: rates`). VPS servers return transfer per billing month (`kind: monthly`).",
        "security": [
          {
            "bearerAuth": ["network:read"]
          }
        ],
        "x-required-scope": "network:read",
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`.",
            "schema": {
              "type": "string",
              "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
              "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": ["rates"]
                            },
                            "from": {
                              "type": "string",
                              "description": "ISO 8601 timestamp."
                            },
                            "to": {
                              "type": "string",
                              "description": "ISO 8601 timestamp."
                            },
                            "totals": {
                              "type": "object",
                              "properties": {
                                "incomingGb": {
                                  "type": "number"
                                },
                                "outgoingGb": {
                                  "type": "number"
                                }
                              },
                              "required": ["incomingGb", "outgoingGb"],
                              "additionalProperties": false,
                              "nullable": true,
                              "description": "Transfer volume over the window."
                            },
                            "interfaces": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "incoming": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "time": {
                                          "type": "string",
                                          "description": "ISO 8601 timestamp."
                                        },
                                        "mbps": {
                                          "type": "number"
                                        }
                                      },
                                      "required": ["time", "mbps"],
                                      "additionalProperties": false
                                    }
                                  },
                                  "outgoing": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "time": {
                                          "type": "string",
                                          "description": "ISO 8601 timestamp."
                                        },
                                        "mbps": {
                                          "type": "number"
                                        }
                                      },
                                      "required": ["time", "mbps"],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": ["incoming", "outgoing"],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": ["kind", "from", "to", "totals", "interfaces"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": ["monthly"]
                            },
                            "months": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "string",
                                    "description": "ISO 8601 timestamp."
                                  },
                                  "end": {
                                    "type": "string",
                                    "description": "ISO 8601 timestamp."
                                  },
                                  "rxBytes": {
                                    "type": "number"
                                  },
                                  "txBytes": {
                                    "type": "number"
                                  },
                                  "totalBytes": {
                                    "type": "number"
                                  },
                                  "limitGb": {
                                    "type": "number",
                                    "nullable": true
                                  }
                                },
                                "required": [
                                  "start",
                                  "end",
                                  "rxBytes",
                                  "txBytes",
                                  "totalBytes",
                                  "limitGb"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": ["kind", "months"],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "observedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stale": {
                          "type": "boolean",
                          "description": "True when live data was unavailable and the last good value was returned."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing, invalid, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope, or the source address is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or does not belong to this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/servers/{serverId}/ddos": {
      "get": {
        "operationId": "getDdosOverview",
        "tags": ["DDoS protection"],
        "summary": "Get DDoS protection and attacks",
        "description": "Protection status and recent attacks for one address of the server (the primary address by default).",
        "security": [
          {
            "bearerAuth": ["network:read"]
          }
        ],
        "x-required-scope": "network:read",
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`.",
            "schema": {
              "type": "string",
              "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
              "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
            }
          },
          {
            "name": "ip",
            "in": "query",
            "required": false,
            "description": "Address to inspect.",
            "schema": {
              "type": "string",
              "format": "ipv4",
              "description": "Address to inspect."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string",
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": ["protected", "unavailable"]
                        },
                        "incidents": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "string",
                                "description": "ISO 8601 timestamp."
                              },
                              "endedAt": {
                                "type": "string",
                                "description": "ISO 8601 timestamp.",
                                "nullable": true
                              },
                              "durationSeconds": {
                                "type": "number",
                                "nullable": true
                              },
                              "peak": {
                                "type": "string",
                                "nullable": true,
                                "description": "Peak attack rate, e.g. `12.4 Gbps`."
                              },
                              "attackTypes": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "id",
                              "startedAt",
                              "endedAt",
                              "durationSeconds",
                              "peak",
                              "attackTypes"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "totalIncidents": {
                          "type": "integer"
                        },
                        "addresses": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Every address of the server you can query with `ip`."
                        }
                      },
                      "required": ["address", "status", "incidents", "totalIncidents", "addresses"],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "observedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stale": {
                          "type": "boolean",
                          "description": "True when live data was unavailable and the last good value was returned."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing, invalid, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope, or the source address is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or does not belong to this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/servers/{serverId}/ips/{ip}/ddos/rules": {
      "get": {
        "operationId": "listDdosRules",
        "tags": ["DDoS protection"],
        "summary": "List DDoS filter rules",
        "description": "Filter rules applied to one address of a dedicated server.",
        "security": [
          {
            "bearerAuth": ["network:read"]
          }
        ],
        "x-required-scope": "network:read",
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`.",
            "schema": {
              "type": "string",
              "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
              "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
            }
          },
          {
            "name": "ip",
            "in": "path",
            "required": true,
            "description": "An IPv4 address assigned to the server.",
            "schema": {
              "type": "string",
              "format": "ipv4",
              "description": "An IPv4 address assigned to the server."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string"
                        },
                        "available": {
                          "type": "boolean"
                        },
                        "rules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "protocol": {
                                "type": "string"
                              },
                              "port": {
                                "type": "number"
                              },
                              "state": {
                                "type": "string"
                              }
                            },
                            "required": ["protocol", "port", "state"],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": ["address", "available", "rules"],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "observedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stale": {
                          "type": "boolean",
                          "description": "True when live data was unavailable and the last good value was returned."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing, invalid, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope, or the source address is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or does not belong to this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/firewall/rulesets": {
      "get": {
        "operationId": "listFirewallRulesets",
        "tags": ["Firewall"],
        "summary": "List firewall rule sets",
        "description": "Rule sets that can be applied to a VPS firewall.",
        "security": [
          {
            "bearerAuth": ["network:read"]
          }
        ],
        "x-required-scope": "network:read",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": ["id", "name"],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "observedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stale": {
                          "type": "boolean",
                          "description": "True when live data was unavailable and the last good value was returned."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing, invalid, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope, or the source address is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or does not belong to this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/servers/{serverId}/firewall": {
      "get": {
        "operationId": "getFirewall",
        "tags": ["Firewall"],
        "summary": "Get the VPS firewall",
        "security": [
          {
            "bearerAuth": ["network:read"]
          }
        ],
        "x-required-scope": "network:read",
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`.",
            "schema": {
              "type": "string",
              "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
              "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "rulesets": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "description": "Ids of the applied rule sets."
                        }
                      },
                      "required": ["enabled", "rulesets"],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "observedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stale": {
                          "type": "boolean",
                          "description": "True when live data was unavailable and the last good value was returned."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing, invalid, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope, or the source address is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or does not belong to this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "updateFirewall",
        "tags": ["Firewall"],
        "summary": "Change the VPS firewall",
        "description": "Turn the firewall on or off and choose which rule sets apply.",
        "security": [
          {
            "bearerAuth": ["network:write"]
          }
        ],
        "x-required-scope": "network:write",
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`.",
            "schema": {
              "type": "string",
              "pattern": "^(vps_[A-Za-z0-9-]{1,10}_\\d{1,10}|ded_[0-9a-f-]{36})$",
              "description": "Server id from GET /servers, e.g. `vps_1_4021` or `ded_<uuid>`."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A unique value per intended action (8–128 characters). Repeating a request with the same key returns the first result instead of running the action again.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "rulesets": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "rulesets": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "description": "Ids of the applied rule sets."
                        }
                      },
                      "required": ["enabled", "rulesets"],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "observedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stale": {
                          "type": "boolean",
                          "description": "True when live data was unavailable and the last good value was returned."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing, invalid, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope, or the source address is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or does not belong to this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The resource is not in a state that allows this request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The Idempotency-Key was already used with a different request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["error"],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": ["code", "message", "requestId"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable error code."
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when contacting support."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
