{
  "openapi": "3.1.0",
  "info": {
    "title": "AdaptGroup Cloud API",
    "version": "1.0.0",
    "description": "Cloud API позволяет вашему бекенду продавать и обслуживать VPS, выделенные серверы и дополнительные IPv4 с баланса интеграции.\n\nБазовый адрес: **https://cloud-api.adaptgroup.pro**. Каждый запрос требует `X-Api-Key` и `api_key_id` интеграции в указанном query или JSON-теле. Параметра языка нет; RU и EN описывают один API.\n\nДеньги передаются десятичными строками в USD. Цена тарифа уже включает наценку интеграции; дополнительный трафик VPS и IPv4 оплачиваются по фиксированным ценам. Расчёт цены не списывает баланс и не резервирует ресурсы.\n\nНачните с [Быстрого старта](./quick-start) и [Покупки и жизненного цикла](./purchase-flow). В [Вебхуках](./webhooks) описаны результаты заказов, события услуг и предупреждения об окончании оплаты.\n\n[OpenAPI (English)](/openapi/cloud.json) · [OpenAPI (Русский)](/openapi/cloud.ru.json)"
  },
  "paths": {
    "/balance": {
      "get": {
        "tags": [
          "Balance"
        ],
        "summary": "Баланс",
        "operationId": "check-balance",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceCheckResponse"
                },
                "example": {
                  "success": true,
                  "api_key_id": 1,
                  "balance": "100.0000",
                  "currency": "USD",
                  "balance_updated_at": null
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Возвращает баланс интеграции в USD. Поля находятся на верхнем уровне, без обёртки data.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/dedicated/rentals/quote": {
      "post": {
        "tags": [
          "Dedicated servers"
        ],
        "summary": "Рассчитать аренду сервера",
        "operationId": "quote-rental",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RentalCreateRequest"
              },
              "example": {
                "api_key_id": 1,
                "months": 1,
                "api_user_id": "customer-123",
                "plan_id": 1,
                "os_id": 1,
                "disk_layout": "separate",
                "extra_ipv4_count": 0,
                "auto_renew": false,
                "password": "Example-Password-2026!"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TermQuoteResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "amount_usd": "5.0000",
                    "balance_usd": "100.0000",
                    "currency": "USD",
                    "months": 1,
                    "discount_percent": "0"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Выберите plan_id и поддерживаемую disk_layout из каталога дедиков. Физический сервер выбирает платформа. Передайте ровно одно: пароль или публичный SSH-ключ, в том числе для расчёта. extra_ipv4_count добавляет адреса к аренде по фиксированной цене. Завершённый заказ подтверждает резерв; выдавайте сервер клиенту после dedicated.issued / статуса active. Срок начинается с выдачи.\n\nРасчёт не создаёт заказ, списание или резерв. Можно рассчитывать при недостаточном балансе. При подтверждении покупки передайте amount_usd как expected_amount_usd.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/dedicated/rentals/{rental_id}/renew/quote": {
      "post": {
        "tags": [
          "Dedicated servers"
        ],
        "summary": "Рассчитать продление аренды",
        "operationId": "quote-rental-renewal",
        "parameters": [
          {
            "name": "rental_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Rental Id"
            },
            "description": "Параметр rental_id.",
            "example": 201
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VmRenewBody"
              },
              "example": {
                "api_key_id": 1,
                "months": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TermQuoteResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "amount_usd": "5.0000",
                    "balance_usd": "100.0000",
                    "currency": "USD",
                    "months": 1,
                    "discount_percent": "0"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Продлевает выданную аренду по текущим ценам и скидкам выбранного срока. Дополнительные IPv4 в составе аренды оплачиваются по фиксированной цене. Продление возможно в active или overdue до начала очистки.\n\nРасчёт не создаёт заказ, списание или резерв. Можно рассчитывать при недостаточном балансе. При подтверждении покупки передайте amount_usd как expected_amount_usd.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/dedicated/plans": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Тарифы выделенных серверов",
        "operationId": "list-dedicated-plans",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          },
          {
            "name": "location_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 9223372036854775807,
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "title": "Location Id"
            },
            "description": "Параметр location_id.",
            "example": 1
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "epyc",
                    "ryzen",
                    "xeon",
                    "storage"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Platform"
            },
            "description": "Параметр platform.",
            "example": "epyc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            },
            "description": "Максимальное количество записей на странице.",
            "example": 25
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 2147483647,
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            },
            "description": "Количество пропускаемых записей, начиная с нуля.",
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DedicatedPlansResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "code": "C1",
                      "name": "Example",
                      "platform": "epyc",
                      "cpu_model": "example",
                      "cpu_count": 1,
                      "cpu_cores": 1,
                      "cpu_threads": 1,
                      "ram_gb": 1,
                      "ram_description": null,
                      "disks": [
                        {
                          "count": 1,
                          "size_gb": 1,
                          "type": "example",
                          "model": null
                        }
                      ],
                      "disk_layouts": [
                        "separate"
                      ],
                      "default_disk_layout": "separate",
                      "port_mbps": 1,
                      "traffic_tb": null,
                      "included_ipv4": 1,
                      "ipv6_prefix_length": null,
                      "location_id": 1,
                      "location_name": "Poland",
                      "country_code": "PL",
                      "monthly_price_usd": "5.0000",
                      "extra_ipv4_monthly_price_usd": "5.0000",
                      "extra_traffic_tb_price_usd": "5.0000",
                      "term_discounts": {},
                      "available": 1
                    }
                  ],
                  "total_count": 1,
                  "currency": "USD",
                  "updated_at": null
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Выберите plan_id и один из его disk_layouts. Просмотр доступности не резервирует сервер. Цена сервера включает наценку; цены дополнительных IPv4 и трафика фиксированные. term_discounts содержит скидки по срокам аренды.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/dedicated/rentals": {
      "post": {
        "tags": [
          "Dedicated servers"
        ],
        "summary": "Арендовать выделенный сервер",
        "operationId": "create-rental",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RentalCreateRequest"
              },
              "example": {
                "api_key_id": 1,
                "months": 1,
                "api_user_id": "customer-123",
                "plan_id": 1,
                "os_id": 1,
                "disk_layout": "separate",
                "extra_ipv4_count": 0,
                "auto_renew": false,
                "password": "Example-Password-2026!"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "5.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "error_code": null,
                    "error_message": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Выберите plan_id и поддерживаемую disk_layout из каталога дедиков. Физический сервер выбирает платформа. Передайте ровно одно: пароль или публичный SSH-ключ, в том числе для расчёта. extra_ipv4_count добавляет адреса к аренде по фиксированной цене. Завершённый заказ подтверждает резерв; выдавайте сервер клиенту после dedicated.issued / статуса active. Срок начинается с выдачи.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      },
      "get": {
        "tags": [
          "Dedicated servers"
        ],
        "summary": "Список аренд",
        "operationId": "list-rentals",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          },
          {
            "name": "api_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "pattern": "\\S"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Api User Id"
            },
            "description": "Ваш идентификатор клиента. Строка в пределах интеграции.",
            "example": "customer-123"
          },
          {
            "name": "location_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 9223372036854775807,
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "title": "Location Id"
            },
            "description": "Параметр location_id.",
            "example": 1
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "epyc",
                    "ryzen",
                    "xeon",
                    "storage"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Platform"
            },
            "description": "Параметр platform.",
            "example": "epyc"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "preparing",
                    "active",
                    "overdue",
                    "cleaning",
                    "completed",
                    "cancelled"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            },
            "description": "Параметр status.",
            "example": "preparing"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 25,
              "title": "Limit"
            },
            "description": "Максимальное количество записей на странице.",
            "example": 25
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 2147483647,
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            },
            "description": "Количество пропускаемых записей, начиная с нуля.",
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RentalListResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "api_user_id": "customer-123",
                      "order_id": 401,
                      "status": "preparing",
                      "plan": {
                        "id": 1,
                        "code": "C1",
                        "name": "Example",
                        "platform": "epyc",
                        "cpu_model": "example",
                        "cpu_count": 1,
                        "cpu_cores": 1,
                        "cpu_threads": 1,
                        "ram_gb": 1,
                        "ram_description": null,
                        "disks": [
                          {
                            "count": 1,
                            "size_gb": 1,
                            "type": "example",
                            "model": null
                          }
                        ],
                        "disk_layouts": [
                          "separate"
                        ],
                        "default_disk_layout": "separate",
                        "port_mbps": 1,
                        "traffic_tb": null,
                        "included_ipv4": 1,
                        "ipv6_prefix_length": null
                      },
                      "location_id": 1,
                      "location_name": "Poland",
                      "country_code": "PL",
                      "os": "debian-12",
                      "hostname": null,
                      "disk_layout": "separate",
                      "term_months": 1,
                      "extra_ipv4_count": 1,
                      "auto_renew": false,
                      "issued_at": null,
                      "paid_until": null,
                      "overdue_at": null,
                      "finished_at": null,
                      "created_at": "2026-09-28T12:00:00Z"
                    }
                  ],
                  "total_count": 1
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Список аренд интеграции с фильтрами по клиенту, локации, платформе и статусу. Доступы находятся только в деталях аренды.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/dedicated/rentals/{rental_id}/renew": {
      "post": {
        "tags": [
          "Dedicated servers"
        ],
        "summary": "Продлить аренду",
        "operationId": "renew-rental",
        "parameters": [
          {
            "name": "rental_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Rental Id"
            },
            "description": "Параметр rental_id.",
            "example": 201
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VmRenewBody"
              },
              "example": {
                "api_key_id": 1,
                "months": 1
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "5.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "error_code": null,
                    "error_message": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Продлевает выданную аренду по текущим ценам и скидкам выбранного срока. Дополнительные IPv4 в составе аренды оплачиваются по фиксированной цене. Продление возможно в active или overdue до начала очистки.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/dedicated/rentals/{rental_id}": {
      "patch": {
        "tags": [
          "Dedicated servers"
        ],
        "summary": "Автопродление аренды",
        "operationId": "set-rental-auto-renew",
        "parameters": [
          {
            "name": "rental_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Rental Id"
            },
            "description": "Параметр rental_id.",
            "example": 201
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoRenewBody"
              },
              "example": {
                "api_key_id": 1,
                "auto_renew": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RentalAutoRenewResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "rental_id": 201,
                    "auto_renew": false
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Меняет настройку автопродления без списания баланса и изменения оплаченного срока. По умолчанию false. Сроки попыток, длительность и цены описаны в разделе жизненного цикла.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      },
      "get": {
        "tags": [
          "Dedicated servers"
        ],
        "summary": "Детали аренды и доступы",
        "operationId": "get-rental",
        "parameters": [
          {
            "name": "rental_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Rental Id"
            },
            "description": "Параметр rental_id.",
            "example": 201
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RentalResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "api_user_id": "customer-123",
                    "order_id": 401,
                    "status": "preparing",
                    "plan": {
                      "id": 1,
                      "code": "C1",
                      "name": "Example",
                      "platform": "epyc",
                      "cpu_model": "example",
                      "cpu_count": 1,
                      "cpu_cores": 1,
                      "cpu_threads": 1,
                      "ram_gb": 1,
                      "ram_description": null,
                      "disks": [
                        {
                          "count": 1,
                          "size_gb": 1,
                          "type": "example",
                          "model": null
                        }
                      ],
                      "disk_layouts": [
                        "separate"
                      ],
                      "default_disk_layout": "separate",
                      "port_mbps": 1,
                      "traffic_tb": null,
                      "included_ipv4": 1,
                      "ipv6_prefix_length": null
                    },
                    "location_id": 1,
                    "location_name": "Poland",
                    "country_code": "PL",
                    "os": "debian-12",
                    "hostname": null,
                    "disk_layout": "separate",
                    "term_months": 1,
                    "extra_ipv4_count": 1,
                    "auto_renew": false,
                    "issued_at": null,
                    "paid_until": null,
                    "overdue_at": null,
                    "finished_at": null,
                    "created_at": "2026-09-28T12:00:00Z",
                    "host": null,
                    "login": "root",
                    "password": null,
                    "ssh_public_key": null,
                    "ips": [
                      {
                        "id": 1,
                        "address": "192.0.2.10",
                        "is_primary": true
                      }
                    ]
                  }
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Возвращает оборудование, срок оплаты, статус и доступы аренды. До выдачи доступы могут быть null. Cache-Control: no-store. preparing — подготовка, active — выдан, overdue — оплата истекла, cleaning — освобождение/очистка, completed и cancelled — конечные статусы.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/plans": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Тарифы и доступность VPS",
        "operationId": "list-plans",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          },
          {
            "name": "cpu_percent",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "multipleOf": 20,
              "maximum": 100,
              "minimum": 20,
              "default": 60,
              "title": "Cpu Percent"
            },
            "description": "Доля CPU: 20, 40, 60, 80 или 100. При создании по умолчанию 60; при смене тарифа без поля сохраняется текущая доля.",
            "example": 60
          },
          {
            "name": "location_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 9223372036854775807,
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "title": "Location Id"
            },
            "description": "Параметр location_id.",
            "example": 1
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "epyc",
                    "ryzen",
                    "xeon"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Platform"
            },
            "description": "Параметр platform.",
            "example": "epyc"
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlansListResponse"
                },
                "example": {
                  "success": true,
                  "api_key_id": 1,
                  "cpu_percent": 60,
                  "currency": "USD",
                  "locations": [
                    {
                      "id": 1,
                      "name": "Example",
                      "country_code": "PL",
                      "platforms": [
                        {
                          "platform": "epyc",
                          "cpu_display_name": null,
                          "availability_updated_at": null,
                          "plans": [
                            {
                              "code": "C1",
                              "name": "Example",
                              "cpu_cores": 1,
                              "ram_mb": 1,
                              "disk_gb": 1,
                              "traffic_tb": "5.0000",
                              "monthly_price_usd": "5.0000",
                              "available": null
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Цены уже включают наценку интеграции. cpu_percent по умолчанию 60; варианты: 20, 40, 60, 80, 100. Доступность — снимок, а не резерв. available=null означает отсутствие данных, а не нулевой остаток. cpu_display_name — отображаемая модель CPU.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/reference/os": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Операционные системы",
        "operationId": "list-os",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OsListResponse"
                },
                "example": {
                  "success": true,
                  "os": [
                    {
                      "id": 1,
                      "code": "C1",
                      "name": "Example"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Для покупки и переустановки передавайте числовой os_id из справочника. code — код шаблона ОС, name — отображаемое название.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/firewall": {
      "get": {
        "tags": [
          "Firewall"
        ],
        "summary": "Настройки firewall",
        "operationId": "get-firewall",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmFirewallResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "vm_id": 101,
                    "revision": 0,
                    "applied": true,
                    "input_policy": "ACCEPT",
                    "output_policy": "ACCEPT",
                    "rules": [
                      {
                        "direction": "IN",
                        "action": "ACCEPT",
                        "protocol": "tcp",
                        "ports": [
                          "443"
                        ],
                        "source": null,
                        "destination": null,
                        "enabled": true,
                        "comment": "HTTPS",
                        "id": 1
                      }
                    ],
                    "smtp_ports": [
                      1
                    ],
                    "smtp_blocked": true
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Перед изменением прочитайте текущую revision и передайте её обратно. При конфликте перечитайте настройки перед новой командой. Порядок правил важен; перестановка должна содержать все ID ровно по одному разу. PUT заменяет правило целиком. position отсчитывается от нуля. Не более 100 правил; порты — строки вида \"443\" или \"8000-8010\", только для TCP/UDP. source/destination принимают IP или CIDR одной версии IP. Системную блокировку SMTP здесь снять нельзя.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/firewall/rules": {
      "post": {
        "tags": [
          "Firewall"
        ],
        "summary": "Добавить правило",
        "operationId": "add-firewall-rule",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FirewallAddBody"
              },
              "example": {
                "api_key_id": 1,
                "revision": 0,
                "rule": {
                  "direction": "IN",
                  "action": "ACCEPT",
                  "protocol": "tcp",
                  "ports": [
                    "443"
                  ],
                  "source": null,
                  "destination": null,
                  "enabled": true,
                  "comment": "HTTPS"
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "vm_id": 101,
                    "action": "power",
                    "status": "queued",
                    "created_at": "2026-09-28T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "error_code": null,
                    "error_message": null,
                    "result": null,
                    "requires_review": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Перед изменением прочитайте текущую revision и передайте её обратно. При конфликте перечитайте настройки перед новой командой. Порядок правил важен; перестановка должна содержать все ID ровно по одному разу. PUT заменяет правило целиком. position отсчитывается от нуля. Не более 100 правил; порты — строки вида \"443\" или \"8000-8010\", только для TCP/UDP. source/destination принимают IP или CIDR одной версии IP. Системную блокировку SMTP здесь снять нельзя.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/firewall/rules/{rule_id}": {
      "put": {
        "tags": [
          "Firewall"
        ],
        "summary": "Заменить правило",
        "operationId": "update-firewall-rule",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "rule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Rule Id"
            },
            "description": "Параметр rule_id.",
            "example": 1
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FirewallUpdateBody"
              },
              "example": {
                "api_key_id": 1,
                "revision": 0,
                "rule": {
                  "direction": "IN",
                  "action": "ACCEPT",
                  "protocol": "tcp",
                  "ports": [
                    "443"
                  ],
                  "source": null,
                  "destination": null,
                  "enabled": true,
                  "comment": "HTTPS"
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "vm_id": 101,
                    "action": "power",
                    "status": "queued",
                    "created_at": "2026-09-28T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "error_code": null,
                    "error_message": null,
                    "result": null,
                    "requires_review": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Перед изменением прочитайте текущую revision и передайте её обратно. При конфликте перечитайте настройки перед новой командой. Порядок правил важен; перестановка должна содержать все ID ровно по одному разу. PUT заменяет правило целиком. position отсчитывается от нуля. Не более 100 правил; порты — строки вида \"443\" или \"8000-8010\", только для TCP/UDP. source/destination принимают IP или CIDR одной версии IP. Системную блокировку SMTP здесь снять нельзя.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      },
      "delete": {
        "tags": [
          "Firewall"
        ],
        "summary": "Удалить правило",
        "operationId": "delete-firewall-rule",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "rule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Rule Id"
            },
            "description": "Параметр rule_id.",
            "example": 1
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          },
          {
            "name": "revision",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 0,
              "title": "Revision"
            },
            "description": "Текущая ревизия из GET firewall. При конфликте перечитайте настройки.",
            "example": 0
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "vm_id": 101,
                    "action": "power",
                    "status": "queued",
                    "created_at": "2026-09-28T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "error_code": null,
                    "error_message": null,
                    "result": null,
                    "requires_review": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Перед изменением прочитайте текущую revision и передайте её обратно. При конфликте перечитайте настройки перед новой командой. Порядок правил важен; перестановка должна содержать все ID ровно по одному разу. PUT заменяет правило целиком. position отсчитывается от нуля. Не более 100 правил; порты — строки вида \"443\" или \"8000-8010\", только для TCP/UDP. source/destination принимают IP или CIDR одной версии IP. Системную блокировку SMTP здесь снять нельзя.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/firewall/order": {
      "put": {
        "tags": [
          "Firewall"
        ],
        "summary": "Изменить порядок правил",
        "operationId": "reorder-firewall-rules",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FirewallReorderBody"
              },
              "example": {
                "api_key_id": 1,
                "revision": 0,
                "rule_ids": [
                  1,
                  2
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "vm_id": 101,
                    "action": "power",
                    "status": "queued",
                    "created_at": "2026-09-28T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "error_code": null,
                    "error_message": null,
                    "result": null,
                    "requires_review": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Перед изменением прочитайте текущую revision и передайте её обратно. При конфликте перечитайте настройки перед новой командой. Порядок правил важен; перестановка должна содержать все ID ровно по одному разу. PUT заменяет правило целиком. position отсчитывается от нуля. Не более 100 правил; порты — строки вида \"443\" или \"8000-8010\", только для TCP/UDP. source/destination принимают IP или CIDR одной версии IP. Системную блокировку SMTP здесь снять нельзя.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/firewall/policies": {
      "patch": {
        "tags": [
          "Firewall"
        ],
        "summary": "Политики по умолчанию",
        "operationId": "set-firewall-policies",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FirewallPoliciesBody"
              },
              "example": {
                "api_key_id": 1,
                "revision": 0,
                "input_policy": "ACCEPT",
                "output_policy": "ACCEPT"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "vm_id": 101,
                    "action": "power",
                    "status": "queued",
                    "created_at": "2026-09-28T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "error_code": null,
                    "error_message": null,
                    "result": null,
                    "requires_review": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Перед изменением прочитайте текущую revision и передайте её обратно. При конфликте перечитайте настройки перед новой командой. Порядок правил важен; перестановка должна содержать все ID ровно по одному разу. PUT заменяет правило целиком. position отсчитывается от нуля. Не более 100 правил; порты — строки вида \"443\" или \"8000-8010\", только для TCP/UDP. source/destination принимают IP или CIDR одной версии IP. Системную блокировку SMTP здесь снять нельзя.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/quote": {
      "post": {
        "tags": [
          "VPS billing"
        ],
        "summary": "Рассчитать покупку VPS",
        "operationId": "quote-vm",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VmCreateRequest"
              },
              "example": {
                "api_key_id": 1,
                "api_user_id": "customer-123",
                "location_id": 1,
                "platform": "epyc",
                "plan_code": "C1",
                "cpu_percent": 60,
                "os_id": 1,
                "months": 1,
                "auto_renew": false,
                "password": "Example-Password-2026!",
                "cloud_init": {
                  "packages": [
                    "curl"
                  ],
                  "runcmd": [
                    [
                      "sh",
                      "-c",
                      "echo ready > /root/cloud-init-ready"
                    ]
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TermQuoteResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "amount_usd": "5.0000",
                    "balance_usd": "100.0000",
                    "currency": "USD",
                    "months": 1,
                    "discount_percent": "0"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Выберите тариф, локацию и ОС из каталога. Передайте ровно одно из password или ssh_public_key, в том числе при расчёте цены. SSH-ключ — одна строка публичного ключа OpenSSH (Ed25519, RSA или ECDSA). По умолчанию cpu_percent=60, months=1, auto_renew=false. api_user_id — ваш идентификатор клиента.\n\nРасчёт не создаёт заказ, списание или резерв. Можно рассчитывать при недостаточном балансе. При подтверждении покупки передайте amount_usd как expected_amount_usd.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)\n\nНеобязательный JSON-объект cloud-config, не строка YAML. Не более 65536 байт после серверной JSON-сериализации (не-ASCII символы экранируются). users, packages, runcmd и write_files при наличии должны быть массивами. Сеть, hostname и основной доступ задаёт платформа. При повторе запроса передавайте тот же объект. Результат доступен отдельно в guest_initialization; содержимое cloud_init не возвращается в заказе или вебхуках.\n\nРезультат последней установки: succeeded — cloud-init завершился; failed / cloud_init_failed — ошибка пользовательской настройки; unknown / guest_initialization_timeout — результат не подтверждён за 15 минут. failed и unknown не означают, что работающий VPS не создан: заказ может быть completed, переустановка — succeeded. null — результата нет. Не подтверждает работоспособность приложения."
      }
    },
    "/vms/{vm_id}/renew/quote": {
      "post": {
        "tags": [
          "VPS billing"
        ],
        "summary": "Рассчитать продление VPS",
        "operationId": "quote-vm-renewal",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VmRenewBody"
              },
              "example": {
                "api_key_id": 1,
                "months": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TermQuoteResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "amount_usd": "5.0000",
                    "balance_usd": "100.0000",
                    "currency": "USD",
                    "months": 1,
                    "discount_percent": "0"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Добавляет выбранное количество календарных месяцев к оплаченному сроку либо отсчитывает их от текущего времени, если оплата истекла. Используются текущие цены, наценка и скидка за срок. Продлить нужно до удаления услуги.\n\nРасчёт не создаёт заказ, списание или резерв. Можно рассчитывать при недостаточном балансе. При подтверждении покупки передайте amount_usd как expected_amount_usd.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/resize/quote": {
      "post": {
        "tags": [
          "VPS billing"
        ],
        "summary": "Рассчитать смену тарифа",
        "operationId": "quote-vm-resize",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VmResizeBody"
              },
              "example": {
                "api_key_id": 1,
                "plan_code": "C1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResizeQuoteResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "amount_usd": "5.0000",
                    "balance_usd": "100.0000",
                    "currency": "USD",
                    "vm_id": 101,
                    "new_monthly_price_usd": "10.0000",
                    "paid_until": "2026-09-28T12:00:00Z"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Поддерживается только увеличение: ресурсы CPU, RAM, диск и включённый трафик нельзя уменьшить. Без cpu_percent сохраняется текущая доля. Доплата рассчитывается за остаток оплаченных календарных периодов по текущим ценам тарифов с исходными скидками этих периодов. paid_until не меняется. expected_amount_usd — максимально допустимая доплата: со временем она может уменьшиться.\n\nРасчёт не создаёт заказ, списание или резерв. Можно рассчитывать при недостаточном балансе. При подтверждении покупки передайте amount_usd как expected_amount_usd.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/traffic/topup/quote": {
      "post": {
        "tags": [
          "VPS billing"
        ],
        "summary": "Рассчитать докупку трафика",
        "operationId": "quote-traffic",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VmTrafficTopupBody"
              },
              "example": {
                "api_key_id": 1,
                "traffic_tb": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrafficQuoteResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "amount_usd": "5.0000",
                    "balance_usd": "100.0000",
                    "currency": "USD",
                    "vm_id": 101,
                    "unit_price_usd": "1.0000",
                    "expected_period_id": 601,
                    "period_ends_at": "2026-09-28T12:00:00Z"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "traffic_tb — целое число; единица равна 1099511627776 байт (1024⁴). Цена фиксированная, без наценки интеграции. Трафик действует только в текущем периоде. Передайте expected_period_id из расчёта в покупку, чтобы обнаружить смену периода (409 quote_expired).\n\nРасчёт не создаёт заказ, списание или резерв. Можно рассчитывать при недостаточном балансе. При подтверждении покупки передайте amount_usd как expected_amount_usd.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/ips/quote": {
      "post": {
        "tags": [
          "IP addresses"
        ],
        "summary": "Рассчитать покупку IPv4",
        "operationId": "quote-ip",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VmIpv4PurchaseBody"
              },
              "example": {
                "api_key_id": 1,
                "auto_renew": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ipv4QuoteResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "amount_usd": "5.0000",
                    "balance_usd": "100.0000",
                    "currency": "USD",
                    "vm_id": 101,
                    "period_days": 30
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Покупает один дополнительный IPv4 на 30 суток и назначает его VPS. Цена фиксированная, без наценки интеграции и скидки за срок. Оплата и автопродление адреса независимы от VPS. Не более 10 IPv4 на VPS, включая основной.\n\nРасчёт не создаёт заказ, списание или резерв. Можно рассчитывать при недостаточном балансе. При подтверждении покупки передайте amount_usd как expected_amount_usd.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/password/reset": {
      "post": {
        "tags": [
          "VPS management"
        ],
        "summary": "Сбросить пароль",
        "operationId": "reset-vm-password",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetBody"
              },
              "example": {
                "api_key_id": 1,
                "login": "root",
                "password": "Example-Password-2026!"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "vm_id": 101,
                    "action": "power",
                    "status": "queued",
                    "created_at": "2026-09-28T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "error_code": null,
                    "error_message": null,
                    "result": null,
                    "requires_review": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Меняет пароль существующего пользователя ОС (login по умолчанию root) через гостевой агент. Требуется работающий агент. Ошибка или неподтверждённый результат не доказывают, что пароль остался прежним: проверьте доступ перед новой командой.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/reinstall": {
      "post": {
        "tags": [
          "VPS management"
        ],
        "summary": "Переустановить ОС",
        "operationId": "reinstall-vm",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReinstallBody"
              },
              "example": {
                "api_key_id": 1,
                "os_id": 1,
                "wipe_extra_disks": false,
                "password": "Example-Password-2026!",
                "cloud_init": {
                  "packages": [
                    "curl"
                  ],
                  "runcmd": [
                    [
                      "sh",
                      "-c",
                      "echo ready > /root/cloud-init-ready"
                    ]
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "vm_id": 101,
                    "action": "power",
                    "status": "queued",
                    "created_at": "2026-09-28T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "error_code": null,
                    "error_message": null,
                    "result": null,
                    "requires_review": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Пересоздаёт системный диск с удалением его данных. Дополнительные диски сохраняются, если wipe_extra_disks=false. Передайте пароль либо публичный SSH-ключ; без обоих сохраняются настройки доступа установки. Оба сразу недопустимы. ID VPS, сеть и оплаченный срок сохраняются.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)\n\nНеобязательный JSON-объект cloud-config, не строка YAML. Не более 65536 байт после серверной JSON-сериализации (не-ASCII символы экранируются). users, packages, runcmd и write_files при наличии должны быть массивами. Сеть, hostname и основной доступ задаёт платформа. При повторе запроса передавайте тот же объект. Результат доступен отдельно в guest_initialization; содержимое cloud_init не возвращается в заказе или вебхуках.\n\nРезультат последней установки: succeeded — cloud-init завершился; failed / cloud_init_failed — ошибка пользовательской настройки; unknown / guest_initialization_timeout — результат не подтверждён за 15 минут. failed и unknown не означают, что работающий VPS не создан: заказ может быть completed, переустановка — succeeded. null — результата нет. Не подтверждает работоспособность приложения."
      }
    },
    "/vms/{vm_id}/ips/{ip_id}": {
      "delete": {
        "tags": [
          "IP addresses"
        ],
        "summary": "Снять IPv4",
        "operationId": "detach-ip",
        "parameters": [
          {
            "name": "ip_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Ip Id"
            },
            "description": "Параметр ip_id.",
            "example": 301
          },
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "keep_ip",
            "in": "query",
            "required": true,
            "schema": {
              "type": "boolean",
              "title": "Keep Ip"
            },
            "description": "Сохранить снятый IPv4 с отдельной оплатой (true) либо освободить (false).",
            "example": true
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "vm_id": 101,
                    "action": "power",
                    "status": "queued",
                    "created_at": "2026-09-28T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "error_code": null,
                    "error_message": null,
                    "result": null,
                    "requires_review": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Снимает дополнительный IPv4; основной снять нельзя. keep_ip обязателен в query: true сохраняет адрес с отдельной оплатой, false освобождает. Проверяйте guest_configuration_required и при необходимости меняйте сеть внутри ОС. Неиспользованный срок не возвращается.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      },
      "put": {
        "tags": [
          "IP addresses"
        ],
        "summary": "Назначить сохранённый IPv4",
        "operationId": "attach-ip",
        "parameters": [
          {
            "name": "ip_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Ip Id"
            },
            "description": "Параметр ip_id.",
            "example": 301
          },
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "vm_id": 101,
                    "action": "power",
                    "status": "queued",
                    "created_at": "2026-09-28T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "error_code": null,
                    "error_message": null,
                    "result": null,
                    "requires_review": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Назначает свободный оплаченный сохранённый IPv4 совместимому VPS без новой покупки и изменения срока. api_key_id передаётся в query, JSON-тела нет. Проверяйте guest_configuration_required: может потребоваться обновить сеть внутри гостевой ОС.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}": {
      "delete": {
        "tags": [
          "VPS management"
        ],
        "summary": "Удалить VPS",
        "operationId": "delete-vm",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "keep_ips",
            "in": "query",
            "required": true,
            "schema": {
              "type": "boolean",
              "title": "Keep Ips"
            },
            "description": "Явно сохранить IPv4 с отдельной оплатой (true) либо освободить их (false).",
            "example": true
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "vm_id": 101,
                    "action": "power",
                    "status": "queued",
                    "created_at": "2026-09-28T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "error_code": null,
                    "error_message": null,
                    "result": null,
                    "requires_review": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Безвозвратно удаляет VPS. keep_ips — обязательный query-параметр. true сохраняет IPv4, включая основной, как отдельно оплачиваемые адреса; false освобождает их. Результат содержит held_ips. Неиспользованный срок VPS не возвращается.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      },
      "patch": {
        "tags": [
          "VPS billing"
        ],
        "summary": "Автопродление VPS",
        "operationId": "set-vm-auto-renew",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoRenewBody"
              },
              "example": {
                "api_key_id": 1,
                "auto_renew": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmAutoRenewResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "vm_id": 101,
                    "auto_renew": false
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Меняет настройку автопродления без списания баланса и изменения оплаченного срока. По умолчанию false. Сроки попыток, длительность и цены описаны в разделе жизненного цикла.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      },
      "get": {
        "tags": [
          "VPS management"
        ],
        "summary": "Детали VPS",
        "operationId": "get-vm",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmGetResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "name": "Example",
                    "hostname": "customer-vps",
                    "status": "example",
                    "cpu_cores": 1,
                    "cpu_percent": 60,
                    "ram_mb": 1,
                    "disk_gb": 1,
                    "smtp_blocked": true,
                    "paid_until": null,
                    "created_at": "2026-09-28T12:00:00Z",
                    "updated_at": null,
                    "ips": [
                      {
                        "ip_id": 301,
                        "address": "192.0.2.10",
                        "family": 4,
                        "is_rf_blocked": true,
                        "assigned_at": null,
                        "is_primary": true,
                        "paid_until": null,
                        "suspended_at": null,
                        "auto_renew": null
                      }
                    ],
                    "auto_renew": false,
                    "api_user_id": "customer-123",
                    "plan_code": "C1",
                    "platform": "epyc",
                    "cpu_display_name": null,
                    "location_id": 1,
                    "location_name": "Poland",
                    "country_code": "PL",
                    "city": "example",
                    "os": null,
                    "guest_initialization": {
                      "status": "succeeded",
                      "error_code": null
                    },
                    "rescue": {
                      "active": false,
                      "access": null,
                      "requires_review": false,
                      "operation_id": null,
                      "operation_status": null
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Возвращает ресурсы, локацию, ОС, адреса, срок оплаты и автопродление. Исходный пароль и SSH-ключ VPS в ответ не входят.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)\n\nРезультат последней установки: succeeded — cloud-init завершился; failed / cloud_init_failed — ошибка пользовательской настройки; unknown / guest_initialization_timeout — результат не подтверждён за 15 минут. failed и unknown не означают, что работающий VPS не создан: заказ может быть completed, переустановка — succeeded. null — результата нет. Не подтверждает работоспособность приложения.\n\nСостояние Rescue. active означает сохранённый контекст Rescue, а не гарантию доступности SSH. access: ssh, console или null. requires_review требует проверки состояния; operation_id и operation_status относятся к операции Rescue. null — состояние не получено."
      }
    },
    "/vms": {
      "post": {
        "tags": [
          "VPS billing"
        ],
        "summary": "Купить VPS",
        "operationId": "create-vm",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VmCreateRequest"
              },
              "example": {
                "api_key_id": 1,
                "api_user_id": "customer-123",
                "location_id": 1,
                "platform": "epyc",
                "plan_code": "C1",
                "cpu_percent": 60,
                "os_id": 1,
                "months": 1,
                "auto_renew": false,
                "password": "Example-Password-2026!",
                "cloud_init": {
                  "packages": [
                    "curl"
                  ],
                  "runcmd": [
                    [
                      "sh",
                      "-c",
                      "echo ready > /root/cloud-init-ready"
                    ]
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "5.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "error_code": null,
                    "error_message": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Выберите тариф, локацию и ОС из каталога. Передайте ровно одно из password или ssh_public_key, в том числе при расчёте цены. SSH-ключ — одна строка публичного ключа OpenSSH (Ed25519, RSA или ECDSA). По умолчанию cpu_percent=60, months=1, auto_renew=false. api_user_id — ваш идентификатор клиента.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)\n\nНеобязательный JSON-объект cloud-config, не строка YAML. Не более 65536 байт после серверной JSON-сериализации (не-ASCII символы экранируются). users, packages, runcmd и write_files при наличии должны быть массивами. Сеть, hostname и основной доступ задаёт платформа. При повторе запроса передавайте тот же объект. Результат доступен отдельно в guest_initialization; содержимое cloud_init не возвращается в заказе или вебхуках.\n\nРезультат последней установки: succeeded — cloud-init завершился; failed / cloud_init_failed — ошибка пользовательской настройки; unknown / guest_initialization_timeout — результат не подтверждён за 15 минут. failed и unknown не означают, что работающий VPS не создан: заказ может быть completed, переустановка — succeeded. null — результата нет. Не подтверждает работоспособность приложения."
      },
      "get": {
        "tags": [
          "VPS management"
        ],
        "summary": "Список VPS",
        "operationId": "list-vms",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          },
          {
            "name": "api_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "pattern": "\\S"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Api User Id"
            },
            "description": "Ваш идентификатор клиента. Строка в пределах интеграции.",
            "example": "customer-123"
          },
          {
            "name": "location_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 9223372036854775807,
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "title": "Location Id"
            },
            "description": "Параметр location_id.",
            "example": 1
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "epyc",
                    "ryzen",
                    "xeon"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Platform"
            },
            "description": "Параметр platform.",
            "example": "epyc"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "creating",
                    "stopped",
                    "running",
                    "migrating",
                    "deleting",
                    "deleted",
                    "error"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            },
            "description": "Параметр status.",
            "example": "creating"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 25,
              "title": "Limit"
            },
            "description": "Максимальное количество записей на странице.",
            "example": 25
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 2147483647,
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            },
            "description": "Количество пропускаемых записей, начиная с нуля.",
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmListResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "api_user_id": "customer-123",
                      "name": "Example",
                      "status": "example",
                      "plan_code": "C1",
                      "cpu_cores": 1,
                      "cpu_percent": 60,
                      "ram_mb": 1,
                      "disk_gb": 1,
                      "location_id": 1,
                      "location_name": "Poland",
                      "country_code": "PL",
                      "platform": "epyc",
                      "ips": [
                        "example"
                      ],
                      "paid_until": null,
                      "auto_renew": false
                    }
                  ],
                  "total_count": 1
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Возвращает VPS только этой интеграции. api_user_id фильтрует по вашему идентификатору клиента. total_count — количество всех записей с выбранными фильтрами до limit/offset.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/renew": {
      "post": {
        "tags": [
          "VPS billing"
        ],
        "summary": "Продлить VPS",
        "operationId": "renew-vm",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VmRenewBody"
              },
              "example": {
                "api_key_id": 1,
                "months": 1
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "5.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "error_code": null,
                    "error_message": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Добавляет выбранное количество календарных месяцев к оплаченному сроку либо отсчитывает их от текущего времени, если оплата истекла. Используются текущие цены, наценка и скидка за срок. Продлить нужно до удаления услуги.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/resize": {
      "post": {
        "tags": [
          "VPS billing"
        ],
        "summary": "Сменить тариф VPS",
        "operationId": "resize-vm",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VmResizeBody"
              },
              "example": {
                "api_key_id": 1,
                "plan_code": "C1"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "5.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "error_code": null,
                    "error_message": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Поддерживается только увеличение: ресурсы CPU, RAM, диск и включённый трафик нельзя уменьшить. Без cpu_percent сохраняется текущая доля. Доплата рассчитывается за остаток оплаченных календарных периодов по текущим ценам тарифов с исходными скидками этих периодов. paid_until не меняется. expected_amount_usd — максимально допустимая доплата: со временем она может уменьшиться.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/ips": {
      "post": {
        "tags": [
          "IP addresses"
        ],
        "summary": "Купить IPv4",
        "operationId": "buy-ip",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VmIpv4PurchaseBody"
              },
              "example": {
                "api_key_id": 1,
                "auto_renew": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "5.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "error_code": null,
                    "error_message": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Покупает один дополнительный IPv4 на 30 суток и назначает его VPS. Цена фиксированная, без наценки интеграции и скидки за срок. Оплата и автопродление адреса независимы от VPS. Не более 10 IPv4 на VPS, включая основной.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/status": {
      "get": {
        "tags": [
          "VPS management"
        ],
        "summary": "Состояние питания",
        "operationId": "get-vm-status",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmStatusResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "vm_id": 101,
                    "status": "example",
                    "uptime": 1
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Возвращает текущее состояние питания и uptime в секундах.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/console/link": {
      "post": {
        "tags": [
          "VPS management"
        ],
        "summary": "Ссылка на консоль",
        "operationId": "create-console-link",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmConsoleLinkResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "vm_id": 101,
                    "url": "https://console.example.com/session/example",
                    "expires_at": "2026-09-28T12:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Создаёт одноразовую ссылку консоли со сроком expires_at. api_key_id передаётся в query; JSON-тела и Idempotency-Key нет. Ответ содержит Cache-Control: no-store.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/metrics": {
      "get": {
        "tags": [
          "VPS management"
        ],
        "summary": "Мониторинг",
        "operationId": "get-vm-metrics",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "timeframe",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "hour",
                "day",
                "week",
                "month",
                "year"
              ],
              "type": "string",
              "default": "hour",
              "title": "Timeframe"
            },
            "description": "Параметр timeframe.",
            "example": "hour"
          },
          {
            "name": "cf",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "AVERAGE",
                "MAX"
              ],
              "type": "string",
              "default": "AVERAGE",
              "title": "Cf"
            },
            "description": "Параметр cf.",
            "example": "AVERAGE"
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmMetricsResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "vm_id": 101,
                    "timeframe": "hour",
                    "cf": "AVERAGE",
                    "points": [
                      {
                        "time": 1790596800,
                        "cpu_percent": null,
                        "memory_used_bytes": null,
                        "memory_total_bytes": null,
                        "network_in_mbps": null,
                        "network_out_mbps": null,
                        "disk_read_bytes_per_second": null,
                        "disk_write_bytes_per_second": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Выберите интервал и агрегацию (AVERAGE или MAX). null означает отсутствие замера, а не ноль. time — Unix timestamp; скорость сети — Мбит/с, память — байты, скорость диска — байты/с.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/traffic": {
      "get": {
        "tags": [
          "VPS management"
        ],
        "summary": "Расход трафика",
        "operationId": "get-vm-traffic",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmTrafficResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "vm_id": 101,
                    "enabled": true,
                    "period": null,
                    "last_sample_at": null,
                    "shaping": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Возвращает текущий период, квоту, расход и ограничение скорости. Счётчики в байтах и время относятся к последнему доступному замеру. Отсутствующий период или ограничение обозначается null.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/traffic/topup": {
      "post": {
        "tags": [
          "VPS billing"
        ],
        "summary": "Докупить трафик",
        "operationId": "buy-traffic",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VmTrafficTopupBody"
              },
              "example": {
                "api_key_id": 1,
                "traffic_tb": 1
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "5.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "error_code": null,
                    "error_message": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "traffic_tb — целое число; единица равна 1099511627776 байт (1024⁴). Цена фиксированная, без наценки интеграции. Трафик действует только в текущем периоде. Передайте expected_period_id из расчёта в покупку, чтобы обнаружить смену периода (409 quote_expired).\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/power": {
      "post": {
        "tags": [
          "VPS management"
        ],
        "summary": "Управление питанием",
        "operationId": "change-vm-power",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VmPowerBody"
              },
              "example": {
                "api_key_id": 1,
                "action": "start"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "vm_id": 101,
                    "action": "power",
                    "status": "queued",
                    "created_at": "2026-09-28T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "error_code": null,
                    "error_message": null,
                    "result": null,
                    "requires_review": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "start запускает VPS; shutdown и reboot запрашивают штатное выключение/перезагрузку ОС. stop принудительно выключает питание, reset принудительно перезагружает; несохранённые данные могут быть потеряны.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/operations": {
      "get": {
        "tags": [
          "VPS management"
        ],
        "summary": "История операций",
        "operationId": "list-vm-operations",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            },
            "description": "Максимальное количество записей на странице.",
            "example": 25
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 2147483647,
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            },
            "description": "Количество пропускаемых записей, начиная с нуля.",
            "example": 0
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationListResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "vm_id": 101,
                      "action": "start",
                      "status": "queued",
                      "created_at": "2026-09-28T12:00:00Z",
                      "started_at": null,
                      "finished_at": null,
                      "attempts": 1,
                      "order_id": null,
                      "power_action": null,
                      "requires_review": null,
                      "error_code": null,
                      "error_message": null
                    }
                  ],
                  "total_count": 1
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Операции и оплаченные заказы имеют разные идентификаторы. data.id ответа команды — operation_id. queued/running не означают завершение; succeeded/failed — конечный результат команды. В истории также бывает cancelled. result заполняется только при успешном удалении, назначении/снятии IP, смене пароля и переустановке; остальное состояние читайте через маршруты статуса/firewall.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/operations/{operation_id}": {
      "get": {
        "tags": [
          "VPS management"
        ],
        "summary": "Результат операции",
        "operationId": "get-vm-operation",
        "parameters": [
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Operation Id"
            },
            "description": "Параметр operation_id.",
            "example": 501
          },
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "vm_id": 101,
                    "action": "power",
                    "status": "queued",
                    "created_at": "2026-09-28T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "error_code": null,
                    "error_message": null,
                    "result": null,
                    "requires_review": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Операции и оплаченные заказы имеют разные идентификаторы. data.id ответа команды — operation_id. queued/running не означают завершение; succeeded/failed — конечный результат команды. В истории также бывает cancelled. result заполняется только при успешном удалении, назначении/снятии IP, смене пароля и переустановке; остальное состояние читайте через маршруты статуса/firewall.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)\n\nРезультат последней установки: succeeded — cloud-init завершился; failed / cloud_init_failed — ошибка пользовательской настройки; unknown / guest_initialization_timeout — результат не подтверждён за 15 минут. failed и unknown не означают, что работающий VPS не создан: заказ может быть completed, переустановка — succeeded. null — результата нет. Не подтверждает работоспособность приложения.\n\nСостояние Rescue. active означает сохранённый контекст Rescue, а не гарантию доступности SSH. access: ssh, console или null. requires_review требует проверки состояния; operation_id и operation_status относятся к операции Rescue. null — состояние не получено."
      }
    },
    "/ips/{ip_id}": {
      "delete": {
        "tags": [
          "IP addresses"
        ],
        "summary": "Освободить сохранённый IPv4",
        "operationId": "release-ip",
        "parameters": [
          {
            "name": "ip_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Ip Id"
            },
            "description": "Параметр ip_id.",
            "example": 301
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IpReleaseResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "operation_id": 501,
                    "ip_id": 301,
                    "address": "192.0.2.10",
                    "family": 4,
                    "status": "released"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Безвозвратно освобождает сохранённый IPv4 без привязки к VPS. Списание или возврат не создаётся. Результат содержит operation_id; HTTP 200 подтверждает освобождение.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      },
      "patch": {
        "tags": [
          "IP addresses"
        ],
        "summary": "Автопродление IPv4",
        "operationId": "set-ip-auto-renew",
        "parameters": [
          {
            "name": "ip_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Ip Id"
            },
            "description": "Параметр ip_id.",
            "example": 301
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoRenewBody"
              },
              "example": {
                "api_key_id": 1,
                "auto_renew": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IpAutoRenewResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "ip_id": 301,
                    "auto_renew": false
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Меняет настройку автопродления без списания баланса и изменения оплаченного срока. По умолчанию false. Сроки попыток, длительность и цены описаны в разделе жизненного цикла.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/ips/{ip_id}/renew": {
      "post": {
        "tags": [
          "IP addresses"
        ],
        "summary": "Продлить IPv4",
        "operationId": "renew-ip",
        "parameters": [
          {
            "name": "ip_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Ip Id"
            },
            "description": "Параметр ip_id.",
            "example": 301
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRequest"
              },
              "example": {
                "api_key_id": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IpRenewResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "completed",
                    "amount_usd": "5.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "error_code": null,
                    "error_message": null,
                    "ip_id": 301,
                    "paid_until": "2026-10-28T12:00:00Z"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Продлевает отдельно оплачиваемый назначенный или сохранённый IPv4 на 30 суток от max(текущее время, paid_until). Использует текущую фиксированную месячную цену без наценки и скидки. Включённый основной IPv4 и IPv6 отдельно не продлеваются. Возвращает HTTP 200, завершённый заказ и новый paid_until.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/ips": {
      "get": {
        "tags": [
          "IP addresses"
        ],
        "summary": "Список IP-адресов",
        "operationId": "list-ips",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          },
          {
            "name": "attachment",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "all",
                "attached",
                "unattached"
              ],
              "type": "string",
              "default": "all",
              "title": "Attachment"
            },
            "description": "all включает все адреса; unattached выбирает сохранённые адреса без VPS.",
            "example": "all"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 25,
              "title": "Limit"
            },
            "description": "Максимальное количество записей на странице.",
            "example": 25
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 2147483647,
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            },
            "description": "Количество пропускаемых записей, начиная с нуля.",
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IpListResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "ip_id": 301,
                      "address": "192.0.2.10",
                      "family": 4,
                      "api_user_id": "customer-123",
                      "vm_id": null,
                      "is_primary": true,
                      "location_id": 1,
                      "location_name": "Poland",
                      "country_code": "PL",
                      "paid_until": null,
                      "suspended_at": null,
                      "status": "active",
                      "auto_renew": null,
                      "monthly_price_usd": null,
                      "currency": "USD"
                    }
                  ],
                  "total_count": 1
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Включает назначенные и сохранённые адреса. attachment=unattached выбирает сохранённые адреса с vm_id=null. Своя цена продления и автопродление есть только у отдельно оплачиваемых IPv4; у включённых основных IPv4 и IPv6 поля оплаты могут быть null. Цены фиксированные, без наценки.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/orders/{order_id}": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Детали заказа",
        "operationId": "get-order",
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Order Id"
            },
            "description": "Параметр order_id.",
            "example": 401
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderDetailsResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "5.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "error_code": null,
                    "error_message": null,
                    "order_type": "vm_purchase",
                    "api_user_id": "customer-123",
                    "ip_id": null,
                    "created_at": "2026-09-28T12:00:00Z",
                    "updated_at": null,
                    "completed_at": null,
                    "parameters": {}
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Оплаченные заказы отделены от операций VPS. Статусы: pending, processing, completed, failed, refunded, review. completed при покупке дедика означает резерв, а не выдачу. review — неопределённый или частичный результат, требующий выяснения; не создавайте повторную покупку. parameters содержит только публичные поля без паролей и себестоимости.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/orders": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Список заказов",
        "operationId": "list-orders",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          },
          {
            "name": "api_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "title": "Api User Id"
            },
            "description": "Ваш идентификатор клиента. Строка в пределах интеграции.",
            "example": "customer-123"
          },
          {
            "name": "order_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "vm_purchase",
                    "vm_renewal",
                    "vm_resize",
                    "traffic_purchase",
                    "ipv4_purchase",
                    "ipv4_renewal",
                    "dedicated_purchase",
                    "dedicated_renewal"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Order Type"
            },
            "description": "Параметр order_type.",
            "example": "vm_purchase"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "pending",
                    "processing",
                    "completed",
                    "failed",
                    "refunded",
                    "review"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            },
            "description": "Параметр status.",
            "example": "pending"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            },
            "description": "Максимальное количество записей на странице.",
            "example": 25
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 2147483647,
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            },
            "description": "Количество пропускаемых записей, начиная с нуля.",
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderListResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "order_id": 401,
                      "status": "pending",
                      "amount_usd": "5.0000",
                      "currency": "USD",
                      "vm_id": null,
                      "rental_id": null,
                      "error_code": null,
                      "error_message": null,
                      "order_type": "vm_purchase",
                      "api_user_id": "customer-123",
                      "ip_id": null,
                      "created_at": "2026-09-28T12:00:00Z",
                      "updated_at": null,
                      "completed_at": null
                    }
                  ],
                  "total_count": 1
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Оплаченные заказы отделены от операций VPS. Статусы: pending, processing, completed, failed, refunded, review. completed при покупке дедика означает резерв, а не выдачу. review — неопределённый или частичный результат, требующий выяснения; не создавайте повторную покупку. parameters содержит только публичные поля без паролей и себестоимости.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/transactions": {
      "get": {
        "tags": [
          "Balance"
        ],
        "summary": "История транзакций",
        "operationId": "list-transactions",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          },
          {
            "name": "transaction_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "topup",
                    "vm_purchase",
                    "vm_renewal",
                    "vm_resize",
                    "traffic_purchase",
                    "ipv4_purchase",
                    "ipv4_renewal",
                    "dedicated_purchase",
                    "dedicated_renewal",
                    "refund",
                    "adjustment"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Transaction Type"
            },
            "description": "Параметр transaction_type.",
            "example": "topup"
          },
          {
            "name": "order_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 9223372036854775807,
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "title": "Order Id"
            },
            "description": "Параметр order_id.",
            "example": 401
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date From"
            },
            "description": "Первая включённая дата UTC (YYYY-MM-DD).",
            "example": "2026-09-28"
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date To"
            },
            "description": "Последняя включённая дата UTC (YYYY-MM-DD).",
            "example": "2026-09-28"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            },
            "description": "Максимальное количество записей на странице.",
            "example": 25
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 2147483647,
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            },
            "description": "Количество пропускаемых записей, начиная с нуля.",
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionListResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "transaction_type": "topup",
                      "amount_usd": "5.0000",
                      "balance_before": "100.0000",
                      "balance_after": "95.0000",
                      "order_id": null,
                      "comment": null,
                      "created_at": "2026-09-28T12:00:00Z"
                    }
                  ],
                  "total_count": 1,
                  "currency": "USD",
                  "limit": 25,
                  "offset": 0
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Возвращает движения баланса интеграции. amount_usd со знаком: списание отрицательное, пополнение положительное. order_id может быть null, например при пополнении. Фильтры дат включают полные сутки UTC. Это транзакции интеграции, а не организации.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/rescue": {
      "put": {
        "tags": [
          "VPS management"
        ],
        "summary": "Включить Rescue",
        "operationId": "enable-vm-rescue",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RescueEnableBody"
              },
              "example": {
                "api_key_id": 1,
                "password": "Temporary-Rescue-2026!"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "vm_id": 101,
                    "action": "rescue_enable",
                    "status": "queued",
                    "created_at": "2026-09-28T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "error_code": null,
                    "error_message": null,
                    "result": null,
                    "requires_review": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Перезагружает VPS в Rescue, сохраняя диски и сеть. Требуется не менее 2048 МиБ RAM и оплаченный VPS. Передайте временный пароль; после успеха подключайтесь root по SSH к IP VPS, порт 22. Правила firewall продолжают действовать. В Rescue недоступны смена тарифа, переустановка ОС и сброс пароля основной ОС. Проверяйте операцию и rescue в деталях VPS. При rescue_not_ready или requires_review=true проверьте состояние и выйдите из Rescue; повторяйте потерянный запрос с исходным Idempotency-Key.\n\nHTTP 202 означает принятие. Проверяйте результат через GET /vms/{vm_id}/operations/{operation_id}; data.id — ID операции. [Вебхуки](./webhooks)."
      },
      "delete": {
        "tags": [
          "VPS management"
        ],
        "summary": "Выключить Rescue",
        "operationId": "disable-vm-rescue",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            },
            "description": "Параметр vm_id.",
            "example": 101
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key.",
            "example": 1
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            },
            "description": "Уникальный ключ действия, 1–200 печатных ASCII-символов без пробелов. Повторяйте то же действие с тем же ключом и неизменными параметрами.",
            "example": "example-action-20260928-001"
          }
        ],
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "vm_id": 101,
                    "action": "rescue_disable",
                    "status": "queued",
                    "created_at": "2026-09-28T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "error_code": null,
                    "error_message": null,
                    "result": null,
                    "requires_review": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не найден в интеграции",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт параметров или состояния; проверьте detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Выходит из Rescue и восстанавливает загрузку обычной ОС. Оплаченный VPS запускается; при истёкшей оплате или приостановке остаётся выключенным. Выход доступен также из состояния error, если контекст Rescue сохранён. api_key_id передаётся в query, тело и пароль не нужны. Используйте отдельный Idempotency-Key для команды выхода.\n\nHTTP 202 означает принятие. Проверяйте результат через GET /vms/{vm_id}/operations/{operation_id}; data.id — ID операции. [Вебхуки](./webhooks)."
      }
    }
  },
  "components": {
    "schemas": {
      "ApiRequest": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id"
        ],
        "title": "ApiRequest",
        "example": {
          "api_key_id": 1
        }
      },
      "AutoRenewBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "auto_renew": {
            "type": "boolean",
            "title": "Auto Renew",
            "description": "Автопродление с баланса интеграции. Изменение флага само по себе не продлевает услугу."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "auto_renew"
        ],
        "title": "AutoRenewBody",
        "example": {
          "api_key_id": 1,
          "auto_renew": false
        }
      },
      "BalanceCheckResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "api_key_id": {
            "type": "integer",
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "balance": {
            "type": "string",
            "title": "Balance"
          },
          "currency": {
            "type": "string",
            "const": "USD",
            "title": "Currency",
            "default": "USD"
          },
          "balance_updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Balance Updated At"
          }
        },
        "type": "object",
        "required": [
          "success",
          "api_key_id",
          "balance"
        ],
        "title": "BalanceCheckResponse",
        "example": {
          "success": true,
          "api_key_id": 1,
          "balance": "100.0000",
          "currency": "USD",
          "balance_updated_at": null
        }
      },
      "DedicatedDisk": {
        "properties": {
          "count": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Count"
          },
          "size_gb": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Size Gb"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          }
        },
        "type": "object",
        "required": [
          "count",
          "size_gb",
          "type"
        ],
        "title": "DedicatedDisk"
      },
      "DedicatedHardware": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "code": {
            "type": "string",
            "title": "Code"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "platform": {
            "type": "string",
            "enum": [
              "epyc",
              "ryzen",
              "xeon",
              "storage"
            ],
            "title": "Platform"
          },
          "cpu_model": {
            "type": "string",
            "title": "Cpu Model"
          },
          "cpu_count": {
            "type": "integer",
            "title": "Cpu Count"
          },
          "cpu_cores": {
            "type": "integer",
            "title": "Cpu Cores"
          },
          "cpu_threads": {
            "type": "integer",
            "title": "Cpu Threads"
          },
          "ram_gb": {
            "type": "integer",
            "title": "Ram Gb"
          },
          "ram_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ram Description"
          },
          "disks": {
            "items": {
              "$ref": "#/components/schemas/DedicatedDisk"
            },
            "type": "array",
            "title": "Disks"
          },
          "disk_layouts": {
            "items": {
              "type": "string",
              "enum": [
                "separate",
                "lvm_linear",
                "raid0",
                "raid1"
              ]
            },
            "type": "array",
            "title": "Disk Layouts"
          },
          "default_disk_layout": {
            "type": "string",
            "enum": [
              "separate",
              "lvm_linear",
              "raid0",
              "raid1"
            ],
            "title": "Default Disk Layout"
          },
          "port_mbps": {
            "type": "integer",
            "title": "Port Mbps"
          },
          "traffic_tb": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Traffic Tb",
            "description": "Целое количество дополнительных единиц трафика; единица равна 1024⁴ байт."
          },
          "included_ipv4": {
            "type": "integer",
            "title": "Included Ipv4"
          },
          "ipv6_prefix_length": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ipv6 Prefix Length"
          }
        },
        "type": "object",
        "required": [
          "id",
          "code",
          "name",
          "platform",
          "cpu_model",
          "cpu_count",
          "cpu_cores",
          "cpu_threads",
          "ram_gb",
          "ram_description",
          "disks",
          "disk_layouts",
          "default_disk_layout",
          "port_mbps",
          "traffic_tb",
          "included_ipv4",
          "ipv6_prefix_length"
        ],
        "title": "DedicatedHardware"
      },
      "DedicatedPlan": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "code": {
            "type": "string",
            "title": "Code"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "platform": {
            "type": "string",
            "enum": [
              "epyc",
              "ryzen",
              "xeon",
              "storage"
            ],
            "title": "Platform"
          },
          "cpu_model": {
            "type": "string",
            "title": "Cpu Model"
          },
          "cpu_count": {
            "type": "integer",
            "title": "Cpu Count"
          },
          "cpu_cores": {
            "type": "integer",
            "title": "Cpu Cores"
          },
          "cpu_threads": {
            "type": "integer",
            "title": "Cpu Threads"
          },
          "ram_gb": {
            "type": "integer",
            "title": "Ram Gb"
          },
          "ram_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ram Description"
          },
          "disks": {
            "items": {
              "$ref": "#/components/schemas/DedicatedDisk"
            },
            "type": "array",
            "title": "Disks"
          },
          "disk_layouts": {
            "items": {
              "type": "string",
              "enum": [
                "separate",
                "lvm_linear",
                "raid0",
                "raid1"
              ]
            },
            "type": "array",
            "title": "Disk Layouts"
          },
          "default_disk_layout": {
            "type": "string",
            "enum": [
              "separate",
              "lvm_linear",
              "raid0",
              "raid1"
            ],
            "title": "Default Disk Layout"
          },
          "port_mbps": {
            "type": "integer",
            "title": "Port Mbps"
          },
          "traffic_tb": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Traffic Tb",
            "description": "Целое количество дополнительных единиц трафика; единица равна 1024⁴ байт."
          },
          "included_ipv4": {
            "type": "integer",
            "title": "Included Ipv4"
          },
          "ipv6_prefix_length": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ipv6 Prefix Length"
          },
          "location_id": {
            "type": "integer",
            "title": "Location Id"
          },
          "location_name": {
            "type": "string",
            "title": "Location Name"
          },
          "country_code": {
            "type": "string",
            "title": "Country Code"
          },
          "monthly_price_usd": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Monthly Price Usd"
          },
          "extra_ipv4_monthly_price_usd": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Extra Ipv4 Monthly Price Usd"
          },
          "extra_traffic_tb_price_usd": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Extra Traffic Tb Price Usd"
          },
          "term_discounts": {
            "additionalProperties": {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            "type": "object",
            "title": "Term Discounts"
          },
          "available": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Available",
            "description": "Текущее доступное количество. Снимок не резервирует ресурсы."
          }
        },
        "type": "object",
        "required": [
          "id",
          "code",
          "name",
          "platform",
          "cpu_model",
          "cpu_count",
          "cpu_cores",
          "cpu_threads",
          "ram_gb",
          "ram_description",
          "disks",
          "disk_layouts",
          "default_disk_layout",
          "port_mbps",
          "traffic_tb",
          "included_ipv4",
          "ipv6_prefix_length",
          "location_id",
          "location_name",
          "country_code",
          "monthly_price_usd",
          "extra_ipv4_monthly_price_usd",
          "extra_traffic_tb_price_usd",
          "term_discounts",
          "available"
        ],
        "title": "DedicatedPlan"
      },
      "DedicatedPlansResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/DedicatedPlan"
            },
            "type": "array",
            "title": "Data"
          },
          "total_count": {
            "type": "integer",
            "title": "Total Count",
            "description": "Полное количество записей с учётом фильтров, до пагинации."
          },
          "currency": {
            "type": "string",
            "const": "USD",
            "title": "Currency",
            "default": "USD"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data",
          "total_count",
          "updated_at"
        ],
        "title": "DedicatedPlansResponse",
        "example": {
          "success": true,
          "data": [
            {
              "id": 1,
              "code": "C1",
              "name": "Example",
              "platform": "epyc",
              "cpu_model": "example",
              "cpu_count": 1,
              "cpu_cores": 1,
              "cpu_threads": 1,
              "ram_gb": 1,
              "ram_description": null,
              "disks": [
                {
                  "count": 1,
                  "size_gb": 1,
                  "type": "example",
                  "model": null
                }
              ],
              "disk_layouts": [
                "separate"
              ],
              "default_disk_layout": "separate",
              "port_mbps": 1,
              "traffic_tb": null,
              "included_ipv4": 1,
              "ipv6_prefix_length": null,
              "location_id": 1,
              "location_name": "Poland",
              "country_code": "PL",
              "monthly_price_usd": "5.0000",
              "extra_ipv4_monthly_price_usd": "5.0000",
              "extra_traffic_tb_price_usd": "5.0000",
              "term_discounts": {},
              "available": 1
            }
          ],
          "total_count": 1,
          "currency": "USD",
          "updated_at": null
        }
      },
      "FirewallAddBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "revision": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Revision",
            "description": "Текущая ревизия из GET firewall. При конфликте перечитайте настройки."
          },
          "rule": {
            "$ref": "#/components/schemas/FirewallRule"
          },
          "position": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 100.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "revision",
          "rule"
        ],
        "title": "FirewallAddBody",
        "example": {
          "api_key_id": 1,
          "revision": 0,
          "rule": {
            "direction": "IN",
            "action": "ACCEPT",
            "protocol": "tcp",
            "ports": [
              "443"
            ],
            "source": null,
            "destination": null,
            "enabled": true,
            "comment": "HTTPS"
          }
        }
      },
      "FirewallPoliciesBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "revision": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Revision",
            "description": "Текущая ревизия из GET firewall. При конфликте перечитайте настройки."
          },
          "input_policy": {
            "type": "string",
            "enum": [
              "ACCEPT",
              "DROP"
            ],
            "title": "Input Policy"
          },
          "output_policy": {
            "type": "string",
            "enum": [
              "ACCEPT",
              "DROP"
            ],
            "title": "Output Policy"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "revision",
          "input_policy",
          "output_policy"
        ],
        "title": "FirewallPoliciesBody",
        "example": {
          "api_key_id": 1,
          "revision": 0,
          "input_policy": "ACCEPT",
          "output_policy": "ACCEPT"
        }
      },
      "FirewallReorderBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "revision": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Revision",
            "description": "Текущая ревизия из GET firewall. При конфликте перечитайте настройки."
          },
          "rule_ids": {
            "items": {
              "type": "integer",
              "maximum": 9.223372036854776e+18,
              "minimum": 1.0
            },
            "type": "array",
            "maxItems": 100,
            "title": "Rule Ids",
            "description": "Все ID существующих правил, по одному разу, в нужном порядке."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "revision",
          "rule_ids"
        ],
        "title": "FirewallReorderBody",
        "example": {
          "api_key_id": 1,
          "revision": 0,
          "rule_ids": [
            1,
            2
          ]
        }
      },
      "FirewallRule": {
        "properties": {
          "direction": {
            "type": "string",
            "enum": [
              "IN",
              "OUT"
            ],
            "title": "Direction"
          },
          "action": {
            "type": "string",
            "enum": [
              "ACCEPT",
              "DROP"
            ],
            "title": "Action"
          },
          "protocol": {
            "type": "string",
            "enum": [
              "tcp",
              "udp",
              "tcp_udp",
              "icmp",
              "icmpv6",
              "any"
            ],
            "title": "Protocol"
          },
          "ports": {
            "items": {
              "type": "string",
              "pattern": "^[0-9]{1,5}(-[0-9]{1,5})?$"
            },
            "type": "array",
            "maxItems": 32,
            "title": "Ports"
          },
          "source": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 49
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "destination": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 49
              },
              {
                "type": "null"
              }
            ],
            "title": "Destination"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          },
          "comment": {
            "type": "string",
            "maxLength": 255,
            "title": "Comment",
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "direction",
          "action",
          "protocol"
        ],
        "title": "FirewallRule"
      },
      "FirewallRuleItem": {
        "properties": {
          "direction": {
            "type": "string",
            "enum": [
              "IN",
              "OUT"
            ],
            "title": "Direction"
          },
          "action": {
            "type": "string",
            "enum": [
              "ACCEPT",
              "DROP"
            ],
            "title": "Action"
          },
          "protocol": {
            "type": "string",
            "enum": [
              "tcp",
              "udp",
              "tcp_udp",
              "icmp",
              "icmpv6",
              "any"
            ],
            "title": "Protocol"
          },
          "ports": {
            "items": {
              "type": "string",
              "pattern": "^[0-9]{1,5}(-[0-9]{1,5})?$"
            },
            "type": "array",
            "maxItems": 32,
            "title": "Ports"
          },
          "source": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 49
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "destination": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 49
              },
              {
                "type": "null"
              }
            ],
            "title": "Destination"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          },
          "comment": {
            "type": "string",
            "maxLength": 255,
            "title": "Comment",
            "default": ""
          },
          "id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Id"
          }
        },
        "type": "object",
        "required": [
          "direction",
          "action",
          "protocol",
          "id"
        ],
        "title": "FirewallRuleItem"
      },
      "FirewallUpdateBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "revision": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Revision",
            "description": "Текущая ревизия из GET firewall. При конфликте перечитайте настройки."
          },
          "rule": {
            "$ref": "#/components/schemas/FirewallRule"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "revision",
          "rule"
        ],
        "title": "FirewallUpdateBody",
        "example": {
          "api_key_id": 1,
          "revision": 0,
          "rule": {
            "direction": "IN",
            "action": "ACCEPT",
            "protocol": "tcp",
            "ports": [
              "443"
            ],
            "source": null,
            "destination": null,
            "enabled": true,
            "comment": "HTTPS"
          }
        }
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HeldIpv4": {
        "properties": {
          "ip_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Ip Id"
          },
          "address": {
            "type": "string",
            "format": "ipv4interface",
            "title": "Address"
          },
          "family": {
            "type": "integer",
            "const": 4,
            "title": "Family"
          },
          "paid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid Until",
            "description": "Окончание оплаченного срока услуги, UTC."
          }
        },
        "type": "object",
        "required": [
          "ip_id",
          "address",
          "family",
          "paid_until"
        ],
        "title": "HeldIpv4"
      },
      "IpAutoRenewData": {
        "properties": {
          "ip_id": {
            "type": "integer",
            "title": "Ip Id"
          },
          "auto_renew": {
            "type": "boolean",
            "title": "Auto Renew",
            "description": "Автопродление с баланса интеграции. Изменение флага само по себе не продлевает услугу."
          }
        },
        "type": "object",
        "required": [
          "ip_id",
          "auto_renew"
        ],
        "title": "IpAutoRenewData"
      },
      "IpAutoRenewResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/IpAutoRenewData"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "IpAutoRenewResponse",
        "example": {
          "success": true,
          "data": {
            "ip_id": 301,
            "auto_renew": false
          }
        }
      },
      "IpListItem": {
        "properties": {
          "ip_id": {
            "type": "integer",
            "title": "Ip Id"
          },
          "address": {
            "type": "string",
            "title": "Address"
          },
          "family": {
            "type": "integer",
            "enum": [
              4,
              6
            ],
            "title": "Family"
          },
          "api_user_id": {
            "type": "string",
            "title": "Api User Id",
            "description": "Ваш идентификатор клиента. Строка в пределах интеграции."
          },
          "vm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Id"
          },
          "is_primary": {
            "type": "boolean",
            "title": "Is Primary"
          },
          "location_id": {
            "type": "integer",
            "title": "Location Id"
          },
          "location_name": {
            "type": "string",
            "title": "Location Name"
          },
          "country_code": {
            "type": "string",
            "title": "Country Code"
          },
          "paid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid Until",
            "description": "Окончание оплаченного срока услуги, UTC."
          },
          "suspended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suspended At"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "expired",
              "suspended",
              "unknown"
            ],
            "title": "Status"
          },
          "auto_renew": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Renew",
            "description": "Автопродление с баланса интеграции. Изменение флага само по себе не продлевает услугу."
          },
          "monthly_price_usd": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Price Usd"
          },
          "currency": {
            "type": "string",
            "const": "USD",
            "title": "Currency",
            "default": "USD"
          }
        },
        "type": "object",
        "required": [
          "ip_id",
          "address",
          "family",
          "api_user_id",
          "vm_id",
          "is_primary",
          "location_id",
          "location_name",
          "country_code",
          "paid_until",
          "suspended_at",
          "status",
          "auto_renew",
          "monthly_price_usd"
        ],
        "title": "IpListItem"
      },
      "IpListResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/IpListItem"
            },
            "type": "array",
            "title": "Data"
          },
          "total_count": {
            "type": "integer",
            "title": "Total Count",
            "description": "Полное количество записей с учётом фильтров, до пагинации."
          }
        },
        "type": "object",
        "required": [
          "success",
          "data",
          "total_count"
        ],
        "title": "IpListResponse",
        "example": {
          "success": true,
          "data": [
            {
              "ip_id": 301,
              "address": "192.0.2.10",
              "family": 4,
              "api_user_id": "customer-123",
              "vm_id": null,
              "is_primary": true,
              "location_id": 1,
              "location_name": "Poland",
              "country_code": "PL",
              "paid_until": null,
              "suspended_at": null,
              "status": "active",
              "auto_renew": null,
              "monthly_price_usd": null,
              "currency": "USD"
            }
          ],
          "total_count": 1
        }
      },
      "IpReleaseResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/IpReleaseResult"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "IpReleaseResponse",
        "example": {
          "success": true,
          "data": {
            "operation_id": 501,
            "ip_id": 301,
            "address": "192.0.2.10",
            "family": 4,
            "status": "released"
          }
        }
      },
      "IpReleaseResult": {
        "properties": {
          "operation_id": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Operation Id"
          },
          "ip_id": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Ip Id"
          },
          "address": {
            "type": "string",
            "title": "Address"
          },
          "family": {
            "type": "integer",
            "const": 4,
            "title": "Family"
          },
          "status": {
            "type": "string",
            "const": "released",
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "operation_id",
          "ip_id",
          "address",
          "family",
          "status"
        ],
        "title": "IpReleaseResult"
      },
      "IpRenewData": {
        "properties": {
          "order_id": {
            "type": "integer",
            "title": "Order Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "completed",
              "failed",
              "refunded",
              "review"
            ],
            "title": "Status"
          },
          "amount_usd": {
            "type": "string",
            "title": "Amount Usd",
            "description": "Строка суммы USD с четырьмя знаками после точки; в транзакциях сохраняется знак."
          },
          "currency": {
            "type": "string",
            "const": "USD",
            "title": "Currency",
            "default": "USD"
          },
          "vm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Id"
          },
          "rental_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rental Id"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "ip_id": {
            "type": "integer",
            "title": "Ip Id"
          },
          "paid_until": {
            "type": "string",
            "format": "date-time",
            "title": "Paid Until",
            "description": "Окончание оплаченного срока услуги, UTC."
          }
        },
        "type": "object",
        "required": [
          "order_id",
          "status",
          "amount_usd",
          "vm_id",
          "error_code",
          "error_message",
          "ip_id",
          "paid_until"
        ],
        "title": "IpRenewData"
      },
      "IpRenewResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/IpRenewData"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "IpRenewResponse",
        "example": {
          "success": true,
          "data": {
            "order_id": 401,
            "status": "completed",
            "amount_usd": "5.0000",
            "currency": "USD",
            "vm_id": null,
            "rental_id": null,
            "error_code": null,
            "error_message": null,
            "ip_id": 301,
            "paid_until": "2026-10-28T12:00:00Z"
          }
        }
      },
      "LocationItem": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "country_code": {
            "type": "string",
            "title": "Country Code"
          },
          "platforms": {
            "items": {
              "$ref": "#/components/schemas/PlatformItem"
            },
            "type": "array",
            "title": "Platforms"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "country_code",
          "platforms"
        ],
        "title": "LocationItem"
      },
      "MetricPoint": {
        "properties": {
          "time": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Time"
          },
          "cpu_percent": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Percent",
            "description": "Доля CPU: 20, 40, 60, 80 или 100. При создании по умолчанию 60; при смене тарифа без поля сохраняется текущая доля."
          },
          "memory_used_bytes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory Used Bytes"
          },
          "memory_total_bytes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory Total Bytes"
          },
          "network_in_mbps": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Network In Mbps"
          },
          "network_out_mbps": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Network Out Mbps"
          },
          "disk_read_bytes_per_second": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Read Bytes Per Second"
          },
          "disk_write_bytes_per_second": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Write Bytes Per Second"
          }
        },
        "type": "object",
        "required": [
          "time"
        ],
        "title": "MetricPoint"
      },
      "OrderData": {
        "properties": {
          "order_id": {
            "type": "integer",
            "title": "Order Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "completed",
              "failed",
              "refunded",
              "review"
            ],
            "title": "Status"
          },
          "amount_usd": {
            "type": "string",
            "title": "Amount Usd",
            "description": "Строка суммы USD с четырьмя знаками после точки; в транзакциях сохраняется знак."
          },
          "currency": {
            "type": "string",
            "const": "USD",
            "title": "Currency",
            "default": "USD"
          },
          "vm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Id"
          },
          "rental_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rental Id"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "guest_initialization": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VmGuestInitialization"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Результат последней установки: succeeded — cloud-init завершился; failed / cloud_init_failed — ошибка пользовательской настройки; unknown / guest_initialization_timeout — результат не подтверждён за 15 минут. failed и unknown не означают, что работающий VPS не создан: заказ может быть completed, переустановка — succeeded. null — результата нет. Не подтверждает работоспособность приложения."
          }
        },
        "type": "object",
        "required": [
          "order_id",
          "status",
          "amount_usd",
          "vm_id",
          "error_code",
          "error_message"
        ],
        "title": "OrderData"
      },
      "OrderDetails": {
        "properties": {
          "order_id": {
            "type": "integer",
            "title": "Order Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "completed",
              "failed",
              "refunded",
              "review"
            ],
            "title": "Status"
          },
          "amount_usd": {
            "type": "string",
            "title": "Amount Usd",
            "description": "Строка суммы USD с четырьмя знаками после точки; в транзакциях сохраняется знак."
          },
          "currency": {
            "type": "string",
            "const": "USD",
            "title": "Currency",
            "default": "USD"
          },
          "vm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Id"
          },
          "rental_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rental Id"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "order_type": {
            "type": "string",
            "enum": [
              "vm_purchase",
              "vm_renewal",
              "vm_resize",
              "traffic_purchase",
              "ipv4_purchase",
              "ipv4_renewal",
              "dedicated_purchase",
              "dedicated_renewal"
            ],
            "title": "Order Type"
          },
          "api_user_id": {
            "type": "string",
            "title": "Api User Id",
            "description": "Ваш идентификатор клиента. Строка в пределах интеграции."
          },
          "ip_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "parameters": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "type": "object",
            "title": "Parameters"
          },
          "guest_initialization": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VmGuestInitialization"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Результат последней установки: succeeded — cloud-init завершился; failed / cloud_init_failed — ошибка пользовательской настройки; unknown / guest_initialization_timeout — результат не подтверждён за 15 минут. failed и unknown не означают, что работающий VPS не создан: заказ может быть completed, переустановка — succeeded. null — результата нет. Не подтверждает работоспособность приложения."
          }
        },
        "type": "object",
        "required": [
          "order_id",
          "status",
          "amount_usd",
          "vm_id",
          "error_code",
          "error_message",
          "order_type",
          "api_user_id",
          "ip_id",
          "created_at",
          "updated_at",
          "completed_at",
          "parameters"
        ],
        "title": "OrderDetails"
      },
      "OrderDetailsResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/OrderDetails"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "OrderDetailsResponse",
        "example": {
          "success": true,
          "data": {
            "order_id": 401,
            "status": "pending",
            "amount_usd": "5.0000",
            "currency": "USD",
            "vm_id": null,
            "rental_id": null,
            "error_code": null,
            "error_message": null,
            "order_type": "vm_purchase",
            "api_user_id": "customer-123",
            "ip_id": null,
            "created_at": "2026-09-28T12:00:00Z",
            "updated_at": null,
            "completed_at": null,
            "parameters": {}
          }
        }
      },
      "OrderListItem": {
        "properties": {
          "order_id": {
            "type": "integer",
            "title": "Order Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "completed",
              "failed",
              "refunded",
              "review"
            ],
            "title": "Status"
          },
          "amount_usd": {
            "type": "string",
            "title": "Amount Usd",
            "description": "Строка суммы USD с четырьмя знаками после точки; в транзакциях сохраняется знак."
          },
          "currency": {
            "type": "string",
            "const": "USD",
            "title": "Currency",
            "default": "USD"
          },
          "vm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Id"
          },
          "rental_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rental Id"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "order_type": {
            "type": "string",
            "enum": [
              "vm_purchase",
              "vm_renewal",
              "vm_resize",
              "traffic_purchase",
              "ipv4_purchase",
              "ipv4_renewal",
              "dedicated_purchase",
              "dedicated_renewal"
            ],
            "title": "Order Type"
          },
          "api_user_id": {
            "type": "string",
            "title": "Api User Id",
            "description": "Ваш идентификатор клиента. Строка в пределах интеграции."
          },
          "ip_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "guest_initialization": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VmGuestInitialization"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Результат последней установки: succeeded — cloud-init завершился; failed / cloud_init_failed — ошибка пользовательской настройки; unknown / guest_initialization_timeout — результат не подтверждён за 15 минут. failed и unknown не означают, что работающий VPS не создан: заказ может быть completed, переустановка — succeeded. null — результата нет. Не подтверждает работоспособность приложения."
          }
        },
        "type": "object",
        "required": [
          "order_id",
          "status",
          "amount_usd",
          "vm_id",
          "error_code",
          "error_message",
          "order_type",
          "api_user_id",
          "ip_id",
          "created_at",
          "updated_at",
          "completed_at"
        ],
        "title": "OrderListItem"
      },
      "OrderListResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/OrderListItem"
            },
            "type": "array",
            "title": "Data"
          },
          "total_count": {
            "type": "integer",
            "title": "Total Count",
            "description": "Полное количество записей с учётом фильтров, до пагинации."
          }
        },
        "type": "object",
        "required": [
          "success",
          "data",
          "total_count"
        ],
        "title": "OrderListResponse",
        "example": {
          "success": true,
          "data": [
            {
              "order_id": 401,
              "status": "pending",
              "amount_usd": "5.0000",
              "currency": "USD",
              "vm_id": null,
              "rental_id": null,
              "error_code": null,
              "error_message": null,
              "order_type": "vm_purchase",
              "api_user_id": "customer-123",
              "ip_id": null,
              "created_at": "2026-09-28T12:00:00Z",
              "updated_at": null,
              "completed_at": null
            }
          ],
          "total_count": 1
        }
      },
      "OrderResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/OrderData"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "OrderResponse",
        "example": {
          "success": true,
          "data": {
            "order_id": 401,
            "status": "pending",
            "amount_usd": "5.0000",
            "currency": "USD",
            "vm_id": null,
            "rental_id": null,
            "error_code": null,
            "error_message": null
          }
        }
      },
      "OsItem": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "code": {
            "type": "string",
            "title": "Code"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "code",
          "name"
        ],
        "title": "OsItem"
      },
      "OsListResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "os": {
            "items": {
              "$ref": "#/components/schemas/OsItem"
            },
            "type": "array",
            "title": "Os"
          }
        },
        "type": "object",
        "required": [
          "success",
          "os"
        ],
        "title": "OsListResponse",
        "example": {
          "success": true,
          "os": [
            {
              "id": 1,
              "code": "C1",
              "name": "Example"
            }
          ]
        }
      },
      "PasswordResetBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "login": {
            "type": "string",
            "maxLength": 32,
            "minLength": 1,
            "pattern": "^[a-z_][a-z0-9_-]*$",
            "title": "Login",
            "default": "root"
          },
          "password": {
            "type": "string",
            "maxLength": 1024,
            "minLength": 5,
            "title": "Password",
            "description": "Пароль доступа. Нельзя передавать вместе с ssh_public_key.",
            "writeOnly": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "password"
        ],
        "title": "PasswordResetBody",
        "example": {
          "api_key_id": 1,
          "login": "root",
          "password": "Example-Password-2026!"
        }
      },
      "PasswordResetResult": {
        "properties": {
          "vm_id": {
            "type": "integer",
            "title": "Vm Id"
          },
          "status": {
            "type": "string",
            "const": "running",
            "title": "Status"
          },
          "login": {
            "type": "string",
            "title": "Login"
          },
          "password_changed": {
            "type": "boolean",
            "const": true,
            "title": "Password Changed"
          }
        },
        "type": "object",
        "required": [
          "vm_id",
          "status",
          "login",
          "password_changed"
        ],
        "title": "PasswordResetResult"
      },
      "PlanItem": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "cpu_cores": {
            "type": "integer",
            "title": "Cpu Cores"
          },
          "ram_mb": {
            "type": "integer",
            "title": "Ram Mb"
          },
          "disk_gb": {
            "type": "integer",
            "title": "Disk Gb"
          },
          "traffic_tb": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Traffic Tb",
            "description": "Целое количество дополнительных единиц трафика; единица равна 1024⁴ байт."
          },
          "monthly_price_usd": {
            "type": "string",
            "title": "Monthly Price Usd"
          },
          "available": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Available",
            "description": "Текущее доступное количество. Снимок не резервирует ресурсы."
          }
        },
        "type": "object",
        "required": [
          "code",
          "name",
          "cpu_cores",
          "ram_mb",
          "disk_gb",
          "traffic_tb",
          "monthly_price_usd",
          "available"
        ],
        "title": "PlanItem"
      },
      "PlansListResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "api_key_id": {
            "type": "integer",
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "cpu_percent": {
            "type": "integer",
            "enum": [
              20,
              40,
              60,
              80,
              100
            ],
            "title": "Cpu Percent",
            "description": "Доля CPU: 20, 40, 60, 80 или 100. При создании по умолчанию 60; при смене тарифа без поля сохраняется текущая доля."
          },
          "currency": {
            "type": "string",
            "const": "USD",
            "title": "Currency",
            "default": "USD"
          },
          "locations": {
            "items": {
              "$ref": "#/components/schemas/LocationItem"
            },
            "type": "array",
            "title": "Locations"
          }
        },
        "type": "object",
        "required": [
          "success",
          "api_key_id",
          "cpu_percent",
          "locations"
        ],
        "title": "PlansListResponse",
        "example": {
          "success": true,
          "api_key_id": 1,
          "cpu_percent": 60,
          "currency": "USD",
          "locations": [
            {
              "id": 1,
              "name": "Example",
              "country_code": "PL",
              "platforms": [
                {
                  "platform": "epyc",
                  "cpu_display_name": null,
                  "availability_updated_at": null,
                  "plans": [
                    {
                      "code": "C1",
                      "name": "Example",
                      "cpu_cores": 1,
                      "ram_mb": 1,
                      "disk_gb": 1,
                      "traffic_tb": "5.0000",
                      "monthly_price_usd": "5.0000",
                      "available": null
                    }
                  ]
                }
              ]
            }
          ]
        }
      },
      "PlatformItem": {
        "properties": {
          "platform": {
            "type": "string",
            "enum": [
              "epyc",
              "ryzen",
              "xeon"
            ],
            "title": "Platform"
          },
          "cpu_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Display Name"
          },
          "availability_updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Availability Updated At"
          },
          "plans": {
            "items": {
              "$ref": "#/components/schemas/PlanItem"
            },
            "type": "array",
            "title": "Plans"
          }
        },
        "type": "object",
        "required": [
          "platform",
          "cpu_display_name",
          "availability_updated_at",
          "plans"
        ],
        "title": "PlatformItem"
      },
      "ReinstallBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "os_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Os Id",
            "description": "ID операционной системы из GET /reference/os."
          },
          "wipe_extra_disks": {
            "type": "boolean",
            "title": "Wipe Extra Disks",
            "default": false
          },
          "password": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Password",
            "description": "Пароль доступа. Нельзя передавать вместе с ssh_public_key.",
            "writeOnly": true
          },
          "ssh_public_key": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8192,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Ssh Public Key",
            "description": "Одна строка публичного ключа OpenSSH: Ed25519, RSA или ECDSA. Передаётся сам ключ, а не ID сохранённого ключа."
          },
          "cloud_init": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Cloud Init",
            "description": "Необязательный JSON-объект cloud-config, не строка YAML. Не более 65536 байт после серверной JSON-сериализации (не-ASCII символы экранируются). users, packages, runcmd и write_files при наличии должны быть массивами. Сеть, hostname и основной доступ задаёт платформа. При повторе запроса передавайте тот же объект. Результат доступен отдельно в guest_initialization; содержимое cloud_init не возвращается в заказе или вебхуках."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "os_id"
        ],
        "title": "ReinstallBody",
        "example": {
          "api_key_id": 1,
          "os_id": 1,
          "wipe_extra_disks": false,
          "password": "Example-Password-2026!",
          "cloud_init": {
            "packages": [
              "curl"
            ],
            "runcmd": [
              [
                "sh",
                "-c",
                "echo ready > /root/cloud-init-ready"
              ]
            ]
          }
        }
      },
      "ReinstallResult": {
        "properties": {
          "vm_id": {
            "type": "integer",
            "title": "Vm Id"
          },
          "os": {
            "type": "string",
            "title": "Os"
          },
          "hostname": {
            "type": "string",
            "title": "Hostname"
          },
          "wipe_extra_disks": {
            "type": "boolean",
            "title": "Wipe Extra Disks"
          },
          "status": {
            "type": "string",
            "const": "running",
            "title": "Status"
          },
          "guest_initialization": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VmGuestInitialization"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Результат последней установки: succeeded — cloud-init завершился; failed / cloud_init_failed — ошибка пользовательской настройки; unknown / guest_initialization_timeout — результат не подтверждён за 15 минут. failed и unknown не означают, что работающий VPS не создан: заказ может быть completed, переустановка — succeeded. null — результата нет. Не подтверждает работоспособность приложения."
          }
        },
        "type": "object",
        "required": [
          "vm_id",
          "os",
          "hostname",
          "wipe_extra_disks",
          "status"
        ],
        "title": "ReinstallResult"
      },
      "RentalCreateRequest": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "months": {
            "type": "integer",
            "enum": [
              1,
              3,
              6,
              12,
              24,
              36
            ],
            "title": "Months",
            "default": 1,
            "description": "Календарные месяцы: 1, 3, 6, 12, 24 или 36. Целое JSON-число."
          },
          "expected_amount_usd": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,11}\\.\\d{4}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Amount Usd",
            "description": "Необязательная подтверждённая цена в USD, ровно четыре знака после точки. Изменение цены возвращает 409 price_changed до списания. При смене тарифа это максимальная допустимая сумма."
          },
          "api_user_id": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "pattern": "\\S",
            "title": "Api User Id",
            "description": "Ваш идентификатор клиента. Строка в пределах интеграции."
          },
          "plan_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Plan Id",
            "description": "ID тарифа выделенного сервера из GET /dedicated/plans."
          },
          "os_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Os Id",
            "description": "ID операционной системы из GET /reference/os."
          },
          "disk_layout": {
            "type": "string",
            "enum": [
              "separate",
              "lvm_linear",
              "raid0",
              "raid1"
            ],
            "title": "Disk Layout"
          },
          "hostname": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hostname"
          },
          "password": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Password",
            "description": "Пароль доступа. Нельзя передавать вместе с ssh_public_key.",
            "writeOnly": true
          },
          "ssh_public_key": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8192,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Ssh Public Key",
            "description": "Одна строка публичного ключа OpenSSH: Ed25519, RSA или ECDSA. Передаётся сам ключ, а не ID сохранённого ключа."
          },
          "extra_ipv4_count": {
            "type": "integer",
            "maximum": 65536.0,
            "minimum": 0.0,
            "title": "Extra Ipv4 Count",
            "default": 0
          },
          "auto_renew": {
            "type": "boolean",
            "title": "Auto Renew",
            "default": false,
            "description": "Автопродление с баланса интеграции. Изменение флага само по себе не продлевает услугу."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "api_user_id",
          "plan_id",
          "os_id",
          "disk_layout"
        ],
        "title": "RentalCreateRequest",
        "example": {
          "api_key_id": 1,
          "months": 1,
          "api_user_id": "customer-123",
          "plan_id": 1,
          "os_id": 1,
          "disk_layout": "separate",
          "extra_ipv4_count": 0,
          "auto_renew": false,
          "password": "Example-Password-2026!"
        }
      },
      "RentalDetails": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "api_user_id": {
            "type": "string",
            "title": "Api User Id",
            "description": "Ваш идентификатор клиента. Строка в пределах интеграции."
          },
          "order_id": {
            "type": "integer",
            "title": "Order Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "preparing",
              "active",
              "overdue",
              "cleaning",
              "completed",
              "cancelled"
            ],
            "title": "Status"
          },
          "plan": {
            "$ref": "#/components/schemas/DedicatedHardware"
          },
          "location_id": {
            "type": "integer",
            "title": "Location Id"
          },
          "location_name": {
            "type": "string",
            "title": "Location Name"
          },
          "country_code": {
            "type": "string",
            "title": "Country Code"
          },
          "os": {
            "type": "string",
            "title": "Os"
          },
          "hostname": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hostname"
          },
          "disk_layout": {
            "type": "string",
            "enum": [
              "separate",
              "lvm_linear",
              "raid0",
              "raid1"
            ],
            "title": "Disk Layout"
          },
          "term_months": {
            "type": "integer",
            "title": "Term Months"
          },
          "extra_ipv4_count": {
            "type": "integer",
            "title": "Extra Ipv4 Count"
          },
          "auto_renew": {
            "type": "boolean",
            "title": "Auto Renew",
            "description": "Автопродление с баланса интеграции. Изменение флага само по себе не продлевает услугу."
          },
          "issued_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issued At"
          },
          "paid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid Until",
            "description": "Окончание оплаченного срока услуги, UTC."
          },
          "overdue_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overdue At"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "host": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Host"
          },
          "login": {
            "type": "string",
            "title": "Login"
          },
          "password": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Password",
            "description": "Пароль доступа. Нельзя передавать вместе с ssh_public_key."
          },
          "ssh_public_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ssh Public Key",
            "description": "Одна строка публичного ключа OpenSSH: Ed25519, RSA или ECDSA. Передаётся сам ключ, а не ID сохранённого ключа."
          },
          "ips": {
            "items": {
              "$ref": "#/components/schemas/RentalIp"
            },
            "type": "array",
            "title": "Ips"
          }
        },
        "type": "object",
        "required": [
          "id",
          "api_user_id",
          "order_id",
          "status",
          "plan",
          "location_id",
          "location_name",
          "country_code",
          "os",
          "hostname",
          "disk_layout",
          "term_months",
          "extra_ipv4_count",
          "auto_renew",
          "issued_at",
          "paid_until",
          "overdue_at",
          "finished_at",
          "created_at",
          "host",
          "login",
          "password",
          "ssh_public_key",
          "ips"
        ],
        "title": "RentalDetails"
      },
      "RentalIp": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "address": {
            "type": "string",
            "title": "Address"
          },
          "is_primary": {
            "type": "boolean",
            "title": "Is Primary"
          }
        },
        "type": "object",
        "required": [
          "id",
          "address",
          "is_primary"
        ],
        "title": "RentalIp"
      },
      "RentalItem": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "api_user_id": {
            "type": "string",
            "title": "Api User Id",
            "description": "Ваш идентификатор клиента. Строка в пределах интеграции."
          },
          "order_id": {
            "type": "integer",
            "title": "Order Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "preparing",
              "active",
              "overdue",
              "cleaning",
              "completed",
              "cancelled"
            ],
            "title": "Status"
          },
          "plan": {
            "$ref": "#/components/schemas/DedicatedHardware"
          },
          "location_id": {
            "type": "integer",
            "title": "Location Id"
          },
          "location_name": {
            "type": "string",
            "title": "Location Name"
          },
          "country_code": {
            "type": "string",
            "title": "Country Code"
          },
          "os": {
            "type": "string",
            "title": "Os"
          },
          "hostname": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hostname"
          },
          "disk_layout": {
            "type": "string",
            "enum": [
              "separate",
              "lvm_linear",
              "raid0",
              "raid1"
            ],
            "title": "Disk Layout"
          },
          "term_months": {
            "type": "integer",
            "title": "Term Months"
          },
          "extra_ipv4_count": {
            "type": "integer",
            "title": "Extra Ipv4 Count"
          },
          "auto_renew": {
            "type": "boolean",
            "title": "Auto Renew",
            "description": "Автопродление с баланса интеграции. Изменение флага само по себе не продлевает услугу."
          },
          "issued_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issued At"
          },
          "paid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid Until",
            "description": "Окончание оплаченного срока услуги, UTC."
          },
          "overdue_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overdue At"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "api_user_id",
          "order_id",
          "status",
          "plan",
          "location_id",
          "location_name",
          "country_code",
          "os",
          "hostname",
          "disk_layout",
          "term_months",
          "extra_ipv4_count",
          "auto_renew",
          "issued_at",
          "paid_until",
          "overdue_at",
          "finished_at",
          "created_at"
        ],
        "title": "RentalItem"
      },
      "RentalListResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/RentalItem"
            },
            "type": "array",
            "title": "Data"
          },
          "total_count": {
            "type": "integer",
            "title": "Total Count",
            "description": "Полное количество записей с учётом фильтров, до пагинации."
          }
        },
        "type": "object",
        "required": [
          "success",
          "data",
          "total_count"
        ],
        "title": "RentalListResponse",
        "example": {
          "success": true,
          "data": [
            {
              "id": 1,
              "api_user_id": "customer-123",
              "order_id": 401,
              "status": "preparing",
              "plan": {
                "id": 1,
                "code": "C1",
                "name": "Example",
                "platform": "epyc",
                "cpu_model": "example",
                "cpu_count": 1,
                "cpu_cores": 1,
                "cpu_threads": 1,
                "ram_gb": 1,
                "ram_description": null,
                "disks": [
                  {
                    "count": 1,
                    "size_gb": 1,
                    "type": "example",
                    "model": null
                  }
                ],
                "disk_layouts": [
                  "separate"
                ],
                "default_disk_layout": "separate",
                "port_mbps": 1,
                "traffic_tb": null,
                "included_ipv4": 1,
                "ipv6_prefix_length": null
              },
              "location_id": 1,
              "location_name": "Poland",
              "country_code": "PL",
              "os": "debian-12",
              "hostname": null,
              "disk_layout": "separate",
              "term_months": 1,
              "extra_ipv4_count": 1,
              "auto_renew": false,
              "issued_at": null,
              "paid_until": null,
              "overdue_at": null,
              "finished_at": null,
              "created_at": "2026-09-28T12:00:00Z"
            }
          ],
          "total_count": 1
        }
      },
      "RentalResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/RentalDetails"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "RentalResponse",
        "example": {
          "success": true,
          "data": {
            "id": 1,
            "api_user_id": "customer-123",
            "order_id": 401,
            "status": "preparing",
            "plan": {
              "id": 1,
              "code": "C1",
              "name": "Example",
              "platform": "epyc",
              "cpu_model": "example",
              "cpu_count": 1,
              "cpu_cores": 1,
              "cpu_threads": 1,
              "ram_gb": 1,
              "ram_description": null,
              "disks": [
                {
                  "count": 1,
                  "size_gb": 1,
                  "type": "example",
                  "model": null
                }
              ],
              "disk_layouts": [
                "separate"
              ],
              "default_disk_layout": "separate",
              "port_mbps": 1,
              "traffic_tb": null,
              "included_ipv4": 1,
              "ipv6_prefix_length": null
            },
            "location_id": 1,
            "location_name": "Poland",
            "country_code": "PL",
            "os": "debian-12",
            "hostname": null,
            "disk_layout": "separate",
            "term_months": 1,
            "extra_ipv4_count": 1,
            "auto_renew": false,
            "issued_at": null,
            "paid_until": null,
            "overdue_at": null,
            "finished_at": null,
            "created_at": "2026-09-28T12:00:00Z",
            "host": null,
            "login": "root",
            "password": null,
            "ssh_public_key": null,
            "ips": [
              {
                "id": 1,
                "address": "192.0.2.10",
                "is_primary": true
              }
            ]
          }
        }
      },
      "TrafficPeriod": {
        "properties": {
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "title": "Starts At"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "title": "Ends At"
          },
          "included_bytes": {
            "type": "integer",
            "title": "Included Bytes"
          },
          "additional_bytes": {
            "type": "integer",
            "title": "Additional Bytes"
          },
          "incoming_bytes": {
            "type": "integer",
            "title": "Incoming Bytes"
          },
          "outgoing_bytes": {
            "type": "integer",
            "title": "Outgoing Bytes"
          },
          "overage_bytes": {
            "type": "integer",
            "title": "Overage Bytes"
          },
          "remaining_bytes": {
            "type": "integer",
            "title": "Remaining Bytes"
          }
        },
        "type": "object",
        "required": [
          "starts_at",
          "ends_at",
          "included_bytes",
          "additional_bytes",
          "incoming_bytes",
          "outgoing_bytes",
          "overage_bytes",
          "remaining_bytes"
        ],
        "title": "TrafficPeriod"
      },
      "TrafficShaping": {
        "properties": {
          "limit_mbps": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Mbps"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "traffic",
                  "bandwidth"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "bandwidth_limited_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bandwidth Limited Until"
          }
        },
        "type": "object",
        "required": [
          "limit_mbps",
          "reason",
          "bandwidth_limited_until"
        ],
        "title": "TrafficShaping"
      },
      "TransactionItem": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "transaction_type": {
            "type": "string",
            "enum": [
              "topup",
              "vm_purchase",
              "vm_renewal",
              "vm_resize",
              "traffic_purchase",
              "ipv4_purchase",
              "ipv4_renewal",
              "dedicated_purchase",
              "dedicated_renewal",
              "refund",
              "adjustment"
            ],
            "title": "Transaction Type"
          },
          "amount_usd": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount Usd",
            "description": "Строка суммы USD с четырьмя знаками после точки; в транзакциях сохраняется знак."
          },
          "balance_before": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Balance Before"
          },
          "balance_after": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Balance After"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id"
          },
          "comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "transaction_type",
          "amount_usd",
          "balance_before",
          "balance_after",
          "order_id",
          "comment",
          "created_at"
        ],
        "title": "TransactionItem"
      },
      "TransactionListResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/TransactionItem"
            },
            "type": "array",
            "title": "Data"
          },
          "total_count": {
            "type": "integer",
            "title": "Total Count",
            "description": "Полное количество записей с учётом фильтров, до пагинации."
          },
          "currency": {
            "type": "string",
            "const": "USD",
            "title": "Currency",
            "default": "USD"
          },
          "limit": {
            "type": "integer",
            "title": "Limit",
            "description": "Максимальное количество записей на странице."
          },
          "offset": {
            "type": "integer",
            "title": "Offset",
            "description": "Количество пропускаемых записей, начиная с нуля."
          }
        },
        "type": "object",
        "required": [
          "success",
          "data",
          "total_count",
          "limit",
          "offset"
        ],
        "title": "TransactionListResponse",
        "example": {
          "success": true,
          "data": [
            {
              "id": 1,
              "transaction_type": "topup",
              "amount_usd": "5.0000",
              "balance_before": "100.0000",
              "balance_after": "95.0000",
              "order_id": null,
              "comment": null,
              "created_at": "2026-09-28T12:00:00Z"
            }
          ],
          "total_count": 1,
          "currency": "USD",
          "limit": 25,
          "offset": 0
        }
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VmAutoRenewData": {
        "properties": {
          "vm_id": {
            "type": "integer",
            "title": "Vm Id"
          },
          "auto_renew": {
            "type": "boolean",
            "title": "Auto Renew",
            "description": "Автопродление с баланса интеграции. Изменение флага само по себе не продлевает услугу."
          }
        },
        "type": "object",
        "required": [
          "vm_id",
          "auto_renew"
        ],
        "title": "VmAutoRenewData"
      },
      "VmAutoRenewResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/VmAutoRenewData"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "VmAutoRenewResponse",
        "example": {
          "success": true,
          "data": {
            "vm_id": 101,
            "auto_renew": false
          }
        }
      },
      "VmConsoleLink": {
        "properties": {
          "vm_id": {
            "type": "integer",
            "title": "Vm Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "vm_id",
          "url",
          "expires_at"
        ],
        "title": "VmConsoleLink"
      },
      "VmConsoleLinkResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/VmConsoleLink"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "VmConsoleLinkResponse",
        "example": {
          "success": true,
          "data": {
            "vm_id": 101,
            "url": "https://console.example.com/session/example",
            "expires_at": "2026-09-28T12:00:00Z"
          }
        }
      },
      "VmCreateRequest": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "api_user_id": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "pattern": "\\S",
            "title": "Api User Id",
            "description": "Ваш идентификатор клиента. Строка в пределах интеграции."
          },
          "location_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Location Id"
          },
          "platform": {
            "type": "string",
            "enum": [
              "epyc",
              "ryzen",
              "xeon"
            ],
            "title": "Platform"
          },
          "plan_code": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$",
            "title": "Plan Code",
            "description": "Код тарифа VPS из GET /plans."
          },
          "cpu_percent": {
            "type": "integer",
            "enum": [
              20,
              40,
              60,
              80,
              100
            ],
            "title": "Cpu Percent",
            "default": 60,
            "description": "Доля CPU: 20, 40, 60, 80 или 100. При создании по умолчанию 60; при смене тарифа без поля сохраняется текущая доля."
          },
          "os_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Os Id",
            "description": "ID операционной системы из GET /reference/os."
          },
          "months": {
            "type": "integer",
            "enum": [
              1,
              3,
              6,
              12,
              24,
              36
            ],
            "title": "Months",
            "default": 1,
            "description": "Календарные месяцы: 1, 3, 6, 12, 24 или 36. Целое JSON-число."
          },
          "auto_renew": {
            "type": "boolean",
            "title": "Auto Renew",
            "default": false,
            "description": "Автопродление с баланса интеграции. Изменение флага само по себе не продлевает услугу."
          },
          "expected_amount_usd": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,11}\\.\\d{4}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Amount Usd",
            "description": "Необязательная подтверждённая цена в USD, ровно четыре знака после точки. Изменение цены возвращает 409 price_changed до списания. При смене тарифа это максимальная допустимая сумма."
          },
          "hostname": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hostname"
          },
          "password": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Password",
            "description": "Пароль доступа. Нельзя передавать вместе с ssh_public_key.",
            "writeOnly": true
          },
          "ssh_public_key": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8192,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Ssh Public Key",
            "description": "Одна строка публичного ключа OpenSSH: Ed25519, RSA или ECDSA. Передаётся сам ключ, а не ID сохранённого ключа."
          },
          "cloud_init": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Cloud Init",
            "description": "Необязательный JSON-объект cloud-config, не строка YAML. Не более 65536 байт после серверной JSON-сериализации (не-ASCII символы экранируются). users, packages, runcmd и write_files при наличии должны быть массивами. Сеть, hostname и основной доступ задаёт платформа. При повторе запроса передавайте тот же объект. Результат доступен отдельно в guest_initialization; содержимое cloud_init не возвращается в заказе или вебхуках."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "api_user_id",
          "location_id",
          "platform",
          "plan_code",
          "os_id"
        ],
        "title": "VmCreateRequest",
        "example": {
          "api_key_id": 1,
          "api_user_id": "customer-123",
          "location_id": 1,
          "platform": "epyc",
          "plan_code": "C1",
          "cpu_percent": 60,
          "os_id": 1,
          "months": 1,
          "auto_renew": false,
          "password": "Example-Password-2026!",
          "cloud_init": {
            "packages": [
              "curl"
            ],
            "runcmd": [
              [
                "sh",
                "-c",
                "echo ready > /root/cloud-init-ready"
              ]
            ]
          }
        }
      },
      "VmDeleteResult": {
        "properties": {
          "vm_id": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Vm Id"
          },
          "status": {
            "type": "string",
            "const": "deleted",
            "title": "Status"
          },
          "keep_ips": {
            "type": "boolean",
            "title": "Keep Ips",
            "description": "Явно сохранить IPv4 с отдельной оплатой (true) либо освободить их (false)."
          },
          "held_ips": {
            "items": {
              "$ref": "#/components/schemas/HeldIpv4"
            },
            "type": "array",
            "title": "Held Ips"
          }
        },
        "type": "object",
        "required": [
          "vm_id",
          "status",
          "keep_ips",
          "held_ips"
        ],
        "title": "VmDeleteResult"
      },
      "VmFirewall": {
        "properties": {
          "vm_id": {
            "type": "integer",
            "title": "Vm Id"
          },
          "revision": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Revision",
            "description": "Текущая ревизия из GET firewall. При конфликте перечитайте настройки."
          },
          "applied": {
            "type": "boolean",
            "title": "Applied"
          },
          "input_policy": {
            "type": "string",
            "enum": [
              "ACCEPT",
              "DROP"
            ],
            "title": "Input Policy"
          },
          "output_policy": {
            "type": "string",
            "enum": [
              "ACCEPT",
              "DROP"
            ],
            "title": "Output Policy"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/FirewallRuleItem"
            },
            "type": "array",
            "title": "Rules"
          },
          "smtp_ports": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Smtp Ports"
          },
          "smtp_blocked": {
            "type": "boolean",
            "title": "Smtp Blocked"
          }
        },
        "type": "object",
        "required": [
          "vm_id",
          "revision",
          "applied",
          "input_policy",
          "output_policy",
          "rules",
          "smtp_ports",
          "smtp_blocked"
        ],
        "title": "VmFirewall"
      },
      "VmFirewallResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/VmFirewall"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "VmFirewallResponse",
        "example": {
          "success": true,
          "data": {
            "vm_id": 101,
            "revision": 0,
            "applied": true,
            "input_policy": "ACCEPT",
            "output_policy": "ACCEPT",
            "rules": [
              {
                "direction": "IN",
                "action": "ACCEPT",
                "protocol": "tcp",
                "ports": [
                  "443"
                ],
                "source": null,
                "destination": null,
                "enabled": true,
                "comment": "HTTPS",
                "id": 1
              }
            ],
            "smtp_ports": [
              1
            ],
            "smtp_blocked": true
          }
        }
      },
      "VmGetResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/VmItem"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "VmGetResponse",
        "example": {
          "success": true,
          "data": {
            "id": 1,
            "name": "Example",
            "hostname": "customer-vps",
            "status": "example",
            "cpu_cores": 1,
            "cpu_percent": 60,
            "ram_mb": 1,
            "disk_gb": 1,
            "smtp_blocked": true,
            "paid_until": null,
            "created_at": "2026-09-28T12:00:00Z",
            "updated_at": null,
            "ips": [
              {
                "ip_id": 301,
                "address": "192.0.2.10",
                "family": 4,
                "is_rf_blocked": true,
                "assigned_at": null,
                "is_primary": true,
                "paid_until": null,
                "suspended_at": null,
                "auto_renew": null
              }
            ],
            "auto_renew": false,
            "api_user_id": "customer-123",
            "plan_code": "C1",
            "platform": "epyc",
            "cpu_display_name": null,
            "location_id": 1,
            "location_name": "Poland",
            "country_code": "PL",
            "city": "example",
            "os": null,
            "guest_initialization": {
              "status": "succeeded",
              "error_code": null
            },
            "rescue": {
              "active": false,
              "access": null,
              "requires_review": false,
              "operation_id": null,
              "operation_status": null
            }
          }
        }
      },
      "VmIp": {
        "properties": {
          "ip_id": {
            "type": "integer",
            "title": "Ip Id"
          },
          "address": {
            "type": "string",
            "title": "Address"
          },
          "family": {
            "type": "integer",
            "enum": [
              4,
              6
            ],
            "title": "Family"
          },
          "is_rf_blocked": {
            "type": "boolean",
            "title": "Is Rf Blocked"
          },
          "assigned_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned At"
          },
          "is_primary": {
            "type": "boolean",
            "title": "Is Primary"
          },
          "paid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid Until",
            "description": "Окончание оплаченного срока услуги, UTC."
          },
          "suspended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suspended At"
          },
          "auto_renew": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Renew",
            "description": "Автопродление с баланса интеграции. Изменение флага само по себе не продлевает услугу."
          }
        },
        "type": "object",
        "required": [
          "ip_id",
          "address",
          "family",
          "is_rf_blocked",
          "assigned_at",
          "is_primary",
          "paid_until",
          "suspended_at"
        ],
        "title": "VmIp"
      },
      "VmIpAttachResult": {
        "properties": {
          "vm_id": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Vm Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "stopped"
            ],
            "title": "Status"
          },
          "ip_id": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Ip Id"
          },
          "paid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid Until",
            "description": "Окончание оплаченного срока услуги, UTC."
          },
          "addresses": {
            "items": {
              "type": "string",
              "format": "ipvanyinterface"
            },
            "type": "array",
            "title": "Addresses"
          },
          "guest_configuration_required": {
            "type": "boolean",
            "const": true,
            "title": "Guest Configuration Required",
            "description": "Если true, требуется обновить настройки IP внутри гостевой ОС."
          }
        },
        "type": "object",
        "required": [
          "vm_id",
          "status",
          "ip_id",
          "paid_until",
          "addresses",
          "guest_configuration_required"
        ],
        "title": "VmIpAttachResult"
      },
      "VmIpDetachResult": {
        "properties": {
          "vm_id": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Vm Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "stopped"
            ],
            "title": "Status"
          },
          "detached_ip_id": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Detached Ip Id"
          },
          "keep_ip": {
            "type": "boolean",
            "title": "Keep Ip",
            "description": "Сохранить снятый IPv4 с отдельной оплатой (true) либо освободить (false)."
          },
          "addresses": {
            "items": {
              "type": "string",
              "format": "ipvanyinterface"
            },
            "type": "array",
            "title": "Addresses"
          },
          "guest_configuration_required": {
            "type": "boolean",
            "const": true,
            "title": "Guest Configuration Required",
            "description": "Если true, требуется обновить настройки IP внутри гостевой ОС."
          }
        },
        "type": "object",
        "required": [
          "vm_id",
          "status",
          "detached_ip_id",
          "keep_ip",
          "addresses",
          "guest_configuration_required"
        ],
        "title": "VmIpDetachResult"
      },
      "VmIpv4PurchaseBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "expected_amount_usd": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,11}\\.\\d{4}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Amount Usd",
            "description": "Необязательная подтверждённая цена в USD, ровно четыре знака после точки. Изменение цены возвращает 409 price_changed до списания. При смене тарифа это максимальная допустимая сумма."
          },
          "auto_renew": {
            "type": "boolean",
            "title": "Auto Renew",
            "default": false,
            "description": "Автопродление с баланса интеграции. Изменение флага само по себе не продлевает услугу."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id"
        ],
        "title": "VmIpv4PurchaseBody",
        "example": {
          "api_key_id": 1,
          "auto_renew": false
        }
      },
      "VmItem": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "hostname": {
            "type": "string",
            "title": "Hostname"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "cpu_cores": {
            "type": "integer",
            "title": "Cpu Cores"
          },
          "cpu_percent": {
            "type": "number",
            "title": "Cpu Percent",
            "description": "Доля CPU: 20, 40, 60, 80 или 100. При создании по умолчанию 60; при смене тарифа без поля сохраняется текущая доля."
          },
          "ram_mb": {
            "type": "integer",
            "title": "Ram Mb"
          },
          "disk_gb": {
            "type": "integer",
            "title": "Disk Gb"
          },
          "smtp_blocked": {
            "type": "boolean",
            "title": "Smtp Blocked"
          },
          "paid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid Until",
            "description": "Окончание оплаченного срока услуги, UTC."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "ips": {
            "items": {
              "$ref": "#/components/schemas/VmIp"
            },
            "type": "array",
            "title": "Ips"
          },
          "auto_renew": {
            "type": "boolean",
            "title": "Auto Renew",
            "description": "Автопродление с баланса интеграции. Изменение флага само по себе не продлевает услугу."
          },
          "api_user_id": {
            "type": "string",
            "title": "Api User Id",
            "description": "Ваш идентификатор клиента. Строка в пределах интеграции."
          },
          "plan_code": {
            "type": "string",
            "title": "Plan Code",
            "description": "Код тарифа VPS из GET /plans."
          },
          "platform": {
            "type": "string",
            "enum": [
              "epyc",
              "ryzen",
              "xeon"
            ],
            "title": "Platform"
          },
          "cpu_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Display Name"
          },
          "location_id": {
            "type": "integer",
            "title": "Location Id"
          },
          "location_name": {
            "type": "string",
            "title": "Location Name"
          },
          "country_code": {
            "type": "string",
            "title": "Country Code"
          },
          "city": {
            "type": "string",
            "title": "City"
          },
          "os": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VmOs"
              },
              {
                "type": "null"
              }
            ]
          },
          "rescue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VmRescueState"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Состояние Rescue. active означает сохранённый контекст Rescue, а не гарантию доступности SSH. access: ssh, console или null. requires_review требует проверки состояния; operation_id и operation_status относятся к операции Rescue. null — состояние не получено."
          },
          "guest_initialization": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VmGuestInitialization"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Результат последней установки: succeeded — cloud-init завершился; failed / cloud_init_failed — ошибка пользовательской настройки; unknown / guest_initialization_timeout — результат не подтверждён за 15 минут. failed и unknown не означают, что работающий VPS не создан: заказ может быть completed, переустановка — succeeded. null — результата нет. Не подтверждает работоспособность приложения."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "hostname",
          "status",
          "cpu_cores",
          "cpu_percent",
          "ram_mb",
          "disk_gb",
          "smtp_blocked",
          "paid_until",
          "created_at",
          "updated_at",
          "ips",
          "auto_renew",
          "api_user_id",
          "plan_code",
          "platform",
          "cpu_display_name",
          "location_id",
          "location_name",
          "country_code",
          "city",
          "os"
        ],
        "title": "VmItem"
      },
      "VmListItem": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "api_user_id": {
            "type": "string",
            "title": "Api User Id",
            "description": "Ваш идентификатор клиента. Строка в пределах интеграции."
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "plan_code": {
            "type": "string",
            "title": "Plan Code",
            "description": "Код тарифа VPS из GET /plans."
          },
          "cpu_cores": {
            "type": "integer",
            "title": "Cpu Cores"
          },
          "cpu_percent": {
            "type": "number",
            "title": "Cpu Percent",
            "description": "Доля CPU: 20, 40, 60, 80 или 100. При создании по умолчанию 60; при смене тарифа без поля сохраняется текущая доля."
          },
          "ram_mb": {
            "type": "integer",
            "title": "Ram Mb"
          },
          "disk_gb": {
            "type": "integer",
            "title": "Disk Gb"
          },
          "location_id": {
            "type": "integer",
            "title": "Location Id"
          },
          "location_name": {
            "type": "string",
            "title": "Location Name"
          },
          "country_code": {
            "type": "string",
            "title": "Country Code"
          },
          "platform": {
            "type": "string",
            "enum": [
              "epyc",
              "ryzen",
              "xeon"
            ],
            "title": "Platform"
          },
          "ips": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Ips"
          },
          "paid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid Until",
            "description": "Окончание оплаченного срока услуги, UTC."
          },
          "auto_renew": {
            "type": "boolean",
            "title": "Auto Renew",
            "description": "Автопродление с баланса интеграции. Изменение флага само по себе не продлевает услугу."
          }
        },
        "type": "object",
        "required": [
          "id",
          "api_user_id",
          "name",
          "status",
          "plan_code",
          "cpu_cores",
          "cpu_percent",
          "ram_mb",
          "disk_gb",
          "location_id",
          "location_name",
          "country_code",
          "platform",
          "ips",
          "paid_until",
          "auto_renew"
        ],
        "title": "VmListItem"
      },
      "VmListResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/VmListItem"
            },
            "type": "array",
            "title": "Data"
          },
          "total_count": {
            "type": "integer",
            "title": "Total Count",
            "description": "Полное количество записей с учётом фильтров, до пагинации."
          }
        },
        "type": "object",
        "required": [
          "success",
          "data",
          "total_count"
        ],
        "title": "VmListResponse",
        "example": {
          "success": true,
          "data": [
            {
              "id": 1,
              "api_user_id": "customer-123",
              "name": "Example",
              "status": "example",
              "plan_code": "C1",
              "cpu_cores": 1,
              "cpu_percent": 60,
              "ram_mb": 1,
              "disk_gb": 1,
              "location_id": 1,
              "location_name": "Poland",
              "country_code": "PL",
              "platform": "epyc",
              "ips": [
                "example"
              ],
              "paid_until": null,
              "auto_renew": false
            }
          ],
          "total_count": 1
        }
      },
      "VmMetrics": {
        "properties": {
          "vm_id": {
            "type": "integer",
            "title": "Vm Id"
          },
          "timeframe": {
            "type": "string",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "title": "Timeframe"
          },
          "cf": {
            "type": "string",
            "enum": [
              "AVERAGE",
              "MAX"
            ],
            "title": "Cf"
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/MetricPoint"
            },
            "type": "array",
            "title": "Points"
          }
        },
        "type": "object",
        "required": [
          "vm_id",
          "timeframe",
          "cf",
          "points"
        ],
        "title": "VmMetrics"
      },
      "VmMetricsResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/VmMetrics"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "VmMetricsResponse",
        "example": {
          "success": true,
          "data": {
            "vm_id": 101,
            "timeframe": "hour",
            "cf": "AVERAGE",
            "points": [
              {
                "time": 1790596800,
                "cpu_percent": null,
                "memory_used_bytes": null,
                "memory_total_bytes": null,
                "network_in_mbps": null,
                "network_out_mbps": null,
                "disk_read_bytes_per_second": null,
                "disk_write_bytes_per_second": null
              }
            ]
          }
        }
      },
      "VmOperation": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "vm_id": {
            "type": "integer",
            "title": "Vm Id"
          },
          "action": {
            "enum": [
              "power",
              "delete",
              "ip_attach",
              "ip_detach",
              "firewall_add",
              "firewall_update",
              "firewall_delete",
              "firewall_reorder",
              "firewall_policies",
              "password_reset",
              "reinstall",
              "rescue_enable",
              "rescue_disable"
            ],
            "title": "Action",
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed"
            ],
            "title": "Status"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VmDeleteResult"
              },
              {
                "$ref": "#/components/schemas/VmIpAttachResult"
              },
              {
                "$ref": "#/components/schemas/VmIpDetachResult"
              },
              {
                "$ref": "#/components/schemas/PasswordResetResult"
              },
              {
                "$ref": "#/components/schemas/ReinstallResult"
              },
              {
                "$ref": "#/components/schemas/RescueResult"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Result"
          },
          "requires_review": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requires Review",
            "description": "Результат операции требует выяснения перед новым разрушительным действием."
          }
        },
        "type": "object",
        "required": [
          "id",
          "vm_id",
          "action",
          "status",
          "created_at",
          "started_at",
          "finished_at"
        ],
        "title": "VmOperation"
      },
      "VmOperationHistoryItem": {
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Id"
          },
          "vm_id": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Vm Id"
          },
          "action": {
            "type": "string",
            "title": "Action"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed",
              "cancelled"
            ],
            "title": "Status"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "attempts": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Attempts"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id"
          },
          "power_action": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "start",
                  "shutdown",
                  "reboot",
                  "stop",
                  "reset"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Power Action"
          },
          "requires_review": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requires Review",
            "description": "Результат операции требует выяснения перед новым разрушительным действием."
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          }
        },
        "type": "object",
        "required": [
          "id",
          "vm_id",
          "action",
          "status",
          "created_at",
          "started_at",
          "finished_at",
          "attempts"
        ],
        "title": "VmOperationHistoryItem"
      },
      "VmOperationListResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/VmOperationHistoryItem"
            },
            "type": "array",
            "title": "Data"
          },
          "total_count": {
            "type": "integer",
            "title": "Total Count",
            "description": "Полное количество записей с учётом фильтров, до пагинации."
          }
        },
        "type": "object",
        "required": [
          "success",
          "data",
          "total_count"
        ],
        "title": "VmOperationListResponse",
        "example": {
          "success": true,
          "data": [
            {
              "id": 1,
              "vm_id": 101,
              "action": "start",
              "status": "queued",
              "created_at": "2026-09-28T12:00:00Z",
              "started_at": null,
              "finished_at": null,
              "attempts": 1,
              "order_id": null,
              "power_action": null,
              "requires_review": null,
              "error_code": null,
              "error_message": null
            }
          ],
          "total_count": 1
        }
      },
      "VmOperationResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/VmOperation"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "VmOperationResponse",
        "example": {
          "success": true,
          "data": {
            "id": 1,
            "vm_id": 101,
            "action": "power",
            "status": "queued",
            "created_at": "2026-09-28T12:00:00Z",
            "started_at": null,
            "finished_at": null,
            "error_code": null,
            "error_message": null,
            "result": null,
            "requires_review": null
          }
        }
      },
      "VmOs": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "code": {
            "type": "string",
            "title": "Code"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "code",
          "name"
        ],
        "title": "VmOs"
      },
      "VmPowerBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "action": {
            "type": "string",
            "enum": [
              "start",
              "shutdown",
              "reboot",
              "stop",
              "reset"
            ],
            "title": "Action"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "action"
        ],
        "title": "VmPowerBody",
        "example": {
          "api_key_id": 1,
          "action": "start"
        }
      },
      "VmRenewBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "months": {
            "type": "integer",
            "enum": [
              1,
              3,
              6,
              12,
              24,
              36
            ],
            "title": "Months",
            "default": 1,
            "description": "Календарные месяцы: 1, 3, 6, 12, 24 или 36. Целое JSON-число."
          },
          "expected_amount_usd": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,11}\\.\\d{4}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Amount Usd",
            "description": "Необязательная подтверждённая цена в USD, ровно четыре знака после точки. Изменение цены возвращает 409 price_changed до списания. При смене тарифа это максимальная допустимая сумма."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id"
        ],
        "title": "VmRenewBody",
        "example": {
          "api_key_id": 1,
          "months": 1
        }
      },
      "VmResizeBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "expected_amount_usd": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,11}\\.\\d{4}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Amount Usd",
            "description": "Необязательная подтверждённая цена в USD, ровно четыре знака после точки. Изменение цены возвращает 409 price_changed до списания. При смене тарифа это максимальная допустимая сумма."
          },
          "plan_code": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$",
            "title": "Plan Code",
            "description": "Код тарифа VPS из GET /plans."
          },
          "cpu_percent": {
            "anyOf": [
              {
                "type": "integer",
                "enum": [
                  20,
                  40,
                  60,
                  80,
                  100
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Percent",
            "description": "Доля CPU: 20, 40, 60, 80 или 100. При создании по умолчанию 60; при смене тарифа без поля сохраняется текущая доля."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "plan_code"
        ],
        "title": "VmResizeBody",
        "example": {
          "api_key_id": 1,
          "plan_code": "C1"
        }
      },
      "VmStatus": {
        "properties": {
          "vm_id": {
            "type": "integer",
            "title": "Vm Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "uptime": {
            "type": "integer",
            "title": "Uptime"
          }
        },
        "type": "object",
        "required": [
          "vm_id",
          "status",
          "uptime"
        ],
        "title": "VmStatus"
      },
      "VmStatusResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/VmStatus"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "VmStatusResponse",
        "example": {
          "success": true,
          "data": {
            "vm_id": 101,
            "status": "example",
            "uptime": 1
          }
        }
      },
      "VmTraffic": {
        "properties": {
          "vm_id": {
            "type": "integer",
            "title": "Vm Id"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "period": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrafficPeriod"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_sample_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Sample At"
          },
          "shaping": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrafficShaping"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "vm_id",
          "enabled",
          "period",
          "last_sample_at"
        ],
        "title": "VmTraffic"
      },
      "VmTrafficResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/VmTraffic"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "VmTrafficResponse",
        "example": {
          "success": true,
          "data": {
            "vm_id": 101,
            "enabled": true,
            "period": null,
            "last_sample_at": null,
            "shaping": null
          }
        }
      },
      "VmTrafficTopupBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "expected_amount_usd": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,11}\\.\\d{4}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Amount Usd",
            "description": "Необязательная подтверждённая цена в USD, ровно четыре знака после точки. Изменение цены возвращает 409 price_changed до списания. При смене тарифа это максимальная допустимая сумма."
          },
          "expected_period_id": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9.223372036854776e+18,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Period Id",
            "description": "ID периода трафика из расчёта. При смене периода возвращается 409 quote_expired."
          },
          "traffic_tb": {
            "type": "integer",
            "maximum": 8388607.0,
            "minimum": 1.0,
            "title": "Traffic Tb",
            "description": "Целое количество дополнительных единиц трафика; единица равна 1024⁴ байт."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "traffic_tb"
        ],
        "title": "VmTrafficTopupBody",
        "example": {
          "api_key_id": 1,
          "traffic_tb": 1
        }
      },
      "TermQuoteResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "amount_usd",
              "balance_usd",
              "currency",
              "months",
              "discount_percent"
            ],
            "properties": {
              "amount_usd": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{4}$"
              },
              "balance_usd": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{4}$"
              },
              "currency": {
                "type": "string",
                "const": "USD"
              },
              "months": {
                "type": "integer"
              },
              "discount_percent": {
                "type": "string"
              }
            }
          }
        },
        "example": {
          "success": true,
          "data": {
            "amount_usd": "5.0000",
            "balance_usd": "100.0000",
            "currency": "USD",
            "months": 1,
            "discount_percent": "0"
          }
        }
      },
      "ResizeQuoteResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "amount_usd",
              "balance_usd",
              "currency",
              "vm_id",
              "new_monthly_price_usd",
              "paid_until"
            ],
            "properties": {
              "amount_usd": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{4}$"
              },
              "balance_usd": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{4}$"
              },
              "currency": {
                "type": "string",
                "const": "USD"
              },
              "vm_id": {
                "type": "integer"
              },
              "new_monthly_price_usd": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{4}$"
              },
              "paid_until": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        },
        "example": {
          "success": true,
          "data": {
            "amount_usd": "5.0000",
            "balance_usd": "100.0000",
            "currency": "USD",
            "vm_id": 101,
            "new_monthly_price_usd": "10.0000",
            "paid_until": "2026-09-28T12:00:00Z"
          }
        }
      },
      "TrafficQuoteResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "amount_usd",
              "balance_usd",
              "currency",
              "vm_id",
              "unit_price_usd",
              "expected_period_id",
              "period_ends_at"
            ],
            "properties": {
              "amount_usd": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{4}$"
              },
              "balance_usd": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{4}$"
              },
              "currency": {
                "type": "string",
                "const": "USD"
              },
              "vm_id": {
                "type": "integer"
              },
              "unit_price_usd": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{4}$"
              },
              "expected_period_id": {
                "type": "integer"
              },
              "period_ends_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        },
        "example": {
          "success": true,
          "data": {
            "amount_usd": "5.0000",
            "balance_usd": "100.0000",
            "currency": "USD",
            "vm_id": 101,
            "unit_price_usd": "1.0000",
            "expected_period_id": 601,
            "period_ends_at": "2026-09-28T12:00:00Z"
          }
        }
      },
      "Ipv4QuoteResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "amount_usd",
              "balance_usd",
              "currency",
              "vm_id",
              "period_days"
            ],
            "properties": {
              "amount_usd": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{4}$"
              },
              "balance_usd": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{4}$"
              },
              "currency": {
                "type": "string",
                "const": "USD"
              },
              "vm_id": {
                "type": "integer"
              },
              "period_days": {
                "type": "integer",
                "const": 30
              }
            }
          }
        },
        "example": {
          "success": true,
          "data": {
            "amount_usd": "5.0000",
            "balance_usd": "100.0000",
            "currency": "USD",
            "vm_id": 101,
            "period_days": 30
          }
        }
      },
      "RentalAutoRenewResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "rental_id",
              "auto_renew"
            ],
            "properties": {
              "rental_id": {
                "type": "integer"
              },
              "auto_renew": {
                "type": "boolean"
              }
            }
          }
        },
        "example": {
          "success": true,
          "data": {
            "rental_id": 201,
            "auto_renew": false
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "detail"
        ],
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            ]
          }
        }
      },
      "VmGuestInitialization": {
        "properties": {
          "status": {
            "enum": [
              "succeeded",
              "failed",
              "unknown"
            ],
            "title": "Status",
            "type": "string"
          },
          "error_code": {
            "anyOf": [
              {
                "enum": [
                  "cloud_init_failed",
                  "guest_initialization_timeout"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Error Code"
          }
        },
        "required": [
          "status"
        ],
        "title": "VmGuestInitialization",
        "type": "object",
        "description": "Результат последней установки: succeeded — cloud-init завершился; failed / cloud_init_failed — ошибка пользовательской настройки; unknown / guest_initialization_timeout — результат не подтверждён за 15 минут. failed и unknown не означают, что работающий VPS не создан: заказ может быть completed, переустановка — succeeded. null — результата нет. Не подтверждает работоспособность приложения.",
        "example": {
          "status": "succeeded",
          "error_code": null
        }
      },
      "VmRescueState": {
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean"
          },
          "access": {
            "anyOf": [
              {
                "enum": [
                  "console",
                  "ssh"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Access"
          },
          "requires_review": {
            "title": "Requires Review",
            "type": "boolean"
          },
          "operation_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Operation Id"
          },
          "operation_status": {
            "anyOf": [
              {
                "enum": [
                  "queued",
                  "running",
                  "succeeded",
                  "failed",
                  "cancelled"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Operation Status"
          }
        },
        "required": [
          "active",
          "requires_review"
        ],
        "title": "VmRescueState",
        "type": "object",
        "description": "Состояние Rescue. active означает сохранённый контекст Rescue, а не гарантию доступности SSH. access: ssh, console или null. requires_review требует проверки состояния; operation_id и operation_status относятся к операции Rescue. null — состояние не получено.",
        "example": {
          "active": true,
          "access": "ssh",
          "requires_review": false,
          "operation_id": 501,
          "operation_status": "succeeded"
        }
      },
      "RescueEnableBody": {
        "additionalProperties": false,
        "properties": {
          "api_key_id": {
            "maximum": 9223372036854775807,
            "minimum": 1,
            "title": "Api Key Id",
            "type": "integer"
          },
          "password": {
            "maxLength": 128,
            "minLength": 5,
            "pattern": "^[^\\r\\n\\x00]+$",
            "title": "Password",
            "type": "string",
            "description": "Временный пароль root для SSH в Rescue: 5–128 символов, без CR, LF и NUL. Пароль задаёт клиент."
          }
        },
        "required": [
          "api_key_id",
          "password"
        ],
        "title": "RescueEnableBody",
        "type": "object",
        "example": {
          "api_key_id": 1,
          "password": "Temporary-Rescue-2026!"
        }
      },
      "RescueResult": {
        "properties": {
          "vm_id": {
            "title": "Vm Id",
            "type": "integer"
          },
          "status": {
            "enum": [
              "running",
              "stopped"
            ],
            "title": "Status",
            "type": "string"
          },
          "rescue": {
            "$ref": "#/components/schemas/VmRescueState"
          }
        },
        "required": [
          "vm_id",
          "status",
          "rescue"
        ],
        "title": "RescueResult",
        "type": "object",
        "example": {
          "vm_id": 101,
          "status": "running",
          "rescue": {
            "active": true,
            "access": "ssh",
            "requires_review": false,
            "operation_id": 501,
            "operation_status": "succeeded"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Секретный ключ интеграции из дашборда."
      }
    }
  },
  "servers": [
    {
      "url": "https://cloud-api.adaptgroup.pro"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Catalog",
      "x-displayName": "Каталог",
      "description": "Маршруты раздела «Каталог» для интеграции Cloud API."
    },
    {
      "name": "VPS billing",
      "x-displayName": "Оплата VPS",
      "description": "Маршруты раздела «Оплата VPS» для интеграции Cloud API."
    },
    {
      "name": "VPS management",
      "x-displayName": "Управление VPS",
      "description": "Маршруты раздела «Управление VPS» для интеграции Cloud API."
    },
    {
      "name": "Firewall",
      "x-displayName": "Firewall",
      "description": "Маршруты раздела «Firewall» для интеграции Cloud API."
    },
    {
      "name": "IP addresses",
      "x-displayName": "IP-адреса",
      "description": "Маршруты раздела «IP-адреса» для интеграции Cloud API."
    },
    {
      "name": "Dedicated servers",
      "x-displayName": "Выделенные серверы",
      "description": "Маршруты раздела «Выделенные серверы» для интеграции Cloud API."
    },
    {
      "name": "Orders",
      "x-displayName": "Заказы",
      "description": "Маршруты раздела «Заказы» для интеграции Cloud API."
    },
    {
      "name": "Balance",
      "x-displayName": "Баланс",
      "description": "Маршруты раздела «Баланс» для интеграции Cloud API."
    }
  ]
}
