{
  "openapi": "3.1.0",
  "info": {
    "title": "AdaptGroup Cloud API",
    "version": "4.6.0",
    "description": "Cloud API позволяет вашему бекенду продавать и обслуживать VPS, выделенные серверы и дополнительные IPv4 с баланса интеграции.\n\nБазовый адрес: **https://cloud-api.adaptgroup.pro**. Каждый запрос требует `X-Api-Key` и `api_key_id` интеграции в указанном query или JSON-теле. RU и EN описывают один API; locale при выдаче ссылки входа в почту задаёт язык почтового интерфейса.\n\nДеньги передаются десятичными строками в USD. Цена тарифа уже включает наценку интеграции; дополнительный трафик VPS и IPv4 оплачиваются по фиксированным ценам. Расчёт цены не списывает баланс и не резервирует ресурсы.\n\nНачните с [Быстрого старта](./quick-start) и [Покупки и жизненного цикла](./purchase-flow). В [Вебхуках](./webhooks) описаны результаты заказов, события услуг и предупреждения об окончании оплаты.\n\n[OpenAPI (English)](/openapi/cloud.json) · [OpenAPI (Русский)](/openapi/cloud.ru.json)\n\nДоступ по IP настраивается в дашборде во вкладке **Белый список**. Пустой список разрешает запросы с любого IP; непустой — только с разрешённых IPv4/IPv6-адресов и подсетей CIDR. Действующий API-ключ обязателен всегда. Запросы вне списка возвращают HTTP 403 с `detail.code=ip_not_allowed`. Доступ через дашборд и отправка вебхуков сохраняются."
  },
  "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
              },
              "examples": {
                "standard": {
                  "summary": "Общая разметка",
                  "value": {
                    "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!"
                  }
                },
                "storage": {
                  "summary": "Storage: группы дисков",
                  "value": {
                    "api_key_id": 1,
                    "months": 1,
                    "api_user_id": "customer-123",
                    "plan_id": 2,
                    "os_id": 1,
                    "extra_ipv4_count": 0,
                    "auto_renew": false,
                    "password": "Example-Password-2026!",
                    "disk_layouts": {
                      "94dc1d25-4d4f-4c6b-a8e3-a226f66254a1": "raid1",
                      "dc8c3bfe-021d-4d40-adbe-55784a0b71e2": "raid6"
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Передайте ровно один вариант: disk_layout для тарифа с общей разметкой либо disk_layouts для тарифа с группами дисков. disk_layouts — объект, где ключи взяты из disks[].id каталога, а значения — разрешённые коды разметки этих групп. Нужно передать все группы, без лишних ключей. ID непрозрачны: не определяйте их по типу диска. Значения по умолчанию выбирает клиент; API не подставляет их. При повторе заказа сохраните тот же выбор.\n\nВыберите plan_id из каталога дедиков. Физический сервер выбирает платформа. Передайте ровно одно: пароль или публичный SSH-ключ, в том числе для расчёта. extra_ipv4_count добавляет адреса к аренде по фиксированной цене. Завершённый заказ подтверждает резерв; выдавайте сервер клиенту после dedicated.issued / статуса active. Срок начинается с выдачи.\n\nРасчёт не создаёт заказ, списание или резерв. Можно рассчитывать при недостаточном балансе. При подтверждении покупки передайте amount_usd как expected_amount_usd.\n\nДля групп HDD доступны RAID 5 (от 3 дисков), RAID 6 (от 4) и RAID 10 (чётное число от 4), если соответствующий код есть в вариантах группы. Для других типов дисков и общей разметки эти варианты недоступны.\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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                },
                "examples": {
                  "standard": {
                    "summary": "Общая разметка",
                    "value": {
                      "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": [
                            {
                              "code": "separate",
                              "name": "No Raid"
                            }
                          ],
                          "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",
                          "datacenter": null,
                          "monthly_price_usd": "5.0000",
                          "extra_ipv4_monthly_price_usd": "5.0000",
                          "extra_traffic_tb_price_usd": "5.0000",
                          "term_discounts": {},
                          "available": 1,
                          "city": "Gdańsk"
                        }
                      ],
                      "total_count": 1,
                      "currency": "USD",
                      "updated_at": null
                    }
                  },
                  "storage": {
                    "summary": "Storage: группы дисков",
                    "value": {
                      "success": true,
                      "data": [
                        {
                          "id": 2,
                          "code": "STORAGE-E2244G",
                          "name": "Storage E-2244G",
                          "platform": "storage",
                          "cpu_model": "Intel Xeon E-2244G",
                          "cpu_count": 1,
                          "cpu_cores": 4,
                          "cpu_threads": 8,
                          "ram_gb": 64,
                          "ram_description": null,
                          "disks": [
                            {
                              "id": "94dc1d25-4d4f-4c6b-a8e3-a226f66254a1",
                              "count": 2,
                              "size_gb": 500,
                              "type": "nvme",
                              "model": null,
                              "disk_layouts": [
                                {
                                  "code": "separate",
                                  "name": "No Raid"
                                },
                                {
                                  "code": "lvm_linear",
                                  "name": "LVM (combined disks)"
                                },
                                {
                                  "code": "raid0",
                                  "name": "RAID 0"
                                },
                                {
                                  "code": "raid1",
                                  "name": "RAID 1"
                                }
                              ],
                              "default_disk_layout": "separate"
                            },
                            {
                              "id": "dc8c3bfe-021d-4d40-adbe-55784a0b71e2",
                              "count": 4,
                              "size_gb": 18000,
                              "type": "hdd",
                              "model": null,
                              "disk_layouts": [
                                {
                                  "code": "separate",
                                  "name": "No Raid"
                                },
                                {
                                  "code": "lvm_linear",
                                  "name": "LVM (combined disks)"
                                },
                                {
                                  "code": "raid0",
                                  "name": "RAID 0"
                                },
                                {
                                  "code": "raid1",
                                  "name": "RAID 1"
                                },
                                {
                                  "code": "raid5",
                                  "name": "RAID 5"
                                },
                                {
                                  "code": "raid6",
                                  "name": "RAID 6"
                                },
                                {
                                  "code": "raid10",
                                  "name": "RAID 10"
                                }
                              ],
                              "default_disk_layout": "separate"
                            }
                          ],
                          "disk_layouts": [],
                          "default_disk_layout": null,
                          "port_mbps": 10000,
                          "traffic_tb": "50",
                          "included_ipv4": 1,
                          "ipv6_prefix_length": null,
                          "location_id": 1,
                          "location_name": "Poland",
                          "country_code": "PL",
                          "datacenter": null,
                          "monthly_price_usd": "212.5000",
                          "extra_ipv4_monthly_price_usd": "5.0000",
                          "extra_traffic_tb_price_usd": "5.0000",
                          "term_discounts": {
                            "1": "0",
                            "3": "3",
                            "6": "5",
                            "12": "8",
                            "24": "10",
                            "36": "12"
                          },
                          "available": 1,
                          "city": "Gdańsk"
                        }
                      ],
                      "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "У тарифов с группами дисков (включая Storage) каждая disks[] содержит id, disk_layouts с code/name и default_disk_layout. Верхний disk_layouts пуст, default_disk_layout равен null. Выбор передавайте объектом disk_layouts по ID групп. У остальных тарифов используйте верхние варианты и строковый disk_layout. separate отображается как No Raid. Доступность не резервирует сервер. Цена сервера включает наценку; дополнительные IPv4 и трафик имеют фиксированные цены. term_discounts содержит скидки за срок.\n\nДля групп HDD доступны RAID 5 (от 3 дисков), RAID 6 (от 4) и RAID 10 (чётное число от 4), если соответствующий код есть в вариантах группы. Для других типов дисков и общей разметки эти варианты недоступны.\n\ndata[].city содержит город локации без локализации, включая тарифы Storage.\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"
              },
              "examples": {
                "standard": {
                  "summary": "Общая разметка",
                  "value": {
                    "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!"
                  }
                },
                "storage": {
                  "summary": "Storage: группы дисков",
                  "value": {
                    "api_key_id": 1,
                    "months": 1,
                    "api_user_id": "customer-123",
                    "plan_id": 2,
                    "os_id": 1,
                    "extra_ipv4_count": 0,
                    "auto_renew": false,
                    "password": "Example-Password-2026!",
                    "disk_layouts": {
                      "94dc1d25-4d4f-4c6b-a8e3-a226f66254a1": "raid1",
                      "dc8c3bfe-021d-4d40-adbe-55784a0b71e2": "raid6"
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Передайте ровно один вариант: disk_layout для тарифа с общей разметкой либо disk_layouts для тарифа с группами дисков. disk_layouts — объект, где ключи взяты из disks[].id каталога, а значения — разрешённые коды разметки этих групп. Нужно передать все группы, без лишних ключей. ID непрозрачны: не определяйте их по типу диска. Значения по умолчанию выбирает клиент; API не подставляет их. При повторе заказа сохраните тот же выбор.\n\nВыберите plan_id из каталога дедиков. Физический сервер выбирает платформа. Передайте ровно одно: пароль или публичный SSH-ключ, в том числе для расчёта. extra_ipv4_count добавляет адреса к аренде по фиксированной цене. Завершённый заказ подтверждает резерв; выдавайте сервер клиенту после dedicated.issued / статуса active. Срок начинается с выдачи.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\nДля групп HDD доступны RAID 5 (от 3 дисков), RAID 6 (от 4) и RAID 10 (чётное число от 4), если соответствующий код есть в вариантах группы. Для других типов дисков и общей разметки эти варианты недоступны.\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"
                },
                "examples": {
                  "standard": {
                    "summary": "Общая разметка",
                    "value": {
                      "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",
                          "datacenter": null,
                          "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
                    }
                  },
                  "storage": {
                    "summary": "Storage: группы дисков",
                    "value": {
                      "success": true,
                      "data": [
                        {
                          "id": 1,
                          "api_user_id": "customer-123",
                          "order_id": 401,
                          "status": "preparing",
                          "plan": {
                            "id": 2,
                            "code": "STORAGE-E2244G",
                            "name": "Storage E-2244G",
                            "platform": "storage",
                            "cpu_model": "Intel Xeon E-2244G",
                            "cpu_count": 1,
                            "cpu_cores": 4,
                            "cpu_threads": 8,
                            "ram_gb": 64,
                            "ram_description": null,
                            "disks": [
                              {
                                "count": 2,
                                "size_gb": 500,
                                "type": "nvme",
                                "model": null,
                                "id": "94dc1d25-4d4f-4c6b-a8e3-a226f66254a1",
                                "disk_layouts": [
                                  "separate",
                                  "lvm_linear",
                                  "raid0",
                                  "raid1"
                                ],
                                "default_disk_layout": "separate"
                              },
                              {
                                "count": 4,
                                "size_gb": 18000,
                                "type": "hdd",
                                "model": null,
                                "id": "dc8c3bfe-021d-4d40-adbe-55784a0b71e2",
                                "disk_layouts": [
                                  "separate",
                                  "lvm_linear",
                                  "raid0",
                                  "raid1",
                                  "raid5",
                                  "raid6",
                                  "raid10"
                                ],
                                "default_disk_layout": "separate"
                              }
                            ],
                            "disk_layouts": [
                              "separate"
                            ],
                            "default_disk_layout": "separate",
                            "port_mbps": 10000,
                            "traffic_tb": "50",
                            "included_ipv4": 1,
                            "ipv6_prefix_length": null
                          },
                          "location_id": 1,
                          "location_name": "Poland",
                          "country_code": "PL",
                          "datacenter": null,
                          "os": "debian-12",
                          "hostname": null,
                          "disk_layout": null,
                          "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",
                          "disk_layouts": {
                            "94dc1d25-4d4f-4c6b-a8e3-a226f66254a1": "raid1",
                            "dc8c3bfe-021d-4d40-adbe-55784a0b71e2": "raid6"
                          }
                        }
                      ],
                      "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                },
                "examples": {
                  "standard": {
                    "summary": "Общая разметка",
                    "value": {
                      "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",
                        "datacenter": null,
                        "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
                          }
                        ]
                      }
                    }
                  },
                  "storage": {
                    "summary": "Storage: группы дисков",
                    "value": {
                      "success": true,
                      "data": {
                        "id": 1,
                        "api_user_id": "customer-123",
                        "order_id": 401,
                        "status": "preparing",
                        "plan": {
                          "id": 2,
                          "code": "STORAGE-E2244G",
                          "name": "Storage E-2244G",
                          "platform": "storage",
                          "cpu_model": "Intel Xeon E-2244G",
                          "cpu_count": 1,
                          "cpu_cores": 4,
                          "cpu_threads": 8,
                          "ram_gb": 64,
                          "ram_description": null,
                          "disks": [
                            {
                              "count": 2,
                              "size_gb": 500,
                              "type": "nvme",
                              "model": null,
                              "id": "94dc1d25-4d4f-4c6b-a8e3-a226f66254a1",
                              "disk_layouts": [
                                "separate",
                                "lvm_linear",
                                "raid0",
                                "raid1"
                              ],
                              "default_disk_layout": "separate"
                            },
                            {
                              "count": 4,
                              "size_gb": 18000,
                              "type": "hdd",
                              "model": null,
                              "id": "dc8c3bfe-021d-4d40-adbe-55784a0b71e2",
                              "disk_layouts": [
                                "separate",
                                "lvm_linear",
                                "raid0",
                                "raid1",
                                "raid5",
                                "raid6",
                                "raid10"
                              ],
                              "default_disk_layout": "separate"
                            }
                          ],
                          "disk_layouts": [
                            "separate"
                          ],
                          "default_disk_layout": "separate",
                          "port_mbps": 10000,
                          "traffic_tb": "50",
                          "included_ipv4": 1,
                          "ipv6_prefix_length": null
                        },
                        "location_id": 1,
                        "location_name": "Poland",
                        "country_code": "PL",
                        "datacenter": null,
                        "os": "debian-12",
                        "hostname": null,
                        "disk_layout": null,
                        "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
                          }
                        ],
                        "disk_layouts": {
                          "94dc1d25-4d4f-4c6b-a8e3-a226f66254a1": "raid1",
                          "dc8c3bfe-021d-4d40-adbe-55784a0b71e2": "raid6"
                        }
                      }
                    }
                  }
                }
              }
            },
            "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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",
                      "datacenter": null,
                      "platforms": [
                        {
                          "platform": "epyc",
                          "cpu_display_name": "AMD EPYC",
                          "availability_updated_at": null,
                          "plans": [
                            {
                              "code": "A1",
                              "name": "A1",
                              "cpu_cores": 1,
                              "ram_mb": 1024,
                              "disk_gb": 20,
                              "traffic_tb": "5.0000",
                              "monthly_price_usd": "5.0000",
                              "available": null,
                              "automatic_backup_monthly_price_usd": "1.0000"
                            }
                          ],
                          "term_discounts": {
                            "1": "0",
                            "3": "3",
                            "6": "5",
                            "12": "8",
                            "24": "10",
                            "36": "12"
                          },
                          "extra_ipv4_monthly_price_usd": "2.0000",
                          "extra_traffic_tb_price_usd": "1.0000",
                          "cpu_max_frequency_ghz": null
                        }
                      ],
                      "city": "Gdańsk"
                    }
                  ],
                  "manual_backup_gb_month_price_usd": "0.050000"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Цены тарифов VPS уже включают наценку интеграции. cpu_percent по умолчанию 60; варианты: 20, 40, 60, 80, 100. Доступность — снимок, а не резерв. available=null означает отсутствие данных, а не нулевой остаток. \n\nlocations[].city содержит город локации без локализации. locations[].platforms[].term_discounts — общие для тарифов этой локации/платформы скидки: ключ — срок в месяцах строкой (1, 3, 6, 12, 24, 36), значение — процент строкой. Возвращаются актуальные скидки каталога. Доступность может различаться для cpu_percent=20/40/60/80/100; по умолчанию 60. available=null означает неизвестный остаток, а не ноль. Итоговую стоимость подтверждает маршрут расчёта покупки: из-за округления месячной цены пересчёт по каталогу может отличаться от quote.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)\n\nКаждый элемент locations[].platforms[] также содержит extra_ipv4_monthly_price_usd (месячная ставка за один IPv4; отдельная аренда и докупка для VPS используют календарные месяцы) и extra_traffic_tb_price_usd (1 ТБ = 1024^4 байт). Это фиксированные цены без наценки интеграции, коэффициента CPU и скидки за срок, строки в USD с четырьмя знаками после запятой. Цены доступны до создания VPS. Перед покупкой подтверждайте актуальную стоимость соответствующим маршрутом расчёта.\n\nВ каждом тарифе возвращается automatic_backup_monthly_price_usd. Цена автоматических бекапов этого тарифа за месяц в USD: бекапы ежедневные, хранятся 7 последних бекапов. Цена за весь пакет, а не за каждую копию; без наценки интеграции, коэффициента CPU и скидки за срок. Строка с четырьмя знаками после запятой. На верхнем уровне ответа manual_backup_gb_month_price_usd содержит общую ставку ручных копий. Общая ставка в USD за GiB хранимой ручной копии в месяц (1 GiB = 1073741824 байт). Ручной бекап создаётся на уже существующей VPS. Это ставка хранения, а не итоговая цена за копию или за GiB диска VPS. Без наценки и скидки за срок. Строка с шестью знаками после запятой. Управление услугами — /backup-services и /backups; см. [Бекапы](./backups).\n\nДо покупки выбирается семейство CPU: epyc — AMD EPYC, ryzen — AMD Ryzen, xeon — Intel Xeon. В одной локации могут использоваться разные модели одного семейства. cpu_display_name содержит название семейства; cpu_max_frequency_ghz равен null: точная модель и частота известны после выдачи VPS."
      }
    },
    "/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": "debian-12",
                      "name": "Debian 12",
                      "logo_url": "https://cdn.example.com/os/debian.svg"
                    },
                    {
                      "id": 2,
                      "code": "ubuntu-24.04",
                      "name": "Ubuntu 24.04",
                      "logo_url": 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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Для покупки и переустановки передавайте числовой os_id из справочника. code — код шаблона ОС, name — отображаемое название. logo_url — ссылка на картинку ОС либо null, если картинка не задана.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)\n\nДоступные Windows-образы появляются в этом же каталоге с id, code, name и logo_url. Коды: windows-10, windows-11, windows-server-2019-eval, windows-server-2022-eval и windows-server-2025-eval. Используйте актуальный каталог; наличие образа в списке не гарантирует свободные ресурсы и шаблон в каждой локации."
      }
    },
    "/reference/applications": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Приложения",
        "operationId": "list-applications",
        "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/ApplicationsResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "app_code": "wordpress",
                      "category": "websites",
                      "name": "WordPress",
                      "variant": "",
                      "version": null,
                      "logo_url": "https://cdn.example.com/app/wordpress.svg",
                      "documentation_url": null,
                      "supported_os": [
                        "ubuntu-24.04"
                      ],
                      "recommended_os": "ubuntu-24.04",
                      "min_cpu_cores": 1,
                      "min_ram_mb": 1024,
                      "min_disk_gb": 20,
                      "recommended_cpu_cores": 2,
                      "recommended_ram_mb": 2048,
                      "recommended_disk_gb": 40,
                      "requirements_source_urls": [],
                      "installation_mode": "cloud_init"
                    }
                  ],
                  "total": 1
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Активные приложения для создания VPS. Выберите числовой id и передайте его как application_id вместе с os_id. Варианты группируются по app_code; category — код одной категории, name — отображаемое название, variant и version — вариант и версия. Пустой variant означает обычный вариант; version может быть null. supported_os и recommended_os содержат коды ОС из каталога ОС. min_* — известные минимальные ресурсы; null означает, что минимум не указан. recommended_* — стартовая конфигурация, а не гарантия производительности приложения. RAM указана в MiB, диск — в GiB. logo_url — ссылка на картинку; documentation_url может быть null. requirements_source_urls — источники требований. Установщик и содержимое cloud-init не возвращаются.\n\ninstallation_mode — cloud_init или background. При background VPS выдаётся и оплачиваемый период начинается до завершения установки приложения. guest_initialization.status=succeeded подтверждает только завершение базового cloud-init; отдельного вебхука готовности приложения нет. Проверяйте adapt-application-install.service внутри VPS. Приложению могут потребоваться настройка, домен, токены или лицензии."
      }
    },
    "/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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Перед изменением прочитайте текущую revision и передайте её обратно. При конфликте перечитайте настройки перед новой командой. Порядок правил важен; перестановка должна содержать все ID ровно по одному разу. PUT заменяет правило целиком. position отсчитывается от нуля. Не более 100 правил; порты — строки вида \"443\" или \"8000-8010\", только для TCP/UDP. source/destination принимают IP или CIDR одной версии IP. Для открытия и закрытия SMTP-портов используйте отдельный маршрут [PATCH /vms/{vm_id}/firewall/smtp](./set-firewall-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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Перед изменением прочитайте текущую revision и передайте её обратно. При конфликте перечитайте настройки перед новой командой. Порядок правил важен; перестановка должна содержать все ID ровно по одному разу. PUT заменяет правило целиком. position отсчитывается от нуля. Не более 100 правил; порты — строки вида \"443\" или \"8000-8010\", только для TCP/UDP. source/destination принимают IP или CIDR одной версии IP. Для открытия и закрытия SMTP-портов используйте отдельный маршрут [PATCH /vms/{vm_id}/firewall/smtp](./set-firewall-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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Перед изменением прочитайте текущую revision и передайте её обратно. При конфликте перечитайте настройки перед новой командой. Порядок правил важен; перестановка должна содержать все ID ровно по одному разу. PUT заменяет правило целиком. position отсчитывается от нуля. Не более 100 правил; порты — строки вида \"443\" или \"8000-8010\", только для TCP/UDP. source/destination принимают IP или CIDR одной версии IP. Для открытия и закрытия SMTP-портов используйте отдельный маршрут [PATCH /vms/{vm_id}/firewall/smtp](./set-firewall-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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Перед изменением прочитайте текущую revision и передайте её обратно. При конфликте перечитайте настройки перед новой командой. Порядок правил важен; перестановка должна содержать все ID ровно по одному разу. PUT заменяет правило целиком. position отсчитывается от нуля. Не более 100 правил; порты — строки вида \"443\" или \"8000-8010\", только для TCP/UDP. source/destination принимают IP или CIDR одной версии IP. Для открытия и закрытия SMTP-портов используйте отдельный маршрут [PATCH /vms/{vm_id}/firewall/smtp](./set-firewall-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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Перед изменением прочитайте текущую revision и передайте её обратно. При конфликте перечитайте настройки перед новой командой. Порядок правил важен; перестановка должна содержать все ID ровно по одному разу. PUT заменяет правило целиком. position отсчитывается от нуля. Не более 100 правил; порты — строки вида \"443\" или \"8000-8010\", только для TCP/UDP. source/destination принимают IP или CIDR одной версии IP. Для открытия и закрытия SMTP-портов используйте отдельный маршрут [PATCH /vms/{vm_id}/firewall/smtp](./set-firewall-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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Перед изменением прочитайте текущую revision и передайте её обратно. При конфликте перечитайте настройки перед новой командой. Порядок правил важен; перестановка должна содержать все ID ровно по одному разу. PUT заменяет правило целиком. position отсчитывается от нуля. Не более 100 правил; порты — строки вида \"443\" или \"8000-8010\", только для TCP/UDP. source/destination принимают IP или CIDR одной версии IP. Для открытия и закрытия SMTP-портов используйте отдельный маршрут [PATCH /vms/{vm_id}/firewall/smtp](./set-firewall-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"
              },
              "examples": {
                "application": {
                  "summary": "Приложение",
                  "value": {
                    "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!",
                    "application_id": 1
                  }
                },
                "cloud_init": {
                  "summary": "Свой cloud-init",
                  "value": {
                    "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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 — результата нет. Не подтверждает работоспособность приложения.\n\nНеобязательный application_id выбирает приложение из GET /reference/applications. os_id и ровно один способ доступа остаются обязательными. Нельзя сочетать application_id с ненулевым cloud_init, включая {}. Доступность приложения, совместимость ОС и ресурсов проверяет сервис серверов при создании; Cloud API эти проверки не дублирует. При отклонении создания действует существующий возврат оплаты заказа. Расчёт цены определяет только стоимость VPS и не подтверждает совместимость приложения. Отдельной доплаты за приложение нет. При повторе с тем же Idempotency-Key сохраняйте application_id.\n\nVPS с Windows создаётся этим же маршрутом с os_id из GET /reference/os. Логин новой установки Windows — admin, Linux — root. Для Windows обязателен password: 8–127 символов, минимум три категории из строчных, заглавных, цифр и специальных символов; без CR, LF, NUL и имени пользователя внутри пароля. Не передавайте ssh_public_key, application_id или cloud_init со значением, отличным от null (включая {}). Имя компьютера Windows — не более 15 символов, не только цифры. Совместимость ОС, шаблона и ресурсов проверяет сервис серверов при выдаче; расчёт цены её не подтверждает. При отклонении создания действует существующий возврат оплаты заказа.\n\nДля новой VPS из оплаченного бекапа передайте backup_id вместо os_id. Не передавайте password, ssh_public_key, application_id и cloud_init: ОС, программы и доступы берутся из копии. api_user_id должен совпадать с владельцем бекапа. Новая VPS получает собственные адреса и оплачивается обычным заказом vm_purchase с наценкой тарифа и скидкой за срок. За восстановление отдельной платы нет; действует общий лимит 3 восстановления на услугу за 24 часа. Выбранный диск должен вместить все диски копии; совместимость проверяет сервис серверов."
      }
    },
    "/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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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,
                "months": 1
              }
            }
          }
        },
        "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,
                    "months": 1,
                    "monthly_price_usd": "5.0000"
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Покупает один дополнительный IPv4 на months=1/3/6/12/24/36 календарных месяцев (по умолчанию 1) и назначает его VPS. Цена — фиксированная месячная ставка × months, без наценки интеграции и скидки за срок. Оплата и автопродление адреса независимы от 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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Меняет пароль существующего пользователя ОС через гостевой агент. Если login отсутствует или равен null, используется фактический логин установки: обычно admin для Windows и root для Linux. Если логин неизвестен, HTTP 409 с кодом vm_login_required требует передать login явно. Явно указанный логин сохраняется. Требования к паролю Windows проверяет гостевая ОС. Нужен работающий гостевой агент. Ошибка или неподтверждённый результат не доказывают, что пароль остался прежним: проверьте доступ перед новой командой.\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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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 — результата нет. Не подтверждает работоспособность приложения.\n\nБез явного cloud_init переустановка сохраняет приложение и точный снимок установщика. Сервис серверов проверяет совместимость новой ОС. Явный cloud_init, включая {}, заменяет приложение; после успешной переустановки application становится null. Выбор другого application_id при переустановке не поддерживается.\n\nWindows переустанавливается этим же маршрутом. Логин установки сохраняется; его можно получить через GET /vms/{vm_id}. Если новый доступ не передан, используется сохранённый. Для Windows нужен подходящий пароль; SSH-ключи, приложения Linux и пользовательский cloud_init не поддерживаются. У существующей VPS должны быть совместимая конфигурация загрузки и достаточный диск; смена произвольной Linux VPS на Windows не гарантируется. Совместимость проверяет сервис серверов. Операция может завершиться ошибкой template_incompatible; проверяйте итоговый статус."
      }
    },
    "/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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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": "AMD EPYC 7502P",
                    "location_id": 1,
                    "location_name": "Poland",
                    "country_code": "PL",
                    "datacenter": null,
                    "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
                    },
                    "login": "root",
                    "cpu_max_frequency_ghz": 3.35
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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 — состояние не получено.\n\nСнимок приложения для этой установки или null, если приложения нет. Содержит публичные поля каталога и installer_sha256 — контрольную сумму сохранённого установщика, без его содержимого и реквизитов доступа. В заказе это снимок покупки; в деталях и списке VPS — последняя успешная установка.\n\nlogin — фактический пользователь установки, обычно admin для Windows или root для Linux; null означает, что логин неизвестен. Пароли не возвращаются.\n\nplatform, cpu_display_name и cpu_max_frequency_ghz описывают физический CPU текущей ноды VPS и могут быть null, если сведения не заполнены. После переноса следующие запросы списка/деталей отражают новую ноду. cpu_display_name передаётся как сохранённая строка модели и может содержать число физических ядер/потоков; выделенные ресурсы VPS определяются по cpu_cores. Максимальная частота — характеристика CPU, а не текущий замер или гарантированная частота каждого vCPU. Получайте эти поля из списка/деталей VPS, а не из события создания или результата операции.\n\nАдминистративная блокировка: admin_blocked_at и admin_block_reason возвращаются отдельно от status. Продление не снимает запрет и не запускает сервер. Ограничения и ошибки: [административная блокировка](./quick-start#административная-блокировка)."
      }
    },
    "/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"
              },
              "examples": {
                "application": {
                  "summary": "Приложение",
                  "value": {
                    "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!",
                    "application_id": 1
                  }
                },
                "cloud_init": {
                  "summary": "Свой cloud-init",
                  "value": {
                    "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"
                }
              }
            }
          },
          "429": {
            "description": "Лимит операций за 24 часа исчерпан",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "detail": {
                    "code": "backup_limit_reached",
                    "message": "Достигнут лимит операций бекапов за 24 часа"
                  }
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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 — результата нет. Не подтверждает работоспособность приложения.\n\nПри нехватке ресурсов заказ остаётся processing и ждёт выдачи. Очередь и её отмена доступны по /orders/{order_id}/queue. После выдачи parameters.paid_until заказа обновляется фактическим сроком из результата создания; до выдачи дата предварительная.\n\nНеобязательный application_id выбирает приложение из GET /reference/applications. os_id и ровно один способ доступа остаются обязательными. Нельзя сочетать application_id с ненулевым cloud_init, включая {}. Доступность приложения, совместимость ОС и ресурсов проверяет сервис серверов при создании; Cloud API эти проверки не дублирует. При отклонении создания действует существующий возврат оплаты заказа. Расчёт цены определяет только стоимость VPS и не подтверждает совместимость приложения. Отдельной доплаты за приложение нет. При повторе с тем же Idempotency-Key сохраняйте application_id.\n\nVPS с Windows создаётся этим же маршрутом с os_id из GET /reference/os. Логин новой установки Windows — admin, Linux — root. Для Windows обязателен password: 8–127 символов, минимум три категории из строчных, заглавных, цифр и специальных символов; без CR, LF, NUL и имени пользователя внутри пароля. Не передавайте ssh_public_key, application_id или cloud_init со значением, отличным от null (включая {}). Имя компьютера Windows — не более 15 символов, не только цифры. Совместимость ОС, шаблона и ресурсов проверяет сервис серверов при выдаче; расчёт цены её не подтверждает. При отклонении создания действует существующий возврат оплаты заказа.\n\nДля новой VPS из оплаченного бекапа передайте backup_id вместо os_id. Не передавайте password, ssh_public_key, application_id и cloud_init: ОС, программы и доступы берутся из копии. api_user_id должен совпадать с владельцем бекапа. Новая VPS получает собственные адреса и оплачивается обычным заказом vm_purchase с наценкой тарифа и скидкой за срок. За восстановление отдельной платы нет; действует общий лимит 3 восстановления на услугу за 24 часа. Выбранный диск должен вместить все диски копии; совместимость проверяет сервис серверов.\n\nАдминистративная блокировка: admin_blocked_at и admin_block_reason возвращаются отдельно от status. Продление не снимает запрет и не запускает сервер. Ограничения и ошибки: [административная блокировка](./quick-start#административная-блокировка)."
      },
      "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": "Фильтр по семейству CPU текущей ноды.",
            "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",
                      "datacenter": null,
                      "platform": "epyc",
                      "ips": [
                        "example"
                      ],
                      "paid_until": null,
                      "auto_renew": false,
                      "cpu_display_name": "AMD EPYC 7502P",
                      "cpu_max_frequency_ghz": 3.35
                    }
                  ],
                  "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Возвращает VPS только этой интеграции. api_user_id фильтрует по вашему идентификатору клиента. total_count — количество всех записей с выбранными фильтрами до limit/offset.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)\n\nСнимок приложения для этой установки или null, если приложения нет. Содержит публичные поля каталога и installer_sha256 — контрольную сумму сохранённого установщика, без его содержимого и реквизитов доступа. В заказе это снимок покупки; в деталях и списке VPS — последняя успешная установка.\n\nplatform, cpu_display_name и cpu_max_frequency_ghz описывают физический CPU текущей ноды VPS и могут быть null, если сведения не заполнены. После переноса следующие запросы списка/деталей отражают новую ноду. cpu_display_name передаётся как сохранённая строка модели и может содержать число физических ядер/потоков; выделенные ресурсы VPS определяются по cpu_cores. Максимальная частота — характеристика CPU, а не текущий замер или гарантированная частота каждого vCPU. Получайте эти поля из списка/деталей VPS, а не из события создания или результата операции.\n\nАдминистративная блокировка: admin_blocked_at и admin_block_reason возвращаются отдельно от status. Продление не снимает запрет и не запускает сервер. Ограничения и ошибки: [административная блокировка](./quick-start#административная-блокировка). Поля city, os_code и primary_ipv4 позволяют построить карточку без GET /vms/{vm_id}. Список читает сохранённое состояние из БД, не опрашивая Worker или Proxmox."
      }
    },
    "/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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Добавляет выбранное количество календарных месяцев к оплаченному сроку либо отсчитывает их от текущего времени, если оплата истекла. Используются текущие цены, наценка и скидка за срок. Продлить нужно до удаления услуги.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)\n\nАдминистративная блокировка: admin_blocked_at и admin_block_reason возвращаются отдельно от status. Продление не снимает запрет и не запускает сервер. Ограничения и ошибки: [административная блокировка](./quick-start#административная-блокировка)."
      }
    },
    "/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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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,
                "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Покупает один дополнительный IPv4 на months=1/3/6/12/24/36 календарных месяцев (по умолчанию 1) и назначает его VPS. Цена — фиксированная месячная ставка × months, без наценки интеграции и скидки за срок. Оплата и автопродление адреса независимы от 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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Создаёт одноразовую ссылку консоли со сроком expires_at. api_key_id передаётся в query; JSON-тела и Idempotency-Key нет. Ответ содержит Cache-Control: no-store.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)\n\nДля Windows ссылка открывает графический рабочий стол с поддержкой клавиатуры и мыши. Используйте эту графическую консоль, а не последовательный терминал. Это не ссылка RDP."
      }
    },
    "/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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Возвращает текущий период, квоту, расход и ограничение скорости. Счётчики в байтах и время относятся к последнему доступному замеру. Отсутствующий период или ограничение обозначается null.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/vms/{vm_id}/traffic/history": {
      "get": {
        "tags": [
          "VPS management"
        ],
        "summary": "История трафика",
        "operationId": "get-vm-traffic-history",
        "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/VmTrafficHistoryResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "vm_id": 101,
                    "days": [
                      {
                        "day": "2026-10-11",
                        "incoming_bytes": 1048576,
                        "outgoing_bytes": 2097152,
                        "estimated": false,
                        "updated_at": "2026-10-11T23:59:00Z"
                      },
                      {
                        "day": "2026-10-12",
                        "incoming_bytes": 524288,
                        "outgoing_bytes": 1048576,
                        "estimated": true,
                        "updated_at": "2026-10-12T01: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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Возвращает всю накопленную историю входящего и исходящего трафика VPS по дням UTC, от старых к новым, без пагинации. Значения указаны в байтах; квоту расходует исходящий трафик. История доступна владельцу и после удаления VPS. Если наблюдений ещё нет, days — пустой массив. Дни без наблюдений не добавляются, старый расход до начала сбора дневной истории не восстанавливается.\n\nПоле estimated=true означает, что расход интервала, пересёкшего полночь UTC, распределён между днями пропорционально времени. updated_at — время последнего обновления дня в UTC. Текущий день может быть неполным. Текущая квота и расход расчётного периода доступны отдельно в GET /vms/{vm_id}/traffic.\n\n[Правила запросов и ошибки](./quick-start) · [Вебхуки](./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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                },
                "examples": {
                  "admin_blocked": {
                    "value": {
                      "detail": {
                        "code": "vm_admin_blocked",
                        "message": "Сервер заблокирован администратором. Для разблокировки обратитесь в поддержку",
                        "reason": "AUP violation"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Сервис недоступен или результат не подтверждён; сохраните ключ повтора изменяющего запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "start запускает VPS; shutdown и reboot запрашивают штатное выключение/перезагрузку ОС. stop принудительно выключает питание, reset принудительно перезагружает; несохранённые данные могут быть потеряны.\n\nПередавайте уникальный Idempotency-Key для каждого действия. При потере ответа повторите тот же запрос с тем же ключом и параметрами; не создавайте новый ключ для той же покупки.\n\nHTTP 202 означает приём запроса, а не завершение. Сохраните order_id либо ID операции и проверяйте результат.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)\n\nАдминистративная блокировка: admin_blocked_at и admin_block_reason возвращаются отдельно от status. Продление не снимает запрет и не запускает сервер. Ограничения и ошибки: [административная блокировка](./quick-start#административная-блокировка)."
      }
    },
    "/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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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/IpRenewBody"
              },
              "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Продлевает отдельно оплачиваемый IPv4 на months=1/3/6/12/24/36 календарных месяцев от max(текущее время, paid_until). Если months не передан, используется последний оплаченный срок. Цена — актуальная месячная ставка × срок, без наценки и скидки. Выбранный срок используется и следующим автопродлением. Основной IPv4 и IPv6 отдельно не продлеваются. Возвращает HTTP 200, завершённый заказ и paid_until. Повторяйте тот же Idempotency-Key и параметры при потере ответа."
      }
    },
    "/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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Включает назначенные и сохранённые адреса. attachment=unattached выбирает сохранённые адреса с vm_id=null. Своя цена продления и автопродление есть только у отдельно оплачиваемых IPv4; у включённых основных IPv4 и IPv6 поля оплаты могут быть null. Цены фиксированные, без наценки.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      },
      "post": {
        "tags": [
          "IP addresses"
        ],
        "summary": "Аренда IPv4 без VPS",
        "operationId": "allocate-ip",
        "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/IpPurchaseRequest"
              },
              "example": {
                "api_key_id": 1,
                "api_user_id": "customer-123",
                "location_id": 4,
                "months": 3,
                "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": "4.5000",
                    "currency": "USD",
                    "vm_id": null,
                    "ip_id": null,
                    "paid_until": 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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Один IPv4 в выбранной локации, без VPS и выбора кластера. Срок 1/3/6/12/24/36 календарных месяцев (по умолчанию 1). Цена — фиксированная месячная ставка из GET /plans × months, без наценки и скидки. Адрес принадлежит api_user_id. auto_renew=false по умолчанию; при включении продление на последний оплаченный срок по актуальной цене.\n\nHTTP 202 принимает заказ ipv4_purchase и списывает сумму. Читайте GET /orders/{order_id}: при completed возвращаются ip_id и paid_until, vm_id=null. Адрес появляется в GET /ips?attachment=unattached; затем его можно назначить VPS того же клиента. При подтверждённом отсутствии адресов заказ refunded и сумма возвращается. События: order.completed и ip.allocated. При потере ответа повторяйте тот же Idempotency-Key и параметры. Срок начинается при принятии заказа."
      }
    },
    "/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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Оплаченные заказы отделены от операций VPS. Статусы: pending, processing, completed, failed, refunded, review. completed при покупке дедика означает резерв, а не выдачу. review — неопределённый или частичный результат, требующий выяснения; не создавайте повторную покупку. parameters содержит только публичные поля без паролей и себестоимости.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)\n\nПри нехватке ресурсов заказ остаётся processing и ждёт выдачи. Очередь и её отмена доступны по /orders/{order_id}/queue. После выдачи parameters.paid_until заказа обновляется фактическим сроком из результата создания; до выдачи дата предварительная.\n\nСнимок приложения для этой установки или null, если приложения нет. Содержит публичные поля каталога и installer_sha256 — контрольную сумму сохранённого установщика, без его содержимого и реквизитов доступа. В заказе это снимок покупки; в деталях и списке VPS — последняя успешная установка."
      }
    },
    "/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",
                    "backup_purchase",
                    "backup_renewal",
                    "backup_service_delete",
                    "backup_delete",
                    "backup_restore",
                    "backup_export",
                    "mail_purchase",
                    "mail_renewal",
                    "mail_upgrade",
                    "mail_delete"
                  ],
                  "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Оплаченные заказы отделены от операций VPS. Статусы: pending, processing, completed, failed, refunded, review. completed при покупке дедика означает резерв, а не выдачу. review — неопределённый или частичный результат, требующий выяснения; не создавайте повторную покупку. parameters содержит только публичные поля без паролей и себестоимости.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)\n\nСнимок приложения для этой установки или null, если приложения нет. Содержит публичные поля каталога и installer_sha256 — контрольную сумму сохранённого установщика, без его содержимого и реквизитов доступа. В заказе это снимок покупки; в деталях и списке VPS — последняя успешная установка."
      }
    },
    "/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",
                    "backup_purchase",
                    "backup_renewal",
                    "refund",
                    "adjustment",
                    "mail_purchase",
                    "mail_renewal",
                    "mail_upgrade"
                  ],
                  "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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)."
      }
    },
    "/vms/{vm_id}/terminal/link": {
      "post": {
        "tags": [
          "VPS management"
        ],
        "summary": "Ссылка на терминал",
        "operationId": "create-terminal-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/terminal/#token=example",
                    "expires_at": "2026-10-04T12:05: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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Создаёт одноразовую ссылку на браузерный терминал работающего VPS, действующую пять минут до первого использования. api_key_id передаётся в query; JSON-тело и Idempotency-Key не нужны. Ответ содержит Cache-Control: no-store. Открывайте полученный URL целиком: он даёт доступ к терминалу этой VPS.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)\n\nДля рабочего стола Windows используйте POST /vms/{vm_id}/console/link. Этот последовательный терминал не предоставляет рабочий стол Windows или RDP-подключение."
      }
    },
    "/dedicated/rentals/{rental_id}/status": {
      "get": {
        "tags": [
          "Dedicated servers"
        ],
        "summary": "Состояние выделенного сервера",
        "operationId": "get-rental-status",
        "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/RentalPowerStatusResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "rental_id": 201,
                    "power_state": "On",
                    "power_actions": [
                      "start",
                      "shutdown",
                      "stop",
                      "reset"
                    ],
                    "reinstall": 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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Возвращает power_state, доступные power_actions и признак поддержки reinstall. Управление доступно только для выданной, активной и оплаченной аренды на подготовленном сервере. Используйте список power_actions: не все серверы поддерживают пять команд, неподдержанная команда не заменяется принудительной перезагрузкой. On не подтверждает готовность ОС или приложений. Cache-Control: no-store.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/dedicated/rentals/{rental_id}/power": {
      "post": {
        "tags": [
          "Dedicated servers"
        ],
        "summary": "Питание выделенного сервера",
        "operationId": "change-rental-power",
        "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": "rental-action-20261004-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RentalPowerBody"
              },
              "example": {
                "api_key_id": 1,
                "action": "start"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RentalOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 301,
                    "rental_id": 201,
                    "action": "dedicated_power",
                    "status": "queued",
                    "created_at": "2026-10-04T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "result": null,
                    "requires_review": false,
                    "review_resolved_at": 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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Принимает start, shutdown, stop, reboot или reset. Сначала получите доступные power_actions в статусе аренды. shutdown/reboot запрашивают штатное завершение/перезапуск; stop/reset выполняются принудительно с риском потери несохранённых данных. Возвращается асинхронная операция, а не финансовый заказ; баланс интеграции не списывается. Новая команда доступна только активной оплаченной аренде с подключённым управлением.\n\nПередавайте Idempotency-Key для каждой новой команды. После потери ответа повторите прежний ключ и неизменное тело. HTTP 202 подтверждает приём; итог получите по операции или вебхуку.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/dedicated/rentals/{rental_id}/reinstall": {
      "post": {
        "tags": [
          "Dedicated servers"
        ],
        "summary": "Переустановка ОС выделенного сервера",
        "operationId": "reinstall-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": "rental-action-20261004-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RentalReinstallBody"
              },
              "example": {
                "api_key_id": 1,
                "os_id": 11,
                "confirmed": true
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RentalOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 301,
                    "rental_id": 201,
                    "action": "dedicated_reinstall",
                    "status": "queued",
                    "created_at": "2026-10-04T12:00:00Z",
                    "started_at": null,
                    "finished_at": null,
                    "result": null,
                    "requires_review": false,
                    "review_resolved_at": 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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Переустанавливает ОС с удалением данных на дисках сервера; обязательно confirmed: true. Передайте os_id из справочника ОС. Сервер должен поддерживать переустановку и выбранную ОС; hostname, логин, схема дисков, IP, владелец и оплаченный срок сохраняются. Если password и ssh_public_key отсутствуют, сохраняются текущие доступы. Если хотя бы одно поле передано, весь комплект доступов заменяется; отсутствующая часть не сохраняется. Можно передать пароль, публичный SSH-ключ или оба; пустой комплект отклоняется. cloud_init здесь не поддерживается. Команда не списывает баланс. После успеха получите актуальные доступы в деталях аренды; операции и вебхуки их не содержат.\n\nПередавайте Idempotency-Key для каждой новой команды. После потери ответа повторите прежний ключ и неизменное тело. HTTP 202 подтверждает приём; итог получите по операции или вебхуку.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/dedicated/rentals/{rental_id}/operations": {
      "get": {
        "tags": [
          "Dedicated servers"
        ],
        "summary": "История операций выделенного сервера",
        "operationId": "list-rental-operations",
        "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
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            },
            "description": "Максимальное количество записей на странице.",
            "example": 50
          },
          {
            "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/RentalOperationListResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 301,
                      "rental_id": 201,
                      "action": "dedicated_power",
                      "status": "queued",
                      "created_at": "2026-10-04T12:00:00Z",
                      "started_at": null,
                      "finished_at": null,
                      "result": null,
                      "requires_review": false,
                      "review_resolved_at": 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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Список операций питания и переустановки этой аренды, в том числе после её завершения. Сначала новые; total_count — количество до пагинации. Выполняющаяся операция или неразрешённый requires_review блокирует новую команду. review_resolved_at указывает на завершённую администратором проверку и не изменяет исторический результат failed.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/dedicated/rentals/{rental_id}/operations/{operation_id}": {
      "get": {
        "tags": [
          "Dedicated servers"
        ],
        "summary": "Операция выделенного сервера",
        "operationId": "get-rental-operation",
        "parameters": [
          {
            "name": "rental_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Rental Id"
            },
            "description": "Параметр rental_id.",
            "example": 201
          },
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Operation Id"
            },
            "description": "Параметр operation_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
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RentalOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 301,
                    "rental_id": 201,
                    "action": "dedicated_power",
                    "status": "succeeded",
                    "created_at": "2026-10-04T12:00:00Z",
                    "started_at": "2026-10-04T12:00:01Z",
                    "finished_at": "2026-10-04T12:00:05Z",
                    "result": {
                      "power_state": "On",
                      "changed": true,
                      "power_action": "start"
                    },
                    "requires_review": false,
                    "review_resolved_at": 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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Возвращает операцию только для указанной аренды и интеграции. Статусы: queued, running, succeeded, failed, cancelled. Результат успешного питания содержит power_state, changed и необязательный power_action; переустановки — os и verified. verified подтверждает проверки установки, а не работу приложений клиента. Ошибка содержит публичный код и requires_review. При requires_review=true и review_resolved_at=null обратитесь в поддержку перед новой командой; повтор того же Idempotency-Key возвращает прежнюю операцию.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow) · [Вебхуки](./webhooks)"
      }
    },
    "/monitoring/locations/uptime": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "summary": "Аптайм локаций",
        "operationId": "list-locations-uptime",
        "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": "days",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/UptimeDays",
              "default": 30
            },
            "description": "Период в днях: 1, 14, 30 или 90. По умолчанию 30.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationsUptimeResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "days": 1,
                    "locations": [
                      {
                        "location_id": 1,
                        "location_name": "US — Fremont",
                        "uptime_percent": 99.8,
                        "coverage_percent": 100
                      },
                      {
                        "location_id": 3,
                        "location_name": "PL — Gdańsk",
                        "uptime_percent": null,
                        "coverage_percent": 0
                      }
                    ]
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Возвращает краткий аптайм активных локаций, участвующих в мониторинге серверов для VPS. Для графика выбранной локации используйте GET /monitoring/locations/{location_id}/uptime.\n\nПериоды: 1/14/30/90 дней, по умолчанию 30. uptime_percent — средний аптайм наблюдаемых нод локации, а не гарантия доступности каждой VPS. coverage_percent показывает полноту наблюдений. Без наблюдений uptime_percent=null; отсутствие данных не означает ни 100% аптайма, ни подтверждённый простой. Обслуживание и ошибки монитора не считаются подтверждённым простоем.\n\nДля 1 дня точки почасовые, для остальных периодов — дневные UTC. Окно скользящее, крайние интервалы обрезаны: за сутки может быть 25 точек, за 30 дней — 31. Время передаётся строками ISO 8601 в UTC. Идентификаторы, имена и внутренние параметры нод не возвращаются.\n\n[Правила запросов и ошибки](./quick-start)"
      }
    },
    "/monitoring/locations/{location_id}/uptime": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "summary": "Аптайм локации",
        "operationId": "get-location-uptime",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Location Id"
            },
            "description": "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": "days",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/UptimeDays",
              "default": 30
            },
            "description": "Период в днях: 1, 14, 30 или 90. По умолчанию 30.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationUptimeResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "location_id": 1,
                    "location_name": "US — Fremont",
                    "uptime_percent": 99.8,
                    "coverage_percent": 100,
                    "days": 1,
                    "from": "2026-10-11T00:00:00Z",
                    "to": "2026-10-12T00:00:00Z",
                    "points": [
                      {
                        "from": "2026-10-11T00:00:00Z",
                        "to": "2026-10-11T01:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T01:00:00Z",
                        "to": "2026-10-11T02:00:00Z",
                        "uptime_percent": 95.2,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T02:00:00Z",
                        "to": "2026-10-11T03:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T03:00:00Z",
                        "to": "2026-10-11T04:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T04:00:00Z",
                        "to": "2026-10-11T05:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T05:00:00Z",
                        "to": "2026-10-11T06:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T06:00:00Z",
                        "to": "2026-10-11T07:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T07:00:00Z",
                        "to": "2026-10-11T08:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T08:00:00Z",
                        "to": "2026-10-11T09:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T09:00:00Z",
                        "to": "2026-10-11T10:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T10:00:00Z",
                        "to": "2026-10-11T11:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T11:00:00Z",
                        "to": "2026-10-11T12:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T12:00:00Z",
                        "to": "2026-10-11T13:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T13:00:00Z",
                        "to": "2026-10-11T14:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T14:00:00Z",
                        "to": "2026-10-11T15:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T15:00:00Z",
                        "to": "2026-10-11T16:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T16:00:00Z",
                        "to": "2026-10-11T17:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T17:00:00Z",
                        "to": "2026-10-11T18:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T18:00:00Z",
                        "to": "2026-10-11T19:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T19:00:00Z",
                        "to": "2026-10-11T20:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T20:00:00Z",
                        "to": "2026-10-11T21:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T21:00:00Z",
                        "to": "2026-10-11T22:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T22:00:00Z",
                        "to": "2026-10-11T23:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T23:00:00Z",
                        "to": "2026-10-12T00:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      }
                    ]
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Мониторинг временно недоступен.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Возвращает подробный аптайм выбранной локации и points с графиком по времени. Локация, отсутствующая в сводке мониторинга, возвращает 404.\n\nПериоды: 1/14/30/90 дней, по умолчанию 30. uptime_percent — средний аптайм наблюдаемых нод локации, а не гарантия доступности каждой VPS. coverage_percent показывает полноту наблюдений. Без наблюдений uptime_percent=null; отсутствие данных не означает ни 100% аптайма, ни подтверждённый простой. Обслуживание и ошибки монитора не считаются подтверждённым простоем.\n\nДля 1 дня точки почасовые, для остальных периодов — дневные UTC. Окно скользящее, крайние интервалы обрезаны: за сутки может быть 25 точек, за 30 дней — 31. Время передаётся строками ISO 8601 в UTC. Идентификаторы, имена и внутренние параметры нод не возвращаются.\n\n[Правила запросов и ошибки](./quick-start)"
      }
    },
    "/vms/queue": {
      "get": {
        "tags": [
          "VPS billing"
        ],
        "summary": "Размер очереди VPS",
        "operationId": "get-vm-queue-count",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "example": 1,
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          {
            "name": "platform",
            "in": "query",
            "required": true,
            "schema": {
              "enum": [
                "epyc",
                "ryzen",
                "xeon"
              ],
              "type": "string",
              "title": "Platform"
            },
            "example": "epyc"
          },
          {
            "name": "location_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Location Id"
            },
            "example": 3
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmQueueCountResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "location_id": 3,
                    "platform": "epyc",
                    "waiting": 4
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Возвращает общее количество ожидающих покупок VPS в локации и на платформе для всех покупателей, включая ботов. Данные чужих заказов не раскрываются. Количество может кешироваться до пяти секунд. Это не гарантия наличия ресурсов и не оценка времени выдачи."
      }
    },
    "/orders/{order_id}/queue": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Очередь заказа",
        "operationId": "get-order-queue",
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Order Id"
            },
            "example": 42
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "example": 1,
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderQueueResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 42,
                    "operation_id": 501,
                    "status": "queued",
                    "location_id": 3,
                    "platform": "epyc",
                    "waiting": 4,
                    "position": 2,
                    "reason": "node_unavailable",
                    "can_cancel": true,
                    "created_at": "2026-10-12T08: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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Возвращает очередь создания VPS, купленного этой интеграцией. Передавайте order_id Cloud API, а не operation_id. status — состояние операции выдачи: queued, running, succeeded, failed или cancelled; оно отличается от финансового статуса заказа. position — место среди ожидающих в локации/на платформе либо null вне очереди. waiting — общее количество ожидающих для всех покупателей. Числа могут отставать до пяти секунд; при размещении могут пропускаться заказы, которым не хватает текущих ресурсов. can_cancel=true означает возможность отмены на момент чтения, без её резервирования. reason: node_busy, node_unavailable, ip_pool_exhausted, network_pool_empty либо null. Пока заказ не передан на выдачу, возвращается 409 queue_not_ready: проверяйте GET /orders/{order_id} и повторяйте запрос, пока заказ pending или processing. Для других типов заказов — 409 not_vm_purchase."
      },
      "delete": {
        "tags": [
          "Orders"
        ],
        "summary": "Отмена очереди VPS",
        "operationId": "cancel-order-queue",
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Order Id"
            },
            "example": 42
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            },
            "example": 1,
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "guest_initialization": null,
                    "order_id": 42,
                    "status": "refunded",
                    "amount_usd": "10.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "error_code": "creation_cancelled",
                    "error_message": "Создание сервера отменено до выдачи, оплата возвращена"
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Отменяет ожидающую покупку VPS до резервирования ресурсов и начала выдачи. Передавайте order_id Cloud API. Тела запроса нет; api_key_id передаётся в query. Idempotency-Key не нужен: повтор DELETE того же отменённого заказа возвращает заказ с возвратом, не начисляя деньги повторно. HTTP 200 подтверждает отмену и возврат исходной списанной суммы на баланс интеграции. Бесплатная административная выдача остаётся бесплатной. Финансовый статус заказа — refunded, error_code=creation_cancelled; статус операции выдачи — cancelled. Отправляются вебхуки order.refunded и vm.creation_cancelled. Если выдача уже началась, возвращается 409 queue_cancel_unavailable без возврата. До передачи на выдачу — 409 queue_not_ready; для других типов заказов — 409 not_vm_purchase. Ответ 503 не означает, что отмена не произошла: проверьте заказ и повторите тот же DELETE. Маршрут не удаляет выданный VPS и не отменяет аренду дедика."
      }
    },
    "/vms/{vm_id}/node/uptime": {
      "get": {
        "tags": [
          "VPS management"
        ],
        "summary": "Доступность ноды VPS",
        "operationId": "get-vm-node-uptime",
        "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": "days",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/UptimeDays",
              "default": 30
            },
            "description": "Период в днях: 1, 14, 30 или 90. По умолчанию 30.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmNodeUptimeResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "uptime_percent": 99.8,
                    "coverage_percent": 100,
                    "days": 1,
                    "from": "2026-10-11T00:00:00Z",
                    "to": "2026-10-12T00:00:00Z",
                    "points": [
                      {
                        "from": "2026-10-11T00:00:00Z",
                        "to": "2026-10-11T01:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T01:00:00Z",
                        "to": "2026-10-11T02:00:00Z",
                        "uptime_percent": 95.2,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T02:00:00Z",
                        "to": "2026-10-11T03:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T03:00:00Z",
                        "to": "2026-10-11T04:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T04:00:00Z",
                        "to": "2026-10-11T05:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T05:00:00Z",
                        "to": "2026-10-11T06:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T06:00:00Z",
                        "to": "2026-10-11T07:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T07:00:00Z",
                        "to": "2026-10-11T08:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T08:00:00Z",
                        "to": "2026-10-11T09:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T09:00:00Z",
                        "to": "2026-10-11T10:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T10:00:00Z",
                        "to": "2026-10-11T11:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T11:00:00Z",
                        "to": "2026-10-11T12:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T12:00:00Z",
                        "to": "2026-10-11T13:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T13:00:00Z",
                        "to": "2026-10-11T14:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T14:00:00Z",
                        "to": "2026-10-11T15:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T15:00:00Z",
                        "to": "2026-10-11T16:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T16:00:00Z",
                        "to": "2026-10-11T17:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T17:00:00Z",
                        "to": "2026-10-11T18:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T18:00:00Z",
                        "to": "2026-10-11T19:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T19:00:00Z",
                        "to": "2026-10-11T20:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T20:00:00Z",
                        "to": "2026-10-11T21:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T21:00:00Z",
                        "to": "2026-10-11T22:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T22:00:00Z",
                        "to": "2026-10-11T23:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      },
                      {
                        "from": "2026-10-11T23:00:00Z",
                        "to": "2026-10-12T00:00:00Z",
                        "uptime_percent": 100,
                        "coverage_percent": 100
                      }
                    ],
                    "vm_id": 101
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Мониторинг временно недоступен.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Доступность текущей ноды выбранной VPS. Проверяется принадлежность VPS интеграции; ID и имя ноды не публикуются. Это аптайм инфраструктуры, не время работы гостевой ОС. После переноса VPS ответ относится к новой ноде.\n\nПериоды: 1/14/30/90 дней, по умолчанию 30. uptime_percent — доля доступности по наблюдениям; coverage_percent — покрытие измерениями. При отсутствии данных uptime_percent=null. Для 1 дня точки почасовые, для остальных периодов — по дням UTC; крайние интервалы неполные. Даты передаются в ISO 8601 UTC.\n\n[Правила запросов и ошибки](./quick-start)"
      }
    },
    "/vms/{vm_id}/backup-estimate": {
      "get": {
        "tags": [
          "Backups"
        ],
        "summary": "Оценка размера бекапа",
        "operationId": "estimate-backup",
        "parameters": [
          {
            "name": "vm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Vm Id"
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupEstimateResponse"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Возвращает выделенный объём дисков и, если доступно, занятое место внутри гостя. stored_size_bytes равен null: точный оплачиваемый размер известен только после создания копии. Запрос не создаёт бекап и не списывает деньги."
      }
    },
    "/backup-services": {
      "post": {
        "tags": [
          "Backups"
        ],
        "summary": "Создание услуги бекапов",
        "operationId": "create-backup-service",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackupCreateBody"
              },
              "example": {
                "api_key_id": 1,
                "vm_id": 101,
                "kind": "automatic",
                "auto_renew": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "1.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "backup_service_id": null,
                    "backup_id": null,
                    "worker_operation_id": null,
                    "guest_initialization": null,
                    "application": 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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Создаёт отдельную услугу автоматического или ручного хранения для существующей VPS. auto_renew по умолчанию false. Автоматическая услуга: первая копия при подключении, далее ежедневно, хранятся последние 7 успешных копий. Одна ручная услуга хранит одну копию. Срок — один календарный месяц; итоговый paid_until определяется при активации услуги. Автоматические бекапы оплачиваются заранее по цене тарифа из GET /plans; при неуспешном создании оплата возвращается. Ручные оплачиваются после создания: stored_size_bytes / 1073741824 × ставка на момент заказа, округление до 4 знаков USD. Пока ручная копия создаётся, amount_usd=0.0000 не означает бесплатную услугу. Если денег недостаточно, копия удаляется; разрешённый отрицательный баланс учитывается. Копии недоступны до подтверждения первой оплаты. Без наценки интеграции, коэффициента CPU и скидки за срок.\n\nПередайте Idempotency-Key. HTTP 202 возвращает order_id; проверяйте GET /orders/{order_id}. Это принятие запроса, а не завершение. После отправки появляется worker_operation_id. Бесплатные действия также записываются как заказы с нулевой суммой."
      },
      "get": {
        "tags": [
          "Backups"
        ],
        "summary": "Список услуг бекапов",
        "operationId": "list-backup-services",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            }
          },
          {
            "name": "api_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "title": "Api User Id"
            }
          },
          {
            "name": "vm_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "title": "Vm Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 25,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupServicesResponse"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Список неудалённых услуг интеграции, включая услуги после удаления исходной VPS. Необязательные фильтры api_user_id и vm_id; total_count — число услуг по фильтрам. Статус услуги относится к хранению; оплату проверяйте по заказу покупки."
      }
    },
    "/backup-services/{service_id}": {
      "get": {
        "tags": [
          "Backups"
        ],
        "summary": "Детали услуги бекапов",
        "operationId": "get-backup-service",
        "parameters": [
          {
            "name": "service_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Service Id"
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupServiceResponse"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Возвращает владельца, тип, статус хранения, auto_renew и paid_until. Услуга сохраняется после удаления исходной VPS. После окончания оплаты есть 24 часа на продление или восстановление до удаления. Первую оплату проверяйте по заказу покупки."
      },
      "patch": {
        "tags": [
          "Backups"
        ],
        "summary": "Автопродление бекапов",
        "operationId": "set-backup-auto-renew",
        "parameters": [
          {
            "name": "service_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Service Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackupAutoRenewBody"
              },
              "example": {
                "api_key_id": 1,
                "auto_renew": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupServiceResponse"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Включает или выключает продление с баланса интеграции. Текущий оплаченный срок не меняется, возврата нет. Попытка автопродления выполняется по предупреждению за 24 часа до окончания оплаты и повторно за час до удаления, если услуга ещё не продлена. Уже принятый заказ продления продолжает выполняться после отключения автопродления."
      },
      "delete": {
        "tags": [
          "Backups"
        ],
        "summary": "Удаление услуги бекапов",
        "operationId": "delete-backup-service",
        "parameters": [
          {
            "name": "service_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Service Id"
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "0.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "backup_service_id": 51,
                    "backup_id": null,
                    "worker_operation_id": null,
                    "guest_initialization": null,
                    "application": 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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Удаляет услугу и все её копии. Удаление асинхронное и необратимое. Неиспользованный оплаченный срок не возвращается. Ручную копию удаляйте этим маршрутом вместе с услугой.\n\nПередайте Idempotency-Key. HTTP 202 возвращает order_id; проверяйте GET /orders/{order_id}. Это принятие запроса, а не завершение. После отправки появляется worker_operation_id. Бесплатные действия также записываются как заказы с нулевой суммой."
      }
    },
    "/backup-services/{service_id}/renew": {
      "post": {
        "tags": [
          "Backups"
        ],
        "summary": "Продление услуги бекапов",
        "operationId": "renew-backup-service",
        "parameters": [
          {
            "name": "service_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Service Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackupPaymentBody"
              },
              "example": {
                "api_key_id": 1
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "1.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "backup_service_id": 51,
                    "backup_id": null,
                    "worker_operation_id": null,
                    "guest_initialization": null,
                    "application": 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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Продлевает paid_until на один календарный месяц от max(текущий paid_until, сейчас), по актуальным ценам без наценки и скидок. Для ручной копии используется измеренный размер. Для автоматических бекапов — текущий тариф VPS; после удаления VPS — последний сохранённый тариф услуги. Списание и заказ фиксируются вместе. При отклонении продления оплата возвращается. Доступно до начала удаления в пределах 24 часов после окончания оплаты.\n\nПередайте Idempotency-Key. HTTP 202 возвращает order_id; проверяйте GET /orders/{order_id}. Это принятие запроса, а не завершение. После отправки появляется worker_operation_id. Бесплатные действия также записываются как заказы с нулевой суммой."
      }
    },
    "/backup-services/{service_id}/backups": {
      "get": {
        "tags": [
          "Backups"
        ],
        "summary": "Список копий",
        "operationId": "list-backups",
        "parameters": [
          {
            "name": "service_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Service Id"
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 25,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupsResponse"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Неудалённые копии оплаченной услуги, сначала новые. Доступны только после подтверждения первой оплаты. total_count — число подходящих копий. Размер хранения бекапа (stored_size_bytes) и размер ZIP для скачивания (size_bytes экспорта) — разные величины. Экспорт собирается отдельно из восстановленного образа диска и сжимается заново, поэтому архив может быть больше или меньше. Само по себе различие размеров не означает повреждение бекапа."
      }
    },
    "/backups/{backup_id}": {
      "get": {
        "tags": [
          "Backups"
        ],
        "summary": "Детали копии",
        "operationId": "get-backup",
        "parameters": [
          {
            "name": "backup_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Backup Id"
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupResponse"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Статус копии, измеренные размеры и публичная конфигурация VPS. Ключи шифрования, реквизиты инфраструктуры и сохранённые пароли не возвращаются. Размер хранения бекапа (stored_size_bytes) и размер ZIP для скачивания (size_bytes экспорта) — разные величины. Экспорт собирается отдельно из восстановленного образа диска и сжимается заново, поэтому архив может быть больше или меньше. Само по себе различие размеров не означает повреждение бекапа."
      },
      "delete": {
        "tags": [
          "Backups"
        ],
        "summary": "Удаление копии",
        "operationId": "delete-backup",
        "parameters": [
          {
            "name": "backup_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Backup Id"
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "0.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "backup_service_id": 51,
                    "backup_id": null,
                    "worker_operation_id": null,
                    "guest_initialization": null,
                    "application": 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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Удаляет одну автоматическую копию; услуга автоматических бекапов остаётся включённой. Для ручной копии удалите услугу. Занятая копия может быть недоступна для удаления.\n\nПередайте Idempotency-Key. HTTP 202 возвращает order_id; проверяйте GET /orders/{order_id}. Это принятие запроса, а не завершение. После отправки появляется worker_operation_id. Бесплатные действия также записываются как заказы с нулевой суммой."
      }
    },
    "/backups/{backup_id}/restore": {
      "post": {
        "tags": [
          "Backups"
        ],
        "summary": "Восстановление исходной VPS",
        "operationId": "restore-backup",
        "parameters": [
          {
            "name": "backup_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Backup Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackupRestoreInput"
              },
              "example": {
                "api_key_id": 1,
                "vm_id": 101
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "0.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "backup_service_id": 51,
                    "backup_id": null,
                    "worker_operation_id": null,
                    "guest_initialization": null,
                    "application": 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"
                }
              }
            }
          },
          "429": {
            "description": "Лимит операций за 24 часа исчерпан",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "detail": {
                    "code": "backup_limit_reached",
                    "message": "Достигнут лимит операций бекапов за 24 часа"
                  }
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Восстанавливает диски исходной VPS; vm_id должен указывать на неё. Текущее содержимое дисков перезаписывается. Доступы и программы берутся из копии. Отдельной платы нет. Лимит — 3 принятых восстановления на услугу за скользящие 24 часа, общий с созданием новой VPS из её копий. Ожидающие и неуспешные попытки учитываются; повтор с тем же Idempotency-Key повторно лимит не расходует. При превышении — HTTP 429 backup_limit_reached.\n\nПередайте Idempotency-Key. HTTP 202 возвращает order_id; проверяйте GET /orders/{order_id}. Это принятие запроса, а не завершение. После отправки появляется worker_operation_id. Бесплатные действия также записываются как заказы с нулевой суммой.\n\nАдминистративная блокировка: admin_blocked_at и admin_block_reason возвращаются отдельно от status. Продление не снимает запрет и не запускает сервер. Ограничения и ошибки: [административная блокировка](./quick-start#административная-блокировка)."
      }
    },
    "/backups/{backup_id}/exports": {
      "post": {
        "tags": [
          "Backups"
        ],
        "summary": "Подготовка скачивания бекапа",
        "operationId": "export-backup",
        "parameters": [
          {
            "name": "backup_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Backup Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRequest"
              },
              "example": {
                "api_key_id": 1
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "0.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "backup_service_id": 51,
                    "backup_id": null,
                    "worker_operation_id": null,
                    "guest_initialization": null,
                    "application": 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"
                }
              }
            }
          },
          "429": {
            "description": "Лимит операций за 24 часа исчерпан",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "detail": {
                    "code": "backup_limit_reached",
                    "message": "Достигнут лимит операций бекапов за 24 часа"
                  }
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Готовит ZIP64-архив с raw-дисками и конфигурацией. Отдельной платы нет. Лимит — одна принятая подготовка на копию за скользящие 24 часа, включая ожидающие и неуспешные попытки. Повтор с тем же ключом не расходует лимит повторно. По worker_operation_id заказа можно получить статус экспорта и ссылку. Готовый архив хранится 24 часа после завершения.\n\nПередайте Idempotency-Key. HTTP 202 возвращает order_id; проверяйте GET /orders/{order_id}. Это принятие запроса, а не завершение. После отправки появляется worker_operation_id. Бесплатные действия также записываются как заказы с нулевой суммой. Размер хранения бекапа (stored_size_bytes) и размер ZIP для скачивания (size_bytes экспорта) — разные величины. Экспорт собирается отдельно из восстановленного образа диска и сжимается заново, поэтому архив может быть больше или меньше. Само по себе различие размеров не означает повреждение бекапа."
      }
    },
    "/backup-exports/{operation_id}": {
      "get": {
        "tags": [
          "Backups"
        ],
        "summary": "Статус экспорта бекапа",
        "operationId": "get-backup-export",
        "parameters": [
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Operation Id"
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupExportResponse"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Статус по worker_operation_id из заказа экспорта. ready — файл готов, expired — срок хранения закончился. Подписанная ссылка здесь не возвращается. Размер хранения бекапа (stored_size_bytes) и размер ZIP для скачивания (size_bytes экспорта) — разные величины. Экспорт собирается отдельно из восстановленного образа диска и сжимается заново, поэтому архив может быть больше или меньше. Само по себе различие размеров не означает повреждение бекапа."
      }
    },
    "/backup-exports/{operation_id}/download": {
      "get": {
        "tags": [
          "Backups"
        ],
        "summary": "Ссылка скачивания бекапа",
        "operationId": "download-backup-export",
        "parameters": [
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Operation Id"
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupExportResponse"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Временная ссылка на готовый архив действует не более часа и не дольше срока хранения архива. Повторная выдача ссылки не расходует лимит подготовки и не продлевает 24 часа хранения. Лимит не ограничивает число скачиваний готового файла. Ссылку следует хранить как секрет. Cache-Control: no-store. Размер хранения бекапа (stored_size_bytes) и размер ZIP для скачивания (size_bytes экспорта) — разные величины. Экспорт собирается отдельно из восстановленного образа диска и сжимается заново, поэтому архив может быть больше или меньше. Само по себе различие размеров не означает повреждение бекапа."
      }
    },
    "/backup-operations/{operation_id}": {
      "get": {
        "tags": [
          "Backups"
        ],
        "summary": "Статус операции бекапа",
        "operationId": "get-backup-operation",
        "parameters": [
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Operation Id"
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Api Key Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupOperationResponse"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "operation_id — worker_operation_id из заказа; также подходит ID из вебхука бекапа. Здесь показано выполнение воркером, оплату отдельно подтверждает заказ. Внутренние запросы и исходные ошибки инфраструктуры не возвращаются."
      }
    },
    "/backup-services/quote": {
      "post": {
        "tags": [
          "Backups"
        ],
        "summary": "Рассчитать подключение бекапов",
        "operationId": "quote-backup-service",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackupCreateBody"
              },
              "example": {
                "api_key_id": 1,
                "vm_id": 101,
                "kind": "automatic",
                "auto_renew": false
              }
            }
          }
        },
        "responses": {
          "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"
                }
              }
            }
          },
          "200": {
            "description": "Расчёт стоимости",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupQuoteResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "amount_usd": "1.0000",
                    "balance_usd": "100.0000",
                    "currency": "USD",
                    "months": 1,
                    "kind": "automatic",
                    "manual_gb_month_price_usd": null,
                    "exact_size_available_after_backup": false
                  }
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Расчёт без заказа и списания. Idempotency-Key не требуется. Автоматические бекапы рассчитываются по текущему тарифу; ручное продление — по измеренному размеру. При создании ручной копии amount_usd=0.0000, exact_size_available_after_backup=true: это ещё не итоговая стоимость, передаётся ставка manual_gb_month_price_usd за GiB в месяц. При оплате можно передать expected_amount_usd и expected_manual_rate_usd; при изменении цены — 409 price_changed."
      }
    },
    "/backup-services/{service_id}/renew/quote": {
      "post": {
        "tags": [
          "Backups"
        ],
        "summary": "Рассчитать продление бекапов",
        "operationId": "quote-backup-renewal",
        "parameters": [
          {
            "name": "service_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 9223372036854775807,
              "minimum": 1,
              "title": "Service Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackupPaymentBody"
              },
              "example": {
                "api_key_id": 1
              }
            }
          }
        },
        "responses": {
          "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"
                }
              }
            }
          },
          "200": {
            "description": "Расчёт стоимости",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupQuoteResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "amount_usd": "1.0000",
                    "balance_usd": "100.0000",
                    "currency": "USD",
                    "months": 1,
                    "kind": "automatic",
                    "manual_gb_month_price_usd": null,
                    "exact_size_available_after_backup": false
                  }
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Расчёт без заказа и списания. Idempotency-Key не требуется. Автоматические бекапы рассчитываются по текущему тарифу; ручное продление — по измеренному размеру. При создании ручной копии amount_usd=0.0000, exact_size_available_after_backup=true: это ещё не итоговая стоимость, передаётся ставка manual_gb_month_price_usd за GiB в месяц. При оплате можно передать expected_amount_usd и expected_manual_rate_usd; при изменении цены — 409 price_changed."
      }
    },
    "/ips/quote": {
      "post": {
        "tags": [
          "IP addresses"
        ],
        "summary": "Расчёт аренды IPv4 без VPS",
        "operationId": "quote-standalone-ip",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IpPurchaseRequest"
              },
              "example": {
                "api_key_id": 1,
                "api_user_id": "customer-123",
                "location_id": 4,
                "months": 3,
                "auto_renew": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IpPurchaseQuoteResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "amount_usd": "4.5000",
                    "balance_usd": "100.0000",
                    "currency": "USD",
                    "location_id": 4,
                    "months": 3,
                    "monthly_price_usd": "1.5000"
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Один IPv4 в выбранной локации, без VPS и выбора кластера. Срок 1/3/6/12/24/36 календарных месяцев (по умолчанию 1). Цена — фиксированная месячная ставка из GET /plans × months, без наценки и скидки. Адрес принадлежит api_user_id. auto_renew=false по умолчанию; при включении продление на последний оплаченный срок по актуальной цене.\n\nРасчёт не выделяет адрес и не списывает баланс; доступен при нехватке средств. Передайте amount_usd как expected_amount_usd при покупке."
      }
    },
    "/alerts": {
      "get": {
        "tags": [
          "Alerts"
        ],
        "summary": "Алерты",
        "operationId": "list-alerts",
        "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/AlertsResponse"
                },
                "example": {
                  "success": true,
                  "alerts": [
                    {
                      "id": 1,
                      "text_ru": "🇵🇱 Польша: добавлены мощности VPS на AMD Ryzen 9 9950X3D.",
                      "text_en": "🇵🇱 Poland: VPS capacity added on AMD Ryzen 9 9950X3D.",
                      "created_at": "2026-10-18T10:00:00Z",
                      "starts_at": null,
                      "ends_at": null,
                      "locations": [
                        {
                          "location_id": 1,
                          "location_name": "Poland",
                          "country_code": "PL"
                        }
                      ]
                    },
                    {
                      "id": 2,
                      "text_ru": "Плановое обновление нод с перезагрузкой серверов.",
                      "text_en": "Scheduled node maintenance with server restarts.",
                      "created_at": "2026-10-18T09:00:00Z",
                      "starts_at": "2026-10-19T02:00:00Z",
                      "ends_at": "2026-10-19T03:00:00Z",
                      "locations": [
                        {
                          "location_id": 1,
                          "location_name": "Poland",
                          "country_code": "PL"
                        },
                        {
                          "location_id": 2,
                          "location_name": "Germany",
                          "country_code": "DE"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Общие объявления и плановые работы Cloud. Возвращаются только включённые алерты, от новых к старым по created_at и id. Оба текста возвращаются в одном ответе. created_at — дата создания; starts_at и ends_at — необязательные даты события в UTC (ISO 8601). Будущие события видны сразу. Прошедшие события остаются в списке, пока алерт включён. При отсутствии алертов возвращается пустой массив alerts.\n\nЛокации, к которым относится алерт, в порядке location_id. Пустой массив означает отсутствие привязки. Список фиксируется при сохранении: добавленные позже локации не включаются автоматически. Названия и коды стран сохранены для этого алерта и не меняются при переименовании локаций."
      }
    },
    "/mail/mailboxes": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Почтовые ящики",
        "operationId": "list-mailboxes",
        "description": "Список ящиков интеграции без удалённых, начиная с новых. api_user_id — необязательный точный фильтр клиента. total_count — количество по фильтру до пагинации. Лимиты отправки и расход включены в этот же ответ.\n\nЛимиты отправки не зависят от объёма: 1000 получателей за последние 24 часа или 5000 при outbound_high_limit=true; 30 сообщений за последние 60 секунд; 50 получателей одного письма суммарно в To/Cc/Bcc. SMTP и API используют общие счётчики. Расход учитывает допущенные попытки отправки, а не подтверждённую доставку. remaining=max(0, limit-used). Если расход нельзя получить, возвращается 503, а не нулевой расход.",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            },
            "description": "ID интеграции, соответствующий X-Api-Key.",
            "example": 1
          },
          {
            "name": "api_user_id",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "Ваш постоянный идентификатор клиента внутри интеграции."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailMailboxesResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 5,
                      "account_id": 12,
                      "domain_id": 8,
                      "email": "team@example.com",
                      "name": "Team",
                      "status": "active",
                      "enabled": true,
                      "access_allowed": true,
                      "quota_mb": 10240,
                      "used_bytes": 1048576,
                      "file_quota_bytes": 10737418240,
                      "file_used_bytes": 0,
                      "signature": "",
                      "ready_at": "2026-10-18T12:00:00Z",
                      "paid_until": "2026-11-18T12:00:00Z",
                      "delete_after": "2026-11-19T12:00:00Z",
                      "created_at": "2026-10-18T11:59:30Z",
                      "updated_at": "2026-10-18T12:00:00Z",
                      "api_user_id": "customer-42",
                      "auto_renew": false,
                      "outbound_high_limit": false,
                      "outbound_daily_recipient_limit": 1000,
                      "outbound_daily_recipients_used": 120,
                      "outbound_daily_recipients_remaining": 880,
                      "outbound_messages_per_minute": 30,
                      "outbound_minute_messages_used": 2,
                      "outbound_minute_messages_remaining": 28,
                      "outbound_recipients_per_message": 50,
                      "storage_shared": true
                    }
                  ],
                  "total_count": 1
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Купить почтовый ящик",
        "operationId": "purchase-mailbox",
        "description": "Покупает ящик на один календарный месяц за баланс интеграции по цене каталога. api_user_id определяется аккаунтом account_id; domain_id должен быть активен и доступен аккаунту. Адрес формируется как local_part@домен. Используйте цену тарифа: отдельного расчёта покупки нет. Оплаченный срок начинается после завершения создания. HTTP 202 означает принятие заказа; проверяйте GET /orders/{order_id} до completed, затем получите ящик по mailbox_id. По умолчанию auto_renew=false.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128,
              "pattern": "^[!-~]+$"
            },
            "example": "mail-order-20261019-001",
            "description": "Уникальный ключ команды. После таймаута повторяйте ту же команду с тем же ключом. Ключ заказа с другими параметрами возвращает 409."
          }
        ],
        "responses": {
          "202": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "1.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "mailbox_id": null,
                    "mail_operation_id": null,
                    "paid_until": null,
                    "error_code": null,
                    "error_message": null
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailPurchase"
              },
              "example": {
                "api_key_id": 1,
                "account_id": 12,
                "domain_id": 8,
                "local_part": "team",
                "name": "Team",
                "password": "ExamplePassword42!",
                "plan_code": "mail-10",
                "auto_renew": false,
                "expected_amount_usd": "1.0000"
              }
            }
          }
        }
      }
    },
    "/mail/mailboxes/{mailbox_id}": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Детали почтового ящика",
        "operationId": "get-mailbox",
        "description": "Возвращает ящик, расход хранилища, доступ, оплаченный срок, настройку автопродления, лимиты отправки и расход. Все даты в UTC. paid_until=null означает, что оплаченный период ещё не подтверждён.\n\nЛимиты отправки не зависят от объёма: 1000 получателей за последние 24 часа или 5000 при outbound_high_limit=true; 30 сообщений за последние 60 секунд; 50 получателей одного письма суммарно в To/Cc/Bcc. SMTP и API используют общие счётчики. Расход учитывает допущенные попытки отправки, а не подтверждённую доставку. remaining=max(0, limit-used). Если расход нельзя получить, возвращается 503, а не нулевой расход.",
        "parameters": [
          {
            "name": "mailbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            },
            "description": "ID интеграции, соответствующий X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailMailboxResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 5,
                    "account_id": 12,
                    "domain_id": 8,
                    "email": "team@example.com",
                    "name": "Team",
                    "status": "active",
                    "enabled": true,
                    "access_allowed": true,
                    "quota_mb": 10240,
                    "used_bytes": 1048576,
                    "file_quota_bytes": 10737418240,
                    "file_used_bytes": 0,
                    "signature": "",
                    "ready_at": "2026-10-18T12:00:00Z",
                    "paid_until": "2026-11-18T12:00:00Z",
                    "delete_after": "2026-11-19T12:00:00Z",
                    "created_at": "2026-10-18T11:59:30Z",
                    "updated_at": "2026-10-18T12:00:00Z",
                    "api_user_id": "customer-42",
                    "auto_renew": false,
                    "outbound_high_limit": false,
                    "outbound_daily_recipient_limit": 1000,
                    "outbound_daily_recipients_used": 120,
                    "outbound_daily_recipients_remaining": 880,
                    "outbound_messages_per_minute": 30,
                    "outbound_minute_messages_used": 2,
                    "outbound_minute_messages_remaining": 28,
                    "outbound_recipients_per_message": 50,
                    "storage_shared": true
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Mail"
        ],
        "summary": "Удалить почтовый ящик",
        "operationId": "delete-mailbox",
        "description": "Создаёт бесплатный асинхронный заказ удаления. Удаляются ящик, письма и файлы. Неиспользованный оплаченный срок не возвращается. HTTP 202 подтверждает принятие, а не завершение удаления; проверяйте заказ и вебхук mailbox.deleted.",
        "parameters": [
          {
            "name": "mailbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            },
            "description": "ID интеграции, соответствующий X-Api-Key.",
            "example": 1
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128,
              "pattern": "^[!-~]+$"
            },
            "example": "mail-order-20261019-001",
            "description": "Уникальный ключ команды. После таймаута повторяйте ту же команду с тем же ключом. Ключ заказа с другими параметрами возвращает 409."
          }
        ],
        "responses": {
          "202": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "0.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "mailbox_id": 5,
                    "mail_operation_id": null,
                    "paid_until": null,
                    "error_code": null,
                    "error_message": null
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Mail"
        ],
        "summary": "Изменить настройки ящика",
        "operationId": "update-mailbox",
        "description": "Асинхронно меняет имя, пароль ящика или подпись. Пропущенные поля и null не меняют значения; пустая строка очищает подпись. HTTP 200 возвращает операцию, а не завершённое изменение. Проверяйте её UUID через маршрут операций аккаунта. Логин и пароль аккаунта, объём и оплаченный срок не меняются.",
        "parameters": [
          {
            "name": "mailbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128,
              "pattern": "^[!-~]+$"
            },
            "example": "mail-order-20261019-001",
            "description": "Уникальный ключ команды. После таймаута повторяйте ту же команду с тем же ключом. Ключ заказа с другими параметрами возвращает 409."
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": "645b8d90-b2a5-4d6d-b9f5-99798d86bef2",
                    "kind": "mailbox_update",
                    "mailbox_id": 5,
                    "status": "queued",
                    "run_at": "2026-10-19T12:00:00Z",
                    "created_at": "2026-10-19T12:00:00Z",
                    "completed_at": null,
                    "error": null,
                    "result": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailboxSettings"
              },
              "example": {
                "api_key_id": 1,
                "name": "Support",
                "signature": ""
              }
            }
          }
        }
      }
    },
    "/mail/accounts/{account_id}/operations/{operation_id}": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Почтовая операция",
        "operationId": "get-mail-operation",
        "description": "Возвращает операцию аккаунта. UUID приходит в ответе изменения настроек или как mail_operation_id в оплаченном заказе. queued/running — ожидание или выполнение; succeeded — успех; failed — ошибка; uncertain — результат не подтверждён; cancelled — отмена. result содержит только публичные поля результата. error — публичный код или null. Операция отправки не является заказом оплаты, принятие не подтверждает доставку.",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            },
            "description": "ID интеграции, соответствующий X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": "645b8d90-b2a5-4d6d-b9f5-99798d86bef2",
                    "kind": "mailbox_update",
                    "mailbox_id": 5,
                    "status": "queued",
                    "run_at": "2026-10-19T12:00:00Z",
                    "created_at": "2026-10-19T12:00:00Z",
                    "completed_at": null,
                    "error": null,
                    "result": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        }
      }
    },
    "/mail/plans": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Тарифы почты",
        "operationId": "get-mail-plans",
        "description": "Доступные тарифы хранения и конечные месячные цены в USD. Наценка интеграции не добавляется. Передавайте активный code как plan_code при покупке или увеличении объёма ящика. Срок — один календарный месяц; объём можно только увеличивать. Письма, вложения и файлы используют общий объём хранилища. mail_quota_mb и file_quota_mb обозначают один лимит, а не два отдельных объёма.",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            },
            "description": "ID интеграции, соответствующий X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailPlansResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "currency": "USD",
                    "period": "calendar_month",
                    "upgrade_only": true,
                    "max_mail_quota_mb": 102400,
                    "storage_step_mb": 10240,
                    "plans": [
                      {
                        "code": "mail-10",
                        "mail_quota_mb": 10240,
                        "file_quota_mb": 10240,
                        "monthly_price_usd": "1.00",
                        "active": true,
                        "storage_shared": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        }
      }
    },
    "/mail/accounts": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Почтовые аккаунты",
        "operationId": "list-mail-accounts",
        "description": "Все аккаунты клиентов интеграции. Выбирать пользователя не требуется. До создания первого аккаунта возвращается пустой массив. Пароли не возвращаются.",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            },
            "description": "ID интеграции, соответствующий X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailAccountsResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 12,
                      "api_user_id": "customer-42",
                      "login": "user-12",
                      "name": "Customer 42",
                      "enabled": true,
                      "created_at": "2026-10-19T12:00:00Z",
                      "updated_at": "2026-10-19T12:00:00Z"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Создать почтовый аккаунт",
        "operationId": "create-mail-account",
        "description": "Бесплатно создаёт аккаунт клиента с вашим api_user_id. Повтор с теми же api_user_id и name возвращает существующий аккаунт без пароля; другие данные вызывают 409. С полученными логином и паролем можно войти на adapt-mail.com. Сохраните пароль из ответа; для замены используйте password-reset. Почтовый ящик этим запросом не создаётся.",
        "parameters": [],
        "responses": {
          "201": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailAccountSecretResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 12,
                    "api_user_id": "customer-42",
                    "login": "user-12",
                    "name": "Customer 42",
                    "enabled": true,
                    "created_at": "2026-10-19T12:00:00Z",
                    "updated_at": "2026-10-19T12:00:00Z",
                    "password": "ExampleGeneratedPassword42!"
                  }
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Не кешировать этот ответ."
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailAccountCreate"
              },
              "example": {
                "api_key_id": 1,
                "api_user_id": "customer-42",
                "name": "Customer 42"
              }
            }
          }
        }
      }
    },
    "/mail/accounts/{account_id}": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Детали почтового аккаунта",
        "operationId": "get-mail-account",
        "description": "Возвращает аккаунт этой интеграции, включая логин и api_user_id. Пароль не возвращается.",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            },
            "description": "ID интеграции, соответствующий X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailAccountResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 12,
                    "api_user_id": "customer-42",
                    "login": "user-12",
                    "name": "Customer 42",
                    "enabled": true,
                    "created_at": "2026-10-19T12:00:00Z",
                    "updated_at": "2026-10-19T12:00:00Z"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Mail"
        ],
        "summary": "Изменить почтовый аккаунт",
        "operationId": "update-mail-account",
        "description": "Изменяет имя, доступ к аккаунту или пароль. Пропущенные поля и null не изменяют значения. Отключение аккаунта блокирует доступ, но не меняет оплаченные сроки. Изменение пароля или отключение отзывает сессии аккаунта.",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailAccountResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 12,
                    "api_user_id": "customer-42",
                    "login": "user-12",
                    "name": "Customer 42",
                    "enabled": true,
                    "created_at": "2026-10-19T12:00:00Z",
                    "updated_at": "2026-10-19T12:00:00Z"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailAccountUpdate"
              },
              "example": {
                "api_key_id": 1,
                "name": "Customer 42",
                "enabled": true
              }
            }
          }
        }
      }
    },
    "/mail/accounts/{account_id}/password-reset": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Сбросить пароль аккаунта",
        "operationId": "reset-mail-account-password",
        "description": "Создаёт новый пароль аккаунта и отзывает его сессии. Новый пароль возвращается только в этом ответе. Пароли отдельных ящиков не меняются.",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailAccountSecretResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 12,
                    "api_user_id": "customer-42",
                    "login": "user-12",
                    "name": "Customer 42",
                    "enabled": true,
                    "created_at": "2026-10-19T12:00:00Z",
                    "updated_at": "2026-10-19T12:00:00Z",
                    "password": "ExampleGeneratedPassword42!"
                  }
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Не кешировать этот ответ."
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailRequest"
              },
              "example": {
                "api_key_id": 1
              }
            }
          }
        }
      }
    },
    "/mail/domains": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Домены интеграции",
        "operationId": "list-mail-domains",
        "description": "Все неудалённые домены клиентов интеграции, начиная с новых, с account_id и api_user_id. Выбирать аккаунт не требуется. Общие домены в этот список не входят.",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            },
            "description": "ID интеграции, соответствующий X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailDomainsResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 8,
                      "name": "example.com",
                      "status": "pending",
                      "is_shared": false,
                      "account_id": 12,
                      "api_user_id": "customer-42"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        }
      }
    },
    "/mail/accounts/{account_id}/domains": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Домены аккаунта",
        "operationId": "list-mail-account-domains",
        "description": "Возвращает собственные домены клиента и доступные общие домены. Для создания ящика используйте ID активного домена.",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            },
            "description": "ID интеграции, соответствующий X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailAccountDomainsResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 8,
                      "name": "example.com",
                      "status": "pending",
                      "is_shared": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Подключить домен",
        "operationId": "create-mail-domain",
        "description": "Регистрирует домен со статусом pending. Передавайте полное доменное имя, например example.com, без http://, https://, пути или порта. Добавьте записи из маршрута DNS, затем вызовите verify. Уже подключённый домен возвращает 409.",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailDomainResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 8,
                    "name": "example.com",
                    "status": "pending",
                    "is_shared": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailDomainCreate"
              },
              "example": {
                "api_key_id": 1,
                "name": "example.com"
              }
            }
          }
        }
      }
    },
    "/mail/accounts/{account_id}/domains/{domain_id}": {
      "delete": {
        "tags": [
          "Mail"
        ],
        "summary": "Удалить домен",
        "operationId": "delete-mail-domain",
        "description": "Удаляет собственный домен только после удаления всех его ящиков, включая создаваемые, заблокированные и удаляемые. Общий домен удалить нельзя. Если удаление не подтверждено, повторите запрос; на удаляемом домене нельзя создавать ящики. Записи у вашего DNS-провайдера автоматически не удаляются.",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            },
            "description": "ID интеграции, соответствующий X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailDeletedResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        }
      }
    },
    "/mail/accounts/{account_id}/domains/{domain_id}/dns": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "DNS-записи домена",
        "operationId": "get-mail-domain-dns",
        "description": "Возвращает требуемые DNS-записи и найденные значения. name — имя записи, value — полное ожидаемое значение, matches — результат сравнения. Для MX разделите value на приоритет и сервер: «10 mx1.adapt-mail.com» означает приоритет 10 и сервер mx1.adapt-mail.com. В записи может быть error=dns_unavailable. GET проверяет записи, но не активирует домен. DKIM появляется после подтверждения. Порядок настройки описан в руководстве по почте.",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            },
            "description": "ID интеграции, соответствующий X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailDnsResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "domain_id": 8,
                    "status": "pending",
                    "records": [
                      {
                        "type": "TXT",
                        "name": "_adapt-mail.example.com",
                        "value": "adapt-mail-verification=EXAMPLE_TOKEN",
                        "observed": [],
                        "matches": false
                      },
                      {
                        "type": "MX",
                        "name": "example.com",
                        "value": "10 mx1.adapt-mail.com",
                        "observed": [
                          "10 mx1.adapt-mail.com."
                        ],
                        "matches": true
                      },
                      {
                        "type": "TXT",
                        "name": "example.com",
                        "value": "v=spf1 ip4:199.89.134.7 ip4:199.89.134.8 -all",
                        "observed": [
                          "v=spf1 ip4:199.89.134.7 ip4:199.89.134.8 -all"
                        ],
                        "matches": true
                      },
                      {
                        "type": "TXT",
                        "name": "_dmarc.example.com",
                        "value": "v=DMARC1; p=none",
                        "observed": [
                          "v=DMARC1; p=none"
                        ],
                        "matches": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        }
      }
    },
    "/mail/accounts/{account_id}/domains/{domain_id}/verify": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Подтвердить домен",
        "operationId": "verify-mail-domain",
        "description": "Проверяет TXT владения и активирует домен. Если подтверждающий TXT не найден, возвращается 409. Ответ содержит DNS-записи, включая созданный TXT DKIM. Добавьте DKIM и повторно проверьте DNS. status=active подтверждает активацию, а не совпадение всех записей: проверяйте records[].matches.",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailDnsResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "domain_id": 8,
                    "status": "active",
                    "records": [
                      {
                        "type": "TXT",
                        "name": "_adapt-mail.example.com",
                        "value": "adapt-mail-verification=EXAMPLE_TOKEN",
                        "observed": [
                          "adapt-mail-verification=EXAMPLE_TOKEN"
                        ],
                        "matches": true
                      },
                      {
                        "type": "MX",
                        "name": "example.com",
                        "value": "10 mx1.adapt-mail.com",
                        "observed": [
                          "10 mx1.adapt-mail.com."
                        ],
                        "matches": true
                      },
                      {
                        "type": "TXT",
                        "name": "example.com",
                        "value": "v=spf1 ip4:199.89.134.7 ip4:199.89.134.8 -all",
                        "observed": [
                          "v=spf1 ip4:199.89.134.7 ip4:199.89.134.8 -all"
                        ],
                        "matches": true
                      },
                      {
                        "type": "TXT",
                        "name": "_dmarc.example.com",
                        "value": "v=DMARC1; p=none",
                        "observed": [
                          "v=DMARC1; p=none"
                        ],
                        "matches": true
                      },
                      {
                        "type": "TXT",
                        "name": "dkim._domainkey.example.com",
                        "value": "v=DKIM1; k=rsa; p=EXAMPLE_PUBLIC_KEY",
                        "observed": [],
                        "matches": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailRequest"
              },
              "example": {
                "api_key_id": 1
              }
            }
          }
        }
      }
    },
    "/mail/mailboxes/{mailbox_id}/renew/quote": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Рассчитать продление ящика",
        "operationId": "quote-mailbox-renewal",
        "description": "Продлевает на один календарный месяц по актуальной цене тарифа объёма ящика. Новый срок начинается с более поздней даты: paid_until или текущего времени. Продление доступно до начала удаления и в течение 24 часов после окончания оплаты. Ручная блокировка доступа не снимается. Возвращает цену и баланс без списания и создания заказа.",
        "parameters": [
          {
            "name": "mailbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailQuoteResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "amount_usd": "1.0000",
                    "balance_usd": "25.0000",
                    "currency": "USD",
                    "months": 1,
                    "plan": {
                      "code": "mail-10",
                      "mail_quota_mb": 10240,
                      "file_quota_mb": 10240,
                      "monthly_price_usd": "1.00",
                      "active": true,
                      "storage_shared": true
                    },
                    "allow_negative_balance": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailPayment"
              },
              "example": {
                "api_key_id": 1,
                "expected_amount_usd": "1.0000"
              }
            }
          }
        }
      }
    },
    "/mail/mailboxes/{mailbox_id}/renew": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Продлить почтовый ящик",
        "operationId": "renew-mailbox",
        "description": "Продлевает на один календарный месяц по актуальной цене тарифа объёма ящика. Новый срок начинается с более поздней даты: paid_until или текущего времени. Продление доступно до начала удаления и в течение 24 часов после окончания оплаты. Ручная блокировка доступа не снимается.",
        "parameters": [
          {
            "name": "mailbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128,
              "pattern": "^[!-~]+$"
            },
            "example": "mail-order-20261019-001",
            "description": "Уникальный ключ команды. После таймаута повторяйте ту же команду с тем же ключом. Ключ заказа с другими параметрами возвращает 409."
          }
        ],
        "responses": {
          "202": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "1.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "mailbox_id": 5,
                    "mail_operation_id": null,
                    "paid_until": null,
                    "error_code": null,
                    "error_message": null
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailPayment"
              },
              "example": {
                "api_key_id": 1,
                "expected_amount_usd": "1.0000"
              }
            }
          }
        }
      }
    },
    "/mail/mailboxes/{mailbox_id}/upgrade/quote": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Рассчитать увеличение объёма",
        "operationId": "quote-mailbox-upgrade",
        "description": "Увеличивает объём до большего активного тарифа. Ящик должен быть активен и оплачен. Доплата равна разнице актуальных месячных цен, умноженной на остаток каждого оплаченного календарного месяца, с округлением до четырёх знаков. paid_until не меняется. Уменьшение объёма не поддерживается. Возвращает доплату без списания.",
        "parameters": [
          {
            "name": "mailbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailQuoteResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "amount_usd": "0.5000",
                    "balance_usd": "25.0000",
                    "currency": "USD",
                    "months": 1,
                    "plan": {
                      "code": "mail-20",
                      "mail_quota_mb": 20480,
                      "file_quota_mb": 20480,
                      "monthly_price_usd": "2.00",
                      "active": true,
                      "storage_shared": true
                    },
                    "allow_negative_balance": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailUpgrade"
              },
              "example": {
                "api_key_id": 1,
                "plan_code": "mail-20",
                "expected_amount_usd": "0.5000"
              }
            }
          }
        }
      }
    },
    "/mail/mailboxes/{mailbox_id}/upgrade": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Увеличить объём ящика",
        "operationId": "upgrade-mailbox",
        "description": "Увеличивает объём до большего активного тарифа. Ящик должен быть активен и оплачен. Доплата равна разнице актуальных месячных цен, умноженной на остаток каждого оплаченного календарного месяца, с округлением до четырёх знаков. paid_until не меняется. Уменьшение объёма не поддерживается.",
        "parameters": [
          {
            "name": "mailbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128,
              "pattern": "^[!-~]+$"
            },
            "example": "mail-order-20261019-001",
            "description": "Уникальный ключ команды. После таймаута повторяйте ту же команду с тем же ключом. Ключ заказа с другими параметрами возвращает 409."
          }
        ],
        "responses": {
          "202": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "order_id": 401,
                    "status": "pending",
                    "amount_usd": "1.0000",
                    "currency": "USD",
                    "vm_id": null,
                    "rental_id": null,
                    "mailbox_id": 5,
                    "mail_operation_id": null,
                    "paid_until": null,
                    "error_code": null,
                    "error_message": null
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailUpgrade"
              },
              "example": {
                "api_key_id": 1,
                "plan_code": "mail-20",
                "expected_amount_usd": "0.5000"
              }
            }
          }
        }
      }
    },
    "/mail/mailboxes/{mailbox_id}/auto-renew": {
      "patch": {
        "tags": [
          "Mail"
        ],
        "summary": "Автопродление ящика",
        "operationId": "set-mailbox-auto-renew",
        "description": "Включает или отключает продление с баланса интеграции. При включении попытка выполняется за час до конца оплаты и ещё раз за час до удаления, если ящик не продлён. Каждое продление — на календарный месяц по актуальной цене. Возвращает детали ящика с текущим расходом отправки.",
        "parameters": [
          {
            "name": "mailbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailMailboxResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 5,
                    "account_id": 12,
                    "domain_id": 8,
                    "email": "team@example.com",
                    "name": "Team",
                    "status": "active",
                    "enabled": true,
                    "access_allowed": true,
                    "quota_mb": 10240,
                    "used_bytes": 1048576,
                    "file_quota_bytes": 10737418240,
                    "file_used_bytes": 0,
                    "signature": "",
                    "ready_at": "2026-10-18T12:00:00Z",
                    "paid_until": "2026-11-18T12:00:00Z",
                    "delete_after": "2026-11-19T12:00:00Z",
                    "created_at": "2026-10-18T11:59:30Z",
                    "updated_at": "2026-10-18T12:00:00Z",
                    "api_user_id": "customer-42",
                    "auto_renew": true,
                    "outbound_high_limit": false,
                    "outbound_daily_recipient_limit": 1000,
                    "outbound_daily_recipients_used": 120,
                    "outbound_daily_recipients_remaining": 880,
                    "outbound_messages_per_minute": 30,
                    "outbound_minute_messages_used": 2,
                    "outbound_minute_messages_remaining": 28,
                    "outbound_recipients_per_message": 50,
                    "storage_shared": true
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailAutoRenew"
              },
              "example": {
                "api_key_id": 1,
                "auto_renew": true
              }
            }
          }
        }
      }
    },
    "/mail/mailboxes/{mailbox_id}/access": {
      "patch": {
        "tags": [
          "Mail"
        ],
        "summary": "Доступ к ящику",
        "operationId": "set-mailbox-access",
        "description": "Устанавливает ручной флаг enabled. Отключение не приостанавливает оплату и не меняет срок. Включение не восстанавливает просроченный или удаляемый ящик и не отменяет блокировку аккаунта. Возвращает данные ящика без счётчиков расхода отправки.",
        "parameters": [
          {
            "name": "mailbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailMailboxStateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 5,
                    "account_id": 12,
                    "domain_id": 8,
                    "email": "team@example.com",
                    "name": "Team",
                    "status": "suspended",
                    "enabled": false,
                    "access_allowed": false,
                    "quota_mb": 10240,
                    "used_bytes": 1048576,
                    "file_quota_bytes": 10737418240,
                    "file_used_bytes": 0,
                    "signature": "",
                    "ready_at": "2026-10-18T12:00:00Z",
                    "paid_until": "2026-11-18T12:00:00Z",
                    "delete_after": "2026-11-19T12:00:00Z",
                    "created_at": "2026-10-18T11:59:30Z",
                    "updated_at": "2026-10-18T12:00:00Z",
                    "api_user_id": "customer-42",
                    "auto_renew": false,
                    "outbound_high_limit": false,
                    "outbound_daily_recipient_limit": 1000,
                    "outbound_messages_per_minute": 30,
                    "outbound_recipients_per_message": 50,
                    "storage_shared": true
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailAccess"
              },
              "example": {
                "api_key_id": 1,
                "enabled": false
              }
            }
          }
        }
      }
    },
    "/mail/mailboxes/{mailbox_id}/account": {
      "put": {
        "tags": [
          "Mail"
        ],
        "summary": "Сменить владельца ящика",
        "operationId": "assign-mailbox-account",
        "description": "Переносит ящик в другой аккаунт той же интеграции и обновляет api_user_id. Адрес, пароль, содержимое и оплаченный срок сохраняются. Возвращает данные ящика без счётчиков расхода отправки.",
        "parameters": [
          {
            "name": "mailbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailMailboxStateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 5,
                    "account_id": 13,
                    "domain_id": 8,
                    "email": "team@example.com",
                    "name": "Team",
                    "status": "active",
                    "enabled": true,
                    "access_allowed": true,
                    "quota_mb": 10240,
                    "used_bytes": 1048576,
                    "file_quota_bytes": 10737418240,
                    "file_used_bytes": 0,
                    "signature": "",
                    "ready_at": "2026-10-18T12:00:00Z",
                    "paid_until": "2026-11-18T12:00:00Z",
                    "delete_after": "2026-11-19T12:00:00Z",
                    "created_at": "2026-10-18T11:59:30Z",
                    "updated_at": "2026-10-18T12:00:00Z",
                    "api_user_id": "customer-43",
                    "auto_renew": false,
                    "outbound_high_limit": false,
                    "outbound_daily_recipient_limit": 1000,
                    "outbound_messages_per_minute": 30,
                    "outbound_recipients_per_message": 50,
                    "storage_shared": true
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailAssign"
              },
              "example": {
                "api_key_id": 1,
                "account_id": 13
              }
            }
          }
        }
      }
    },
    "/mail/accounts/{account_id}/operations/{operation_id}/retry": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Повторить почтовую операцию",
        "operationId": "retry-mail-operation",
        "description": "Повторяет допустимую неуспешную операцию настройки без нового списания. Отправку писем через этот маршрут повторить нельзя. Устаревшая настройка не может перезаписать более новую. Из оплаченных заказов можно возобновить только увеличение объёма в review; повтором остальных заказов сервис управляет автоматически. Недопустимая операция возвращает 409. После принятия проверяйте операцию и связанный заказ.",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": "645b8d90-b2a5-4d6d-b9f5-99798d86bef2",
                    "kind": "mailbox_update",
                    "mailbox_id": 5,
                    "status": "queued",
                    "run_at": "2026-10-19T12:00:00Z",
                    "created_at": "2026-10-19T12:00:00Z",
                    "completed_at": null,
                    "error": null,
                    "result": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailRequest"
              },
              "example": {
                "api_key_id": 1
              }
            }
          }
        }
      }
    },
    "/mail/api-keys": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Почтовые API-ключи",
        "operationId": "list-mail-api-keys",
        "description": "Список активных и отозванных почтовых ключей интеграции. Возвращаются только метаданные; активный ключ можно посмотреть через GET /mail/api-keys/{key_id}.",
        "parameters": [
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            },
            "description": "ID интеграции, соответствующий X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailKeysResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 3,
                      "name": "Billing mail",
                      "prefix": "am_example12",
                      "created_at": "2026-10-19T12:00:00Z",
                      "active": true
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Создать почтовый API-ключ",
        "operationId": "create-mail-api-key",
        "description": "Почтовые ключи нужны для чтения и отправки писем, работы с папками и вложениями через почтовое API — например, в собственном интерфейсе почты или автоматизации. Они относятся к интеграции, а не к одному ящику. Создание услуг, оплата и продление используют ключ Cloud-интеграции. Для входа на adapt-mail.com нужны логин и пароль.",
        "parameters": [],
        "responses": {
          "201": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailKeyCreatedResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 3,
                    "name": "Billing mail",
                    "prefix": "am_example12",
                    "created_at": "2026-10-19T12:00:00Z",
                    "key": "am_example1234567890abcdefghijklmnopqrstuvwx123456789"
                  }
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Не кешировать этот ответ."
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailKeyCreate"
              },
              "example": {
                "api_key_id": 1,
                "name": "Billing mail"
              }
            }
          }
        }
      }
    },
    "/mail/api-keys/{key_id}": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Посмотреть почтовый API-ключ",
        "operationId": "get-mail-api-key",
        "description": "Возвращает активный ключ полностью для просмотра или копирования. Отсутствующий, чужой или отозванный ключ возвращает 404. Если значение невозможно восстановить, возвращается 409 mail_key_not_recoverable; создайте новый ключ. Ответ содержит Cache-Control: no-store.",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            },
            "description": "ID интеграции, соответствующий X-Api-Key.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailKeyDetailsResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 3,
                    "name": "Billing mail",
                    "prefix": "am_example12",
                    "created_at": "2026-10-19T12:00:00Z",
                    "active": true,
                    "key": "am_example1234567890abcdefghijklmnopqrstuvwx123456789"
                  }
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Не кешировать этот ответ."
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Mail"
        ],
        "summary": "Отозвать или удалить почтовый API-ключ",
        "operationId": "delete-mail-api-key",
        "description": "При permanent=false (по умолчанию) отзывает ключ и возвращает revoked=true. Ключ больше не авторизует запросы почтового API. При permanent=true окончательно удаляет отозванный ключ и возвращает deleted=true. Сначала отзовите активный ключ: попытка сразу удалить его вернёт 409 mail_key_active.",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            },
            "description": "ID интеграции, соответствующий X-Api-Key.",
            "example": 1
          },
          {
            "name": "permanent",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Удалить отозванный ключ вместо отзыва."
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailKeyRemovalResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "revoked": true
                  }
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Не кешировать этот ответ."
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния, оплаты, цены или ключа повтора. Коды описаны в руководстве по почте.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        }
      }
    },
    "/mail/accounts/{account_id}/login-link": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Вход в почту по ссылке",
        "operationId": "create-mail-login-link",
        "description": "Создаёт одноразовую ссылку входа в Adapt Mail на 5 минут. Без mailbox_id или с null открывает весь аккаунт; с mailbox_id — только этот ящик выбранного аккаунта. locale задаёт язык интерфейса, по умолчанию en. Откройте login_url целиком, включая #token. Не сохраняйте и не кешируйте ссылку; после использования или истечения срока создайте новую. Пароли и существующие входы в браузере не меняются. При входе повторно проверяются владелец и доступ; смена пароля аккаунта делает ссылку недействительной.",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailLoginLinkResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "login_url": "https://adapt-mail.com/ru/auth/#token=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                    "expires_in": 300,
                    "expires_at": "2026-10-21T12:05:00Z",
                    "account_id": 12,
                    "mailbox_id": 42
                  }
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Не кешировать этот ответ."
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Доступ запрещён. IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ресурс этой интеграции не найден.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "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"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailLoginLinkRequest"
              },
              "example": {
                "api_key_id": 1,
                "mailbox_id": 42,
                "locale": "ru"
              }
            }
          }
        }
      }
    },
    "/vms/{vm_id}/firewall/smtp": {
      "patch": {
        "tags": [
          "Firewall"
        ],
        "summary": "Открытие и закрытие SMTP-портов",
        "operationId": "set-firewall-smtp",
        "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/FirewallSmtpBody"
              },
              "example": {
                "api_key_id": 1,
                "revision": 0,
                "blocked": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Принято в обработку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmOperationResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "vm_id": 101,
                    "action": "firewall_smtp",
                    "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"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Управляет системной блокировкой исходящих TCP-портов 25, 465, 587 и 2525 для IPv4 и IPv6 без перезапуска виртуальной машины. Передайте blocked=false для открытия или blocked=true для закрытия портов.\n\nСначала получите revision через GET /vms/{vm_id}/firewall. Передавайте Idempotency-Key; при потере ответа повторите запрос с тем же ключом и неизменными параметрами. При firewall_conflict перечитайте настройки и отправьте новую команду с новой revision и новым ключом.\n\nHTTP 202 возвращает операцию firewall_smtp. Проверяйте её через GET /vms/{vm_id}/operations/{operation_id} до succeeded или failed. Как и у других команд фаервола, result=null; текущее состояние smtp_blocked, smtp_ports, revision и applied доступно через GET /vms/{vm_id}/firewall. Принятие в очередь ещё не означает применение настройки.\n\nСнятие системной блокировки не отменяет ограничения провайдера или настройки гостевой ОС.\n\n[Правила запросов и ошибки](./quick-start) · [Жизненный цикл](./purchase-flow)"
      }
    },
    "/looking-glass/points": {
      "get": {
        "tags": [
          "Looking Glass"
        ],
        "operationId": "list-looking-glass-points",
        "summary": "Точки Looking Glass",
        "description": "Точки диагностики из актуального реестра. Необязательный location_id ограничивает список локацией; при отсутствии совпадений data=[]. Отключённые точки сохраняются с выключенными флагами. Три latency URL используются напрямую из браузера для замера HTTPS-задержки, без API-ключа. Подробнее: [Looking Glass](./looking-glass-guide).",
        "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": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            },
            "description": "ID локации."
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LookingGlassPointsResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "location_id": 2,
                      "location_name": "US — Ashburn",
                      "country_code": "US",
                      "city": "Ashburn",
                      "ipv4": "31.59.67.210",
                      "ipv6": "2602:f316:1:3::10",
                      "ipv4_enabled": true,
                      "ipv6_enabled": true,
                      "latency_url": "https://us-ash.lg.adaptgroup.pro/latency",
                      "latency_ipv4_url": "https://v4-us-ash.lg.adaptgroup.pro/latency",
                      "latency_ipv6_url": "https://v6-us-ash.lg.adaptgroup.pro/latency",
                      "checks": [
                        "ping",
                        "traceroute",
                        "mtr"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Неверные поля запроса либо неподдерживаемые параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Точка Looking Glass недоступна или вернула некорректный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "detail": {
                    "code": "lg_agent_unavailable",
                    "message": "Точка Looking Glass недоступна или вернула некорректный ответ"
                  }
                }
              }
            }
          },
          "503": {
            "description": "Looking Glass временно недоступен",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "detail": {
                    "code": "lg_unavailable",
                    "message": "Looking Glass временно недоступен"
                  }
                }
              }
            }
          },
          "504": {
            "description": "Истекло время ожидания Looking Glass",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "detail": {
                    "code": "lg_timeout",
                    "message": "Истекло время ожидания Looking Glass"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/looking-glass/check": {
      "post": {
        "tags": [
          "Looking Glass"
        ],
        "operationId": "run-looking-glass-check",
        "summary": "Запустить диагностику",
        "description": "Синхронный Ping/Traceroute/MTR из выбранной точки к публичной цели. IP клиента определяется по соединению; client_ip и api_id в JSON не принимаются. Квоты независимы для каждой интеграции. За сервером партнёра пользователи делят его IP-лимит внутри этой интеграции. Проверка может ожидать свободной мощности до пяти секунд; ответ остаётся синхронным. Без автоматических повторов и Idempotency-Key: после обрыва или 504 команда могла выполниться. Ненулевой код команды и timed_out=true могут возвращаться с HTTP 200. Полные лимиты и правила вывода: [Looking Glass](./looking-glass-guide).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LookingGlassCheckRequest"
              },
              "example": {
                "api_key_id": 1,
                "point_id": 1,
                "type": "ping",
                "family": 4,
                "target": "1.1.1.1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LookingGlassCheckResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "point_id": 1,
                    "type": "ping",
                    "target": "1.1.1.1",
                    "family": 4,
                    "return_code": 0,
                    "timed_out": false,
                    "duration_ms": 4000,
                    "output": "PING 1.1.1.1 ..."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Нет ключа, неверный ключ/ID либо интеграция выключена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "IP клиента не входит в белый список интеграции (`ip_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "ip_not_allowed": {
                    "value": {
                      "detail": {
                        "code": "ip_not_allowed",
                        "message": "IP-адрес не входит в белый список интеграции"
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Некорректная или запрещённая цель, либо ошибка разрешения DNS",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "detail": {
                    "code": "lg_invalid_target",
                    "message": "Некорректная или запрещённая цель, либо ошибка разрешения DNS"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Непредвиденная ошибка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Точка Looking Glass не найдена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "detail": {
                    "code": "lg_point_not_found",
                    "message": "Точка Looking Glass не найдена"
                  }
                }
              }
            }
          },
          "409": {
            "description": "Точка или семейство адресов Looking Glass отключены",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "detail": {
                    "code": "lg_point_disabled",
                    "message": "Точка или семейство адресов Looking Glass отключены"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Исчерпана личная квота, недоступна мощность точки, очередь заполнена или время ожидания истекло. Учитывайте Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "detail": {
                    "code": "lg_rate_limited",
                    "message": "Превышен лимит проверок Looking Glass"
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Повторить не раньше чем через указанное число секунд.",
                "schema": {
                  "type": "string"
                },
                "example": "60"
              }
            }
          },
          "502": {
            "description": "Точка Looking Glass недоступна или вернула некорректный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "detail": {
                    "code": "lg_agent_unavailable",
                    "message": "Точка Looking Glass недоступна или вернула некорректный ответ"
                  }
                }
              }
            }
          },
          "503": {
            "description": "Looking Glass временно недоступен Код lg_client_ip_unavailable означает, что не удалось определить IP клиента.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "detail": {
                    "code": "lg_unavailable",
                    "message": "Looking Glass временно недоступен"
                  }
                }
              }
            }
          },
          "504": {
            "description": "Истекло время ожидания Looking Glass",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "detail": {
                    "code": "lg_timeout",
                    "message": "Истекло время ожидания Looking Glass"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "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"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Id",
            "description": "Непрозрачный ID группы; null у тарифа с общей разметкой."
          },
          "disk_layouts": {
            "anyOf": [
              {
                "items": {
                  "enum": [
                    "separate",
                    "lvm_linear",
                    "raid0",
                    "raid1",
                    "raid5",
                    "raid6",
                    "raid10"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Disk Layouts"
          },
          "default_disk_layout": {
            "anyOf": [
              {
                "enum": [
                  "separate",
                  "lvm_linear",
                  "raid0",
                  "raid1",
                  "raid5",
                  "raid6",
                  "raid10"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Default Disk Layout"
          }
        },
        "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": {
            "anyOf": [
              {
                "enum": [
                  "separate",
                  "lvm_linear",
                  "raid0",
                  "raid1"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "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/DedicatedPlanDisk"
            },
            "title": "Disks",
            "type": "array"
          },
          "disk_layouts": {
            "items": {
              "$ref": "#/components/schemas/DedicatedLayout"
            },
            "type": "array",
            "title": "Disk Layouts",
            "description": "Варианты разметки: code передаётся в запросе, name отображается пользователю."
          },
          "default_disk_layout": {
            "anyOf": [
              {
                "enum": [
                  "separate",
                  "lvm_linear",
                  "raid0",
                  "raid1"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "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"
          },
          "city": {
            "type": "string",
            "title": "City",
            "description": "Город локации в исходном написании, без локализации."
          },
          "datacenter": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Datacenter",
            "description": "Название дата-центра локации; null, если не заполнено."
          },
          "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",
          "city",
          "datacenter",
          "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": [
                {
                  "code": "separate",
                  "name": "No Raid"
                }
              ],
              "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",
              "datacenter": null,
              "monthly_price_usd": "5.0000",
              "extra_ipv4_monthly_price_usd": "5.0000",
              "extra_traffic_tb_price_usd": "5.0000",
              "term_discounts": {},
              "available": 1,
              "city": "Gdańsk"
            }
          ],
          "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"
          },
          "city": {
            "type": "string",
            "title": "City",
            "description": "Город локации в исходном написании, без локализации."
          },
          "datacenter": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Datacenter",
            "description": "Название дата-центра локации; null, если не заполнено."
          },
          "platforms": {
            "items": {
              "$ref": "#/components/schemas/PlatformItem"
            },
            "type": "array",
            "title": "Platforms"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "country_code",
          "city",
          "datacenter",
          "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 — результата нет. Не подтверждает работоспособность приложения."
          },
          "application": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApplicationItem"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Снимок приложения для этой установки или null, если приложения нет. Содержит публичные поля каталога и installer_sha256 — контрольную сумму сохранённого установщика, без его содержимого и реквизитов доступа. В заказе это снимок покупки; в деталях и списке VPS — последняя успешная установка."
          },
          "backup_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Backup Id"
          },
          "backup_service_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Backup Service Id"
          },
          "worker_operation_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Worker Operation Id"
          },
          "ip_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Id",
            "description": "Для завершённой покупки/продления IPv4; иначе null."
          },
          "paid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid Until",
            "description": "Подтверждённый конец оплаты для завершённого заказа IPv4 или почты; иначе null."
          },
          "mailbox_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "mail_operation_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "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",
              "backup_purchase",
              "backup_renewal",
              "backup_service_delete",
              "backup_delete",
              "backup_restore",
              "backup_export",
              "mail_purchase",
              "mail_renewal",
              "mail_upgrade",
              "mail_delete"
            ],
            "title": "Order Type"
          },
          "api_user_id": {
            "type": "string",
            "title": "Api User Id",
            "description": "Ваш идентификатор клиента. Строка в пределах интеграции."
          },
          "ip_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Id",
            "description": "Для завершённой покупки/продления IPv4; иначе null."
          },
          "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"
                },
                {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              ]
            },
            "title": "Parameters",
            "type": "object"
          },
          "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 — результата нет. Не подтверждает работоспособность приложения."
          },
          "application": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApplicationItem"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Снимок приложения для этой установки или null, если приложения нет. Содержит публичные поля каталога и installer_sha256 — контрольную сумму сохранённого установщика, без его содержимого и реквизитов доступа. В заказе это снимок покупки; в деталях и списке VPS — последняя успешная установка."
          },
          "backup_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Backup Id"
          },
          "backup_service_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Backup Service Id"
          },
          "worker_operation_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Worker Operation Id"
          },
          "paid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid Until",
            "description": "Подтверждённый конец оплаты для завершённого заказа IPv4 или почты; иначе null."
          },
          "mailbox_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "mail_operation_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "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",
              "backup_purchase",
              "backup_renewal",
              "backup_service_delete",
              "backup_delete",
              "backup_restore",
              "backup_export",
              "mail_purchase",
              "mail_renewal",
              "mail_upgrade",
              "mail_delete"
            ],
            "title": "Order Type"
          },
          "api_user_id": {
            "type": "string",
            "title": "Api User Id",
            "description": "Ваш идентификатор клиента. Строка в пределах интеграции."
          },
          "ip_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Id",
            "description": "Для завершённой покупки/продления IPv4; иначе null."
          },
          "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 — результата нет. Не подтверждает работоспособность приложения."
          },
          "application": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApplicationItem"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Снимок приложения для этой установки или null, если приложения нет. Содержит публичные поля каталога и installer_sha256 — контрольную сумму сохранённого установщика, без его содержимого и реквизитов доступа. В заказе это снимок покупки; в деталях и списке VPS — последняя успешная установка."
          },
          "backup_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Backup Id"
          },
          "backup_service_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Backup Service Id"
          },
          "worker_operation_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Worker Operation Id"
          },
          "paid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid Until",
            "description": "Подтверждённый конец оплаты для завершённого заказа IPv4 или почты; иначе null."
          },
          "mailbox_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "mail_operation_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "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"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Url",
            "description": "Ссылка на картинку ОС; null, если картинка не задана."
          }
        },
        "type": "object",
        "required": [
          "id",
          "code",
          "name",
          "logo_url"
        ],
        "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": "debian-12",
              "name": "Debian 12",
              "logo_url": "https://cdn.example.com/os/debian.svg"
            },
            {
              "id": 2,
              "code": "ubuntu-24.04",
              "name": "Ubuntu 24.04",
              "logo_url": null
            }
          ]
        }
      },
      "PasswordResetBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "Числовой ID интеграции из дашборда; должен соответствовать X-Api-Key."
          },
          "login": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 32,
                "pattern": "^[a-z_][a-z0-9_-]*$"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Login",
            "description": "Существующий пользователь ОС. Если отсутствует или null — фактический логин установки, обычно admin для Windows и root для Linux. Если логин неизвестен: HTTP 409 vm_login_required."
          },
          "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": "Текущее доступное количество. Снимок не резервирует ресурсы."
          },
          "automatic_backup_monthly_price_usd": {
            "type": "string",
            "title": "Automatic Backup Monthly Price Usd",
            "description": "Цена автоматических бекапов этого тарифа за месяц в USD: бекапы ежедневные, хранятся 7 последних бекапов. Цена за весь пакет, а не за каждую копию; без наценки интеграции, коэффициента CPU и скидки за срок. Строка с четырьмя знаками после запятой.",
            "example": "1.0000"
          }
        },
        "type": "object",
        "required": [
          "code",
          "name",
          "cpu_cores",
          "ram_mb",
          "disk_gb",
          "traffic_tb",
          "monthly_price_usd",
          "available",
          "automatic_backup_monthly_price_usd"
        ],
        "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"
          },
          "manual_backup_gb_month_price_usd": {
            "type": "string",
            "title": "Manual Backup Gb Month Price Usd",
            "description": "Общая ставка в USD за GiB хранимой ручной копии в месяц (1 GiB = 1073741824 байт). Ручной бекап создаётся на уже существующей VPS. Это ставка хранения, а не итоговая цена за копию или за GiB диска VPS. Без наценки и скидки за срок. Строка с шестью знаками после запятой.",
            "example": "0.050000"
          }
        },
        "type": "object",
        "required": [
          "success",
          "api_key_id",
          "cpu_percent",
          "locations",
          "manual_backup_gb_month_price_usd"
        ],
        "title": "PlansListResponse",
        "example": {
          "success": true,
          "api_key_id": 1,
          "cpu_percent": 60,
          "currency": "USD",
          "locations": [
            {
              "id": 1,
              "name": "Example",
              "country_code": "PL",
              "datacenter": null,
              "platforms": [
                {
                  "platform": "epyc",
                  "cpu_display_name": "AMD EPYC",
                  "availability_updated_at": null,
                  "plans": [
                    {
                      "code": "A1",
                      "name": "A1",
                      "cpu_cores": 1,
                      "ram_mb": 1024,
                      "disk_gb": 20,
                      "traffic_tb": "5.0000",
                      "monthly_price_usd": "5.0000",
                      "available": null,
                      "automatic_backup_monthly_price_usd": "1.0000"
                    }
                  ],
                  "term_discounts": {
                    "1": "0",
                    "3": "3",
                    "6": "5",
                    "12": "8",
                    "24": "10",
                    "36": "12"
                  },
                  "extra_ipv4_monthly_price_usd": "2.0000",
                  "extra_traffic_tb_price_usd": "1.0000",
                  "cpu_max_frequency_ghz": null
                }
              ],
              "city": "Gdańsk"
            }
          ],
          "manual_backup_gb_month_price_usd": "0.050000"
        }
      },
      "PlatformItem": {
        "properties": {
          "platform": {
            "type": "string",
            "enum": [
              "epyc",
              "ryzen",
              "xeon"
            ],
            "title": "Platform",
            "description": "Семейство CPU: epyc — AMD EPYC, ryzen — AMD Ryzen, xeon — Intel Xeon."
          },
          "cpu_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Display Name",
            "description": "Название семейства CPU: AMD EPYC, AMD Ryzen или Intel Xeon. Не конкретная модель."
          },
          "term_discounts": {
            "additionalProperties": {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            "type": "object",
            "title": "Term Discounts",
            "description": "Скидки в процентах для всех тарифов этой пары локация/платформа. Ключ — срок в месяцах строкой (1, 3, 6, 12, 24, 36), значение — процент строкой."
          },
          "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"
          },
          "extra_ipv4_monthly_price_usd": {
            "type": "string",
            "title": "Extra Ipv4 Monthly Price Usd",
            "description": "Фиксированная месячная цена одного дополнительного IPv4 в USD. Отдельная аренда и докупка для VPS используют календарные месяцы. Без наценки интеграции, коэффициента CPU и скидки за срок.",
            "example": "2.0000"
          },
          "extra_traffic_tb_price_usd": {
            "type": "string",
            "title": "Extra Traffic Tb Price Usd",
            "description": "Фиксированная цена 1 ТБ дополнительного трафика (1024^4 байт) для текущего периода трафика в USD. Без наценки интеграции, коэффициента CPU и скидки за срок.",
            "example": "1.0000"
          },
          "cpu_max_frequency_ghz": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Max Frequency Ghz",
            "description": "В каталоге всегда null. Максимальная частота CPU доступна после выдачи в списке/деталях VPS, если известна."
          }
        },
        "type": "object",
        "required": [
          "platform",
          "cpu_display_name",
          "term_discounts",
          "availability_updated_at",
          "plans",
          "extra_ipv4_monthly_price_usd",
          "extra_traffic_tb_price_usd"
        ],
        "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. Для установки Windows: 8–127 символов, минимум три категории (строчные, заглавные, цифры, специальные), без CR/LF/NUL и имени пользователя внутри пароля.",
            "writeOnly": true
          },
          "ssh_public_key": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8192,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Ssh Public Key",
            "description": "Одна строка публичного ключа OpenSSH: Ed25519, RSA или ECDSA. Передаётся сам ключ, а не ID сохранённого ключа. Для Windows не поддерживается."
          },
          "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 не возвращается в заказе или вебхуках. Для Windows не поддерживается."
          }
        },
        "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 — результата нет. Не подтверждает работоспособность приложения."
          },
          "application": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApplicationItem"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Снимок приложения для этой установки или null, если приложения нет. Содержит публичные поля каталога и installer_sha256 — контрольную сумму сохранённого установщика, без его содержимого и реквизитов доступа. В заказе это снимок покупки; в деталях и списке VPS — последняя успешная установка."
          }
        },
        "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": {
            "anyOf": [
              {
                "enum": [
                  "separate",
                  "lvm_linear",
                  "raid0",
                  "raid1"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "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": "Автопродление с баланса интеграции. Изменение флага само по себе не продлевает услугу."
          },
          "disk_layouts": {
            "anyOf": [
              {
                "additionalProperties": {
                  "enum": [
                    "separate",
                    "lvm_linear",
                    "raid0",
                    "raid1",
                    "raid5",
                    "raid6",
                    "raid10"
                  ],
                  "type": "string"
                },
                "maxProperties": 32,
                "minProperties": 1,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Disk Layouts",
            "description": "Передайте ровно один вариант: disk_layout для тарифа с общей разметкой либо disk_layouts для тарифа с группами дисков. disk_layouts — объект, где ключи взяты из disks[].id каталога, а значения — разрешённые коды разметки этих групп. Нужно передать все группы, без лишних ключей. ID непрозрачны: не определяйте их по типу диска. Значения по умолчанию выбирает клиент; API не подставляет их. При повторе заказа сохраните тот же выбор. Для групп HDD доступны RAID 5 (от 3 дисков), RAID 6 (от 4) и RAID 10 (чётное число от 4), если соответствующий код есть в вариантах группы. Для других типов дисков и общей разметки эти варианты недоступны."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "api_user_id",
          "plan_id",
          "os_id"
        ],
        "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!"
        },
        "oneOf": [
          {
            "required": [
              "disk_layout"
            ],
            "properties": {
              "disk_layout": {
                "type": "string"
              }
            }
          },
          {
            "required": [
              "disk_layouts"
            ],
            "properties": {
              "disk_layouts": {
                "type": "object"
              }
            }
          }
        ]
      },
      "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"
          },
          "datacenter": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Datacenter",
            "description": "Название дата-центра локации; null, если не заполнено."
          },
          "os": {
            "type": "string",
            "title": "Os"
          },
          "hostname": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hostname"
          },
          "disk_layout": {
            "anyOf": [
              {
                "enum": [
                  "separate",
                  "lvm_linear",
                  "raid0",
                  "raid1"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "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"
          },
          "disk_layouts": {
            "anyOf": [
              {
                "additionalProperties": {
                  "enum": [
                    "separate",
                    "lvm_linear",
                    "raid0",
                    "raid1",
                    "raid5",
                    "raid6",
                    "raid10"
                  ],
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Disk Layouts",
            "description": "Сохранённый выбор по ID групп из plan.disks. null для общей разметки."
          }
        },
        "type": "object",
        "required": [
          "id",
          "api_user_id",
          "order_id",
          "status",
          "plan",
          "location_id",
          "location_name",
          "country_code",
          "datacenter",
          "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"
          },
          "datacenter": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Datacenter",
            "description": "Название дата-центра локации; null, если не заполнено."
          },
          "os": {
            "type": "string",
            "title": "Os"
          },
          "hostname": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hostname"
          },
          "disk_layout": {
            "anyOf": [
              {
                "enum": [
                  "separate",
                  "lvm_linear",
                  "raid0",
                  "raid1"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "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"
          },
          "disk_layouts": {
            "anyOf": [
              {
                "additionalProperties": {
                  "enum": [
                    "separate",
                    "lvm_linear",
                    "raid0",
                    "raid1",
                    "raid5",
                    "raid6",
                    "raid10"
                  ],
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Disk Layouts",
            "description": "Сохранённый выбор по ID групп из plan.disks. null для общей разметки."
          }
        },
        "type": "object",
        "required": [
          "id",
          "api_user_id",
          "order_id",
          "status",
          "plan",
          "location_id",
          "location_name",
          "country_code",
          "datacenter",
          "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",
              "datacenter": null,
              "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",
            "datacenter": null,
            "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": [
              {
                "enum": [
                  "traffic",
                  "bandwidth",
                  "manual"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "bandwidth_limited_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bandwidth Limited Until"
          },
          "manual_limited_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Manual Limited Until"
          }
        },
        "required": [
          "limit_mbps",
          "reason",
          "bandwidth_limited_until"
        ],
        "title": "TrafficShaping",
        "type": "object"
      },
      "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",
              "backup_purchase",
              "backup_renewal",
              "refund",
              "adjustment",
              "mail_purchase",
              "mail_renewal",
              "mail_upgrade"
            ],
            "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": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9.223372036854776e+18,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Id",
            "description": "ID операционной системы из GET /reference/os. Обязателен при обычной установке; не передавайте с backup_id."
          },
          "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",
            "description": "Необязательный hostname. Если поле отсутствует или равно null, сервис серверов назначит vm-{vm_id} по ID виртуалки, а не заказа. Переданное имя сохраняется. Для Windows: максимум 15 символов, не только цифры."
          },
          "password": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Password",
            "description": "Пароль доступа. Нельзя передавать вместе с ssh_public_key. Для установки Windows: 8–127 символов, минимум три категории (строчные, заглавные, цифры, специальные), без CR/LF/NUL и имени пользователя внутри пароля.",
            "writeOnly": true
          },
          "ssh_public_key": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8192,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Ssh Public Key",
            "description": "Одна строка публичного ключа OpenSSH: Ed25519, RSA или ECDSA. Передаётся сам ключ, а не ID сохранённого ключа. Для Windows не поддерживается."
          },
          "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 не возвращается в заказе или вебхуках. Для Windows не поддерживается."
          },
          "application_id": {
            "anyOf": [
              {
                "maximum": 9223372036854775807,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Application Id",
            "description": "Необязательный application_id выбирает приложение из GET /reference/applications. os_id и ровно один способ доступа остаются обязательными. Нельзя сочетать application_id с ненулевым cloud_init, включая {}. Доступность приложения, совместимость ОС и ресурсов проверяет сервис серверов при создании; Cloud API эти проверки не дублирует. При отклонении создания действует существующий возврат оплаты заказа. Расчёт цены определяет только стоимость VPS и не подтверждает совместимость приложения. Отдельной доплаты за приложение нет. При повторе с тем же Idempotency-Key сохраняйте application_id. Для Windows не поддерживается."
          },
          "backup_id": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9.223372036854776e+18,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Backup Id",
            "description": "Для новой VPS из оплаченного бекапа передайте backup_id вместо os_id. Не передавайте password, ssh_public_key, application_id и cloud_init: ОС, программы и доступы берутся из копии. api_user_id должен совпадать с владельцем бекапа. Новая VPS получает собственные адреса и оплачивается обычным заказом vm_purchase с наценкой тарифа и скидкой за срок. За восстановление отдельной платы нет; действует общий лимит 3 восстановления на услугу за 24 часа. Выбранный диск должен вместить все диски копии; совместимость проверяет сервис серверов."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "api_user_id",
          "location_id",
          "platform",
          "plan_code"
        ],
        "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": "AMD EPYC 7502P",
            "location_id": 1,
            "location_name": "Poland",
            "country_code": "PL",
            "datacenter": null,
            "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
            },
            "cpu_max_frequency_ghz": 3.35
          }
        }
      },
      "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": "Автопродление с баланса интеграции. Изменение флага само по себе не продлевает услугу."
          },
          "months": {
            "type": "integer",
            "enum": [
              1,
              3,
              6,
              12,
              24,
              36
            ],
            "default": 1,
            "description": "Календарные месяцы: 1, 3, 6, 12, 24 или 36. По умолчанию 1. Срок IP не зависит от срока VPS."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id"
        ],
        "title": "VmIpv4PurchaseBody",
        "example": {
          "api_key_id": 1,
          "auto_renew": false,
          "months": 1
        }
      },
      "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": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "epyc",
                  "ryzen",
                  "xeon"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Platform",
            "description": "Семейство CPU текущей ноды; null, если не заполнено."
          },
          "cpu_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Display Name",
            "description": "Модель физического CPU текущей ноды в сохранённом виде; null, если неизвестна. Число ядер/потоков в этой строке относится к физическому процессору, а не выделенным vCPU."
          },
          "location_id": {
            "type": "integer",
            "title": "Location Id"
          },
          "location_name": {
            "type": "string",
            "title": "Location Name"
          },
          "country_code": {
            "type": "string",
            "title": "Country Code"
          },
          "datacenter": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Datacenter",
            "description": "Название дата-центра локации; null, если не заполнено."
          },
          "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 — результата нет. Не подтверждает работоспособность приложения."
          },
          "application": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApplicationItem"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Снимок приложения для этой установки или null, если приложения нет. Содержит публичные поля каталога и installer_sha256 — контрольную сумму сохранённого установщика, без его содержимого и реквизитов доступа. В заказе это снимок покупки; в деталях и списке VPS — последняя успешная установка."
          },
          "login": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Login",
            "description": "login — фактический пользователь установки, обычно admin для Windows или root для Linux; null означает, что логин неизвестен. Пароли не возвращаются."
          },
          "cpu_max_frequency_ghz": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Max Frequency Ghz",
            "description": "Максимальная частота физического CPU текущей ноды в ГГц; null, если неизвестна. Не текущая или гарантированная частота vCPU."
          },
          "admin_blocked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Дата административной блокировки в UTC; null — запрета нет."
          },
          "admin_block_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Причина блокировки для клиента, либо 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",
          "datacenter",
          "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"
          },
          "datacenter": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Datacenter",
            "description": "Название дата-центра локации; null, если не заполнено."
          },
          "platform": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "epyc",
                  "ryzen",
                  "xeon"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Platform",
            "description": "Семейство CPU текущей ноды; null, если не заполнено."
          },
          "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": "Автопродление с баланса интеграции. Изменение флага само по себе не продлевает услугу."
          },
          "application": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApplicationItem"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Снимок приложения для этой установки или null, если приложения нет. Содержит публичные поля каталога и installer_sha256 — контрольную сумму сохранённого установщика, без его содержимого и реквизитов доступа. В заказе это снимок покупки; в деталях и списке VPS — последняя успешная установка."
          },
          "cpu_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Display Name",
            "description": "Модель физического CPU текущей ноды в сохранённом виде; null, если неизвестна. Число ядер/потоков в этой строке относится к физическому процессору, а не выделенным vCPU."
          },
          "cpu_max_frequency_ghz": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Max Frequency Ghz",
            "description": "Максимальная частота физического CPU текущей ноды в ГГц; null, если неизвестна. Не текущая или гарантированная частота vCPU."
          },
          "admin_blocked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Дата административной блокировки в UTC; null — запрета нет."
          },
          "admin_block_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Причина блокировки для клиента, либо null."
          },
          "city": {
            "type": "string",
            "description": "Город размещения сервера."
          },
          "os_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Код текущей ОС; учитывает успешную переустановку и восстановление."
          },
          "primary_ipv4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Основной IPv4 из выделений адресов, либо null."
          }
        },
        "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",
          "datacenter",
          "platform",
          "ips",
          "paid_until",
          "auto_renew",
          "cpu_display_name",
          "cpu_max_frequency_ghz",
          "city",
          "os_code",
          "primary_ipv4"
        ],
        "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",
              "datacenter": null,
              "platform": "epyc",
              "ips": [
                "example"
              ],
              "paid_until": null,
              "auto_renew": false,
              "cpu_display_name": "AMD EPYC 7502P",
              "cpu_max_frequency_ghz": 3.35
            }
          ],
          "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",
              "firewall_smtp",
              "password_reset",
              "reinstall",
              "rescue_enable",
              "rescue_disable",
              "admin_block",
              "admin_unblock"
            ],
            "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",
            "description": "Код ошибки. vm_admin_blocked — действие запрещено административной блокировкой; обратитесь в поддержку."
          },
          "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",
            "description": "Код ошибки. vm_admin_blocked — действие запрещено административной блокировкой; обратитесь в поддержку."
          },
          "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",
              "months",
              "monthly_price_usd"
            ],
            "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"
              },
              "months": {
                "type": "integer",
                "enum": [
                  1,
                  3,
                  6,
                  12,
                  24,
                  36
                ],
                "description": "Календарные месяцы: 1, 3, 6, 12, 24 или 36. По умолчанию 1. Срок IP не зависит от срока VPS."
              },
              "monthly_price_usd": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{4}$",
                "description": "Фиксированная месячная ставка IPv4 в USD, без наценки и скидки."
              }
            }
          }
        },
        "example": {
          "success": true,
          "data": {
            "amount_usd": "5.0000",
            "balance_usd": "100.0000",
            "currency": "USD",
            "vm_id": 101,
            "months": 1,
            "monthly_price_usd": "5.0000"
          }
        }
      },
      "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"
          }
        }
      },
      "DedicatedLayout": {
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "separate",
              "lvm_linear",
              "raid0",
              "raid1"
            ],
            "title": "Code",
            "description": "Код для disk_layout или значения в disk_layouts при покупке и расчёте."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Название для отображения, например No Raid."
          }
        },
        "type": "object",
        "required": [
          "code",
          "name"
        ],
        "title": "DedicatedLayout"
      },
      "RentalPowerStatusResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/RentalPowerStatus"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "RentalPowerStatusResponse",
        "example": {
          "success": true,
          "data": {
            "rental_id": 201,
            "power_state": "On",
            "power_actions": [
              "start",
              "shutdown",
              "stop",
              "reset"
            ],
            "reinstall": true
          }
        }
      },
      "RentalPowerStatus": {
        "properties": {
          "rental_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Rental Id"
          },
          "power_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Power State"
          },
          "power_actions": {
            "items": {
              "type": "string",
              "enum": [
                "start",
                "shutdown",
                "stop",
                "reboot",
                "reset"
              ]
            },
            "type": "array",
            "title": "Power Actions"
          },
          "reinstall": {
            "type": "boolean",
            "title": "Reinstall"
          }
        },
        "type": "object",
        "required": [
          "rental_id",
          "power_state",
          "power_actions",
          "reinstall"
        ],
        "title": "RentalPowerStatus"
      },
      "RentalPowerBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id"
          },
          "action": {
            "type": "string",
            "enum": [
              "start",
              "shutdown",
              "reboot",
              "stop",
              "reset"
            ],
            "title": "Action"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "action"
        ],
        "title": "RentalPowerBody",
        "example": {
          "api_key_id": 1,
          "action": "start"
        }
      },
      "RentalOperationResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/RentalOperation"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "RentalOperationResponse",
        "example": {
          "success": true,
          "data": {
            "id": 301,
            "rental_id": 201,
            "action": "dedicated_power",
            "status": "succeeded",
            "created_at": "2026-10-04T12:00:00Z",
            "started_at": "2026-10-04T12:00:01Z",
            "finished_at": "2026-10-04T12:00:05Z",
            "result": {
              "power_state": "On",
              "changed": true,
              "power_action": "start"
            },
            "requires_review": false,
            "review_resolved_at": null,
            "error_code": null,
            "error_message": null
          }
        }
      },
      "RentalOperation": {
        "properties": {
          "id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Id"
          },
          "rental_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Rental Id"
          },
          "action": {
            "type": "string",
            "enum": [
              "dedicated_power",
              "dedicated_reinstall"
            ],
            "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"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RentalPowerResult"
              },
              {
                "$ref": "#/components/schemas/RentalReinstallResult"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "requires_review": {
            "type": "boolean",
            "title": "Requires Review",
            "default": false
          },
          "review_resolved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Review Resolved At"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          }
        },
        "type": "object",
        "required": [
          "id",
          "rental_id",
          "action",
          "status",
          "created_at",
          "started_at",
          "finished_at"
        ],
        "title": "RentalOperation"
      },
      "RentalPowerResult": {
        "properties": {
          "power_state": {
            "type": "string",
            "title": "Power State"
          },
          "changed": {
            "type": "boolean",
            "title": "Changed"
          },
          "power_action": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "start",
                  "shutdown",
                  "reboot",
                  "stop",
                  "reset"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Power Action"
          }
        },
        "type": "object",
        "required": [
          "power_state",
          "changed"
        ],
        "title": "RentalPowerResult"
      },
      "RentalReinstallResult": {
        "properties": {
          "os": {
            "type": "string",
            "title": "Os"
          },
          "verified": {
            "type": "boolean",
            "const": true,
            "title": "Verified"
          }
        },
        "type": "object",
        "required": [
          "os",
          "verified"
        ],
        "title": "RentalReinstallResult"
      },
      "RentalReinstallBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id"
          },
          "os_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Os Id"
          },
          "confirmed": {
            "type": "boolean",
            "const": true,
            "title": "Confirmed"
          },
          "password": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Password"
          },
          "ssh_public_key": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8192,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Ssh Public Key"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "os_id",
          "confirmed"
        ],
        "title": "RentalReinstallBody",
        "example": {
          "api_key_id": 1,
          "os_id": 11,
          "confirmed": true
        }
      },
      "RentalOperationListResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/RentalOperation"
            },
            "type": "array",
            "title": "Data"
          },
          "total_count": {
            "type": "integer",
            "title": "Total Count"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data",
          "total_count"
        ],
        "title": "RentalOperationListResponse",
        "example": {
          "success": true,
          "data": [
            {
              "id": 301,
              "rental_id": 201,
              "action": "dedicated_power",
              "status": "queued",
              "created_at": "2026-10-04T12:00:00Z",
              "started_at": null,
              "finished_at": null,
              "result": null,
              "requires_review": false,
              "review_resolved_at": null,
              "error_code": null,
              "error_message": null
            }
          ],
          "total_count": 1
        }
      },
      "DedicatedPlanDisk": {
        "properties": {
          "count": {
            "minimum": 1,
            "title": "Count",
            "type": "integer"
          },
          "size_gb": {
            "minimum": 1,
            "title": "Size Gb",
            "type": "integer"
          },
          "type": {
            "title": "Type",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Model"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Id",
            "description": "Непрозрачный ID группы; null у тарифа с общей разметкой."
          },
          "disk_layouts": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/DedicatedGroupLayout"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Disk Layouts",
            "description": "Варианты группы: показывайте name, передавайте code."
          },
          "default_disk_layout": {
            "anyOf": [
              {
                "enum": [
                  "separate",
                  "lvm_linear",
                  "raid0",
                  "raid1",
                  "raid5",
                  "raid6",
                  "raid10"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Default Disk Layout"
          }
        },
        "required": [
          "count",
          "size_gb",
          "type"
        ],
        "title": "DedicatedPlanDisk",
        "type": "object"
      },
      "DedicatedGroupLayout": {
        "properties": {
          "code": {
            "enum": [
              "separate",
              "lvm_linear",
              "raid0",
              "raid1",
              "raid5",
              "raid6",
              "raid10"
            ],
            "title": "Code",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "code",
          "name"
        ],
        "title": "DedicatedGroupLayout",
        "type": "object"
      },
      "LocationUptime": {
        "properties": {
          "location_id": {
            "type": "integer",
            "maximum": 9223372036854775807,
            "minimum": 1,
            "title": "Location Id",
            "description": "ID локации."
          },
          "location_name": {
            "type": "string",
            "title": "Location Name",
            "description": "Название локации."
          },
          "uptime_percent": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 100.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Uptime Percent",
            "description": "Средний аптайм наблюдаемых нод локации, в процентах; null без наблюдений."
          },
          "coverage_percent": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 100.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Coverage Percent",
            "description": "Доля времени с наблюдениями up/down, в процентах. Пропуски, обслуживание и ошибки монитора не считаются подтверждённым простоем."
          },
          "days": {
            "$ref": "#/components/schemas/UptimeDays",
            "description": "Период в днях: 1, 14, 30 или 90."
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "title": "From",
            "description": "Начало интервала в UTC, ISO 8601."
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "title": "To",
            "description": "Конец интервала в UTC, ISO 8601."
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/UptimePoint"
            },
            "type": "array",
            "title": "Points",
            "description": "Точки по часам для 1 дня, по дням UTC для 14/30/90 дней. Крайние интервалы обрезаны границами скользящего окна."
          }
        },
        "type": "object",
        "required": [
          "location_id",
          "location_name",
          "uptime_percent",
          "coverage_percent",
          "days",
          "from",
          "to",
          "points"
        ],
        "title": "LocationUptime"
      },
      "LocationUptimeResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/LocationUptime"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "LocationUptimeResponse",
        "example": {
          "success": true,
          "data": {
            "location_id": 1,
            "location_name": "US — Fremont",
            "uptime_percent": 99.8,
            "coverage_percent": 100,
            "days": 1,
            "from": "2026-10-11T00:00:00Z",
            "to": "2026-10-12T00:00:00Z",
            "points": [
              {
                "from": "2026-10-11T00:00:00Z",
                "to": "2026-10-11T01:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T01:00:00Z",
                "to": "2026-10-11T02:00:00Z",
                "uptime_percent": 95.2,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T02:00:00Z",
                "to": "2026-10-11T03:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T03:00:00Z",
                "to": "2026-10-11T04:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T04:00:00Z",
                "to": "2026-10-11T05:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T05:00:00Z",
                "to": "2026-10-11T06:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T06:00:00Z",
                "to": "2026-10-11T07:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T07:00:00Z",
                "to": "2026-10-11T08:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T08:00:00Z",
                "to": "2026-10-11T09:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T09:00:00Z",
                "to": "2026-10-11T10:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T10:00:00Z",
                "to": "2026-10-11T11:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T11:00:00Z",
                "to": "2026-10-11T12:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T12:00:00Z",
                "to": "2026-10-11T13:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T13:00:00Z",
                "to": "2026-10-11T14:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T14:00:00Z",
                "to": "2026-10-11T15:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T15:00:00Z",
                "to": "2026-10-11T16:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T16:00:00Z",
                "to": "2026-10-11T17:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T17:00:00Z",
                "to": "2026-10-11T18:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T18:00:00Z",
                "to": "2026-10-11T19:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T19:00:00Z",
                "to": "2026-10-11T20:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T20:00:00Z",
                "to": "2026-10-11T21:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T21:00:00Z",
                "to": "2026-10-11T22:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T22:00:00Z",
                "to": "2026-10-11T23:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              },
              {
                "from": "2026-10-11T23:00:00Z",
                "to": "2026-10-12T00:00:00Z",
                "uptime_percent": 100,
                "coverage_percent": 100
              }
            ]
          }
        }
      },
      "LocationUptimeSummary": {
        "properties": {
          "location_id": {
            "type": "integer",
            "maximum": 9223372036854775807,
            "minimum": 1,
            "title": "Location Id",
            "description": "ID локации."
          },
          "location_name": {
            "type": "string",
            "title": "Location Name",
            "description": "Название локации."
          },
          "uptime_percent": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 100.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Uptime Percent",
            "description": "Средний аптайм наблюдаемых нод локации, в процентах; null без наблюдений."
          },
          "coverage_percent": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 100.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Coverage Percent",
            "description": "Доля времени с наблюдениями up/down, в процентах. Пропуски, обслуживание и ошибки монитора не считаются подтверждённым простоем."
          }
        },
        "type": "object",
        "required": [
          "location_id",
          "location_name",
          "uptime_percent",
          "coverage_percent"
        ],
        "title": "LocationUptimeSummary"
      },
      "LocationsUptime": {
        "properties": {
          "days": {
            "$ref": "#/components/schemas/UptimeDays",
            "description": "Период в днях: 1, 14, 30 или 90."
          },
          "locations": {
            "items": {
              "$ref": "#/components/schemas/LocationUptimeSummary"
            },
            "type": "array",
            "title": "Locations"
          }
        },
        "type": "object",
        "required": [
          "days",
          "locations"
        ],
        "title": "LocationsUptime"
      },
      "LocationsUptimeResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/LocationsUptime"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "LocationsUptimeResponse",
        "example": {
          "success": true,
          "data": {
            "days": 1,
            "locations": [
              {
                "location_id": 1,
                "location_name": "US — Fremont",
                "uptime_percent": 99.8,
                "coverage_percent": 100
              },
              {
                "location_id": 3,
                "location_name": "PL — Gdańsk",
                "uptime_percent": null,
                "coverage_percent": 0
              }
            ]
          }
        }
      },
      "UptimeDays": {
        "type": "integer",
        "enum": [
          1,
          14,
          30,
          90
        ],
        "title": "UptimeDays"
      },
      "UptimePoint": {
        "properties": {
          "from": {
            "type": "string",
            "format": "date-time",
            "title": "From",
            "description": "Начало интервала в UTC, ISO 8601."
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "title": "To",
            "description": "Конец интервала в UTC, ISO 8601."
          },
          "uptime_percent": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 100.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Uptime Percent",
            "description": "Средний аптайм наблюдаемых нод локации, в процентах; null без наблюдений."
          },
          "coverage_percent": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 100.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Coverage Percent",
            "description": "Доля времени с наблюдениями up/down, в процентах. Пропуски, обслуживание и ошибки монитора не считаются подтверждённым простоем."
          }
        },
        "type": "object",
        "required": [
          "from",
          "to",
          "uptime_percent",
          "coverage_percent"
        ],
        "title": "UptimePoint"
      },
      "VmTrafficDay": {
        "properties": {
          "day": {
            "format": "date",
            "title": "Day",
            "type": "string",
            "description": "Дата в UTC."
          },
          "incoming_bytes": {
            "minimum": 0,
            "title": "Incoming Bytes",
            "type": "integer",
            "description": "Входящий трафик за день, байты."
          },
          "outgoing_bytes": {
            "minimum": 0,
            "title": "Outgoing Bytes",
            "type": "integer",
            "description": "Исходящий трафик за день, байты."
          },
          "estimated": {
            "title": "Estimated",
            "type": "boolean",
            "description": "Расход распределён между днями пропорционально времени."
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string",
            "description": "Последнее обновление дня, UTC."
          }
        },
        "required": [
          "day",
          "incoming_bytes",
          "outgoing_bytes",
          "estimated",
          "updated_at"
        ],
        "title": "VmTrafficDay",
        "type": "object"
      },
      "VmTrafficHistory": {
        "properties": {
          "vm_id": {
            "title": "Vm Id",
            "type": "integer"
          },
          "days": {
            "items": {
              "$ref": "#/components/schemas/VmTrafficDay"
            },
            "title": "Days",
            "type": "array"
          }
        },
        "required": [
          "vm_id",
          "days"
        ],
        "title": "VmTrafficHistory",
        "type": "object"
      },
      "VmTrafficHistoryResponse": {
        "properties": {
          "success": {
            "title": "Success",
            "type": "boolean"
          },
          "data": {
            "$ref": "#/components/schemas/VmTrafficHistory"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "title": "VmTrafficHistoryResponse",
        "type": "object",
        "example": {
          "success": true,
          "data": {
            "vm_id": 101,
            "days": [
              {
                "day": "2026-10-11",
                "incoming_bytes": 1048576,
                "outgoing_bytes": 2097152,
                "estimated": false,
                "updated_at": "2026-10-11T23:59:00Z"
              },
              {
                "day": "2026-10-12",
                "incoming_bytes": 524288,
                "outgoing_bytes": 1048576,
                "estimated": true,
                "updated_at": "2026-10-12T01:00:00Z"
              }
            ]
          }
        }
      },
      "OrderQueue": {
        "properties": {
          "location_id": {
            "title": "Location Id",
            "type": "integer"
          },
          "platform": {
            "enum": [
              "epyc",
              "ryzen",
              "xeon"
            ],
            "title": "Platform",
            "type": "string"
          },
          "waiting": {
            "minimum": 0,
            "title": "Waiting",
            "type": "integer",
            "description": "Общее количество ожидающих заказов; кеш до 5 секунд."
          },
          "order_id": {
            "title": "Order Id",
            "type": "integer"
          },
          "operation_id": {
            "title": "Operation Id",
            "type": "integer"
          },
          "status": {
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed",
              "cancelled"
            ],
            "title": "Status",
            "type": "string",
            "description": "Статус операции выдачи, не финансового заказа."
          },
          "position": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position",
            "description": "Место среди ожидающих либо null вне очереди; не обещание порядка выдачи."
          },
          "reason": {
            "anyOf": [
              {
                "enum": [
                  "node_busy",
                  "node_unavailable",
                  "ip_pool_exhausted",
                  "network_pool_empty"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "can_cancel": {
            "title": "Can Cancel",
            "type": "boolean",
            "description": "Возможность отмены на момент чтения."
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string",
            "description": "Дата создания операции в UTC."
          }
        },
        "required": [
          "location_id",
          "platform",
          "waiting",
          "order_id",
          "operation_id",
          "status",
          "position",
          "reason",
          "can_cancel",
          "created_at"
        ],
        "title": "OrderQueue",
        "type": "object"
      },
      "OrderQueueResponse": {
        "properties": {
          "success": {
            "title": "Success",
            "type": "boolean"
          },
          "data": {
            "$ref": "#/components/schemas/OrderQueue"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "title": "OrderQueueResponse",
        "type": "object",
        "example": {
          "success": true,
          "data": {
            "order_id": 42,
            "operation_id": 501,
            "status": "queued",
            "location_id": 3,
            "platform": "epyc",
            "waiting": 4,
            "position": 2,
            "reason": "node_unavailable",
            "can_cancel": true,
            "created_at": "2026-10-12T08:00:00Z"
          }
        }
      },
      "VmQueueCount": {
        "properties": {
          "location_id": {
            "title": "Location Id",
            "type": "integer"
          },
          "platform": {
            "enum": [
              "epyc",
              "ryzen",
              "xeon"
            ],
            "title": "Platform",
            "type": "string"
          },
          "waiting": {
            "minimum": 0,
            "title": "Waiting",
            "type": "integer",
            "description": "Общее количество ожидающих заказов; кеш до 5 секунд."
          }
        },
        "required": [
          "location_id",
          "platform",
          "waiting"
        ],
        "title": "VmQueueCount",
        "type": "object"
      },
      "VmQueueCountResponse": {
        "properties": {
          "success": {
            "title": "Success",
            "type": "boolean"
          },
          "data": {
            "$ref": "#/components/schemas/VmQueueCount"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "title": "VmQueueCountResponse",
        "type": "object",
        "example": {
          "success": true,
          "data": {
            "location_id": 3,
            "platform": "epyc",
            "waiting": 4
          }
        }
      },
      "ApplicationItem": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "app_code": {
            "title": "App Code",
            "type": "string"
          },
          "category": {
            "title": "Category",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "variant": {
            "title": "Variant",
            "type": "string"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "logo_url": {
            "title": "Logo Url",
            "type": "string"
          },
          "documentation_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Documentation Url"
          },
          "supported_os": {
            "items": {
              "type": "string"
            },
            "title": "Supported Os",
            "type": "array"
          },
          "recommended_os": {
            "title": "Recommended Os",
            "type": "string"
          },
          "min_cpu_cores": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Cpu Cores"
          },
          "min_ram_mb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Ram Mb"
          },
          "min_disk_gb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Disk Gb"
          },
          "recommended_cpu_cores": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recommended Cpu Cores"
          },
          "recommended_ram_mb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recommended Ram Mb"
          },
          "recommended_disk_gb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recommended Disk Gb"
          },
          "requirements_source_urls": {
            "items": {
              "type": "string"
            },
            "title": "Requirements Source Urls",
            "type": "array"
          },
          "installation_mode": {
            "default": "cloud_init",
            "enum": [
              "cloud_init",
              "background"
            ],
            "title": "Installation Mode",
            "type": "string",
            "description": "cloud_init: установка в cloud-init; background: установка продолжается после выдачи VPS."
          },
          "installer_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Installer Sha256",
            "description": "Контрольная сумма установщика в снимке установки; в каталоге поле отсутствует."
          }
        },
        "required": [
          "id",
          "app_code",
          "category",
          "name",
          "variant",
          "version",
          "logo_url",
          "documentation_url",
          "supported_os",
          "recommended_os",
          "min_cpu_cores",
          "min_ram_mb",
          "min_disk_gb",
          "recommended_cpu_cores",
          "recommended_ram_mb",
          "recommended_disk_gb",
          "requirements_source_urls"
        ],
        "title": "ApplicationItem",
        "type": "object",
        "description": "Снимок приложения для этой установки или null, если приложения нет. Содержит публичные поля каталога и installer_sha256 — контрольную сумму сохранённого установщика, без его содержимого и реквизитов доступа. В заказе это снимок покупки; в деталях и списке VPS — последняя успешная установка.",
        "example": {
          "id": 1,
          "app_code": "wordpress",
          "category": "websites",
          "name": "WordPress",
          "variant": "",
          "version": null,
          "logo_url": "https://cdn.example.com/app/wordpress.svg",
          "documentation_url": null,
          "supported_os": [
            "ubuntu-24.04"
          ],
          "recommended_os": "ubuntu-24.04",
          "min_cpu_cores": 1,
          "min_ram_mb": 1024,
          "min_disk_gb": 20,
          "recommended_cpu_cores": 2,
          "recommended_ram_mb": 2048,
          "recommended_disk_gb": 40,
          "requirements_source_urls": [],
          "installation_mode": "cloud_init"
        }
      },
      "ApplicationsResponse": {
        "properties": {
          "success": {
            "default": true,
            "title": "Success",
            "type": "boolean"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/ApplicationItem"
            },
            "title": "Data",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "data",
          "total"
        ],
        "title": "ApplicationsResponse",
        "type": "object",
        "example": {
          "success": true,
          "data": [
            {
              "id": 1,
              "app_code": "wordpress",
              "category": "websites",
              "name": "WordPress",
              "variant": "",
              "version": null,
              "logo_url": "https://cdn.example.com/app/wordpress.svg",
              "documentation_url": null,
              "supported_os": [
                "ubuntu-24.04"
              ],
              "recommended_os": "ubuntu-24.04",
              "min_cpu_cores": 1,
              "min_ram_mb": 1024,
              "min_disk_gb": 20,
              "recommended_cpu_cores": 2,
              "recommended_ram_mb": 2048,
              "recommended_disk_gb": 40,
              "requirements_source_urls": [],
              "installation_mode": "cloud_init"
            }
          ],
          "total": 1
        }
      },
      "VmNodeUptime": {
        "properties": {
          "vm_id": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Vm Id"
          },
          "days": {
            "$ref": "#/components/schemas/UptimeDays"
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "title": "From"
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "title": "To"
          },
          "uptime_percent": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 100.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Uptime Percent"
          },
          "coverage_percent": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 100.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Coverage Percent"
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/UptimePoint"
            },
            "type": "array",
            "title": "Points"
          }
        },
        "type": "object",
        "required": [
          "vm_id",
          "days",
          "from",
          "to",
          "uptime_percent",
          "coverage_percent",
          "points"
        ],
        "title": "VmNodeUptime"
      },
      "VmNodeUptimeResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/VmNodeUptime"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "VmNodeUptimeResponse"
      },
      "Backup": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "service_id": {
            "type": "integer",
            "title": "Service Id"
          },
          "kind": {
            "type": "string",
            "enum": [
              "automatic",
              "manual"
            ],
            "title": "Kind"
          },
          "source_vm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Vm Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "logical_size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logical Size Bytes"
          },
          "stored_size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stored Size Bytes",
            "description": "Размер хранения в байтах: сжатые уникальные блоки бекапа. Используется для расчёта стоимости хранения ручной копии; это не размер архива для скачивания."
          },
          "vm_config": {
            "$ref": "#/components/schemas/BackupConfiguration"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "service_id",
          "kind",
          "source_vm_id",
          "status",
          "logical_size_bytes",
          "stored_size_bytes",
          "vm_config",
          "created_at",
          "completed_at",
          "deleted_at"
        ],
        "title": "Backup"
      },
      "BackupAutoRenewBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id"
          },
          "auto_renew": {
            "type": "boolean",
            "title": "Auto Renew"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "auto_renew"
        ],
        "title": "BackupAutoRenewBody"
      },
      "BackupConfiguration": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "os": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os"
          },
          "cpu_cores": {
            "type": "integer",
            "title": "Cpu Cores"
          },
          "ram_mb": {
            "type": "integer",
            "title": "Ram Mb"
          },
          "disks": {
            "items": {
              "$ref": "#/components/schemas/BackupDisk"
            },
            "type": "array",
            "title": "Disks"
          }
        },
        "type": "object",
        "required": [
          "name",
          "cpu_cores",
          "ram_mb",
          "disks"
        ],
        "title": "BackupConfiguration"
      },
      "BackupCreateBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id"
          },
          "vm_id": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Vm Id"
          },
          "kind": {
            "type": "string",
            "enum": [
              "automatic",
              "manual"
            ],
            "title": "Kind"
          },
          "auto_renew": {
            "type": "boolean",
            "title": "Auto Renew",
            "default": false
          },
          "expected_amount_usd": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,11}\\.\\d{4}$"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Подтверждённая сумма. Изменение цены возвращает 409 price_changed."
          },
          "expected_manual_rate_usd": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,11}\\.\\d{6}$"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Подтверждённая ставка ручного хранения за GiB в месяц. Изменение возвращает 409 price_changed."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "vm_id",
          "kind"
        ],
        "title": "BackupCreateBody"
      },
      "BackupDisk": {
        "properties": {
          "device": {
            "type": "string",
            "title": "Device"
          },
          "size_gb": {
            "type": "integer",
            "title": "Size Gb"
          },
          "purpose": {
            "type": "string",
            "title": "Purpose"
          }
        },
        "type": "object",
        "required": [
          "device",
          "size_gb",
          "purpose"
        ],
        "title": "BackupDisk"
      },
      "BackupEstimate": {
        "properties": {
          "vm_id": {
            "type": "integer",
            "title": "Vm Id"
          },
          "provisioned_size_bytes": {
            "type": "integer",
            "title": "Provisioned Size Bytes"
          },
          "guest_used_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guest Used Bytes"
          },
          "stored_size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stored Size Bytes"
          },
          "exact_size_available_after_backup": {
            "type": "boolean",
            "const": true,
            "title": "Exact Size Available After Backup"
          }
        },
        "type": "object",
        "required": [
          "vm_id",
          "provisioned_size_bytes",
          "guest_used_bytes",
          "stored_size_bytes",
          "exact_size_available_after_backup"
        ],
        "title": "BackupEstimate"
      },
      "BackupEstimateResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/BackupEstimate"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "BackupEstimateResponse"
      },
      "BackupExport": {
        "properties": {
          "operation_id": {
            "type": "integer",
            "title": "Operation Id"
          },
          "backup_id": {
            "type": "integer",
            "title": "Backup Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "ready",
              "failed",
              "expired"
            ],
            "title": "Status"
          },
          "size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Bytes",
            "description": "Размер скачивания в байтах: отдельно сформированный ZIP-архив. Может отличаться от stored_size_bytes, поскольку при экспорте образ диска восстанавливается и сжимается заново."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "download_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Download Url"
          },
          "download_expires_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Download Expires At"
          }
        },
        "type": "object",
        "required": [
          "operation_id",
          "backup_id",
          "status",
          "size_bytes",
          "created_at",
          "completed_at",
          "expires_at"
        ],
        "title": "BackupExport"
      },
      "BackupExportResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/BackupExport"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "BackupExportResponse"
      },
      "BackupOperation": {
        "properties": {
          "operation_id": {
            "type": "integer",
            "title": "Operation Id"
          },
          "backup_service_id": {
            "type": "integer",
            "title": "Backup Service Id"
          },
          "action": {
            "type": "string",
            "title": "Action"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BackupOperationResult"
              },
              {
                "type": "null"
              }
            ]
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code",
            "description": "Код ошибки. vm_admin_blocked — действие запрещено административной блокировкой; обратитесь в поддержку."
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          }
        },
        "type": "object",
        "required": [
          "operation_id",
          "backup_service_id",
          "action",
          "status",
          "created_at",
          "finished_at",
          "result",
          "error_code",
          "error_message"
        ],
        "title": "BackupOperation"
      },
      "BackupOperationResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/BackupOperation"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "BackupOperationResponse"
      },
      "BackupOperationResult": {
        "properties": {
          "backup_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Backup Id"
          },
          "backup_service_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Backup Service Id"
          },
          "vm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Id"
          },
          "target_vm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Vm Id"
          },
          "requires_review": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requires Review"
          },
          "paid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid Until"
          },
          "stored_size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stored Size Bytes"
          },
          "logical_size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logical Size Bytes"
          }
        },
        "type": "object",
        "title": "BackupOperationResult"
      },
      "BackupResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/Backup"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "BackupResponse"
      },
      "BackupRestoreInput": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id"
          },
          "vm_id": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Vm Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "vm_id"
        ],
        "title": "BackupRestoreInput"
      },
      "BackupService": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "api_user_id": {
            "type": "string",
            "title": "Api User Id"
          },
          "kind": {
            "type": "string",
            "enum": [
              "automatic",
              "manual"
            ],
            "title": "Kind"
          },
          "service_type": {
            "type": "string",
            "title": "Service Type"
          },
          "source_vm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Vm Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "auto_renew": {
            "type": "boolean",
            "title": "Auto Renew"
          },
          "paid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid Until"
          },
          "delete_after": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delete After"
          },
          "activated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activated At"
          },
          "next_backup_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Backup At"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "api_user_id",
          "kind",
          "service_type",
          "source_vm_id",
          "status",
          "auto_renew",
          "paid_until",
          "delete_after",
          "activated_at",
          "next_backup_at",
          "created_at",
          "deleted_at"
        ],
        "title": "BackupService"
      },
      "BackupServiceResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "$ref": "#/components/schemas/BackupService"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "title": "BackupServiceResponse"
      },
      "BackupServicesResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/BackupService"
            },
            "type": "array",
            "title": "Data"
          },
          "total_count": {
            "type": "integer",
            "title": "Total Count"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data",
          "total_count"
        ],
        "title": "BackupServicesResponse"
      },
      "BackupsResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/Backup"
            },
            "type": "array",
            "title": "Data"
          },
          "total_count": {
            "type": "integer",
            "title": "Total Count"
          }
        },
        "type": "object",
        "required": [
          "success",
          "data",
          "total_count"
        ],
        "title": "BackupsResponse"
      },
      "BackupPaymentBody": {
        "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"
              }
            ],
            "default": null,
            "description": "Подтверждённая сумма. Изменение цены возвращает 409 price_changed."
          },
          "expected_manual_rate_usd": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,11}\\.\\d{6}$"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Подтверждённая ставка ручного хранения за GiB в месяц. Изменение возвращает 409 price_changed."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id"
        ],
        "title": "BackupPaymentBody",
        "example": {
          "api_key_id": 1
        }
      },
      "BackupQuoteResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "amount_usd",
              "balance_usd",
              "currency",
              "months",
              "kind",
              "manual_gb_month_price_usd",
              "exact_size_available_after_backup"
            ],
            "properties": {
              "amount_usd": {
                "type": "string"
              },
              "balance_usd": {
                "type": "string"
              },
              "currency": {
                "type": "string",
                "enum": [
                  "USD"
                ]
              },
              "months": {
                "type": "integer",
                "enum": [
                  1
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "automatic",
                  "manual"
                ]
              },
              "manual_gb_month_price_usd": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "exact_size_available_after_backup": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "IpPurchaseRequest": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id"
          },
          "months": {
            "type": "integer",
            "enum": [
              1,
              3,
              6,
              12,
              24,
              36
            ],
            "title": "Months",
            "default": 1,
            "description": "Срок в календарных месяцах: 1, 3, 6, 12, 24 или 36; по умолчанию 1."
          },
          "expected_amount_usd": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,11}\\.\\d{4}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Amount Usd"
          },
          "api_user_id": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "pattern": "\\S",
            "title": "Api User Id",
            "description": "ID клиента партнёра, которому принадлежит адрес."
          },
          "location_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Location Id",
            "description": "ID локации из GET /plans."
          },
          "auto_renew": {
            "type": "boolean",
            "title": "Auto Renew",
            "default": false,
            "description": "Продлевать на выбранный срок по актуальной цене; по умолчанию false."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "api_user_id",
          "location_id"
        ],
        "title": "IpPurchaseRequest"
      },
      "IpRenewBody": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id"
          },
          "months": {
            "anyOf": [
              {
                "type": "integer",
                "enum": [
                  1,
                  3,
                  6,
                  12,
                  24,
                  36
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Months",
            "description": "Срок в календарных месяцах: 1, 3, 6, 12, 24 или 36. При продлении без months сохраняется последний срок."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id"
        ],
        "title": "IpRenewBody"
      },
      "IpPurchaseQuoteResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "properties": {
              "amount_usd": {
                "type": "string",
                "example": "4.5000"
              },
              "balance_usd": {
                "type": "string",
                "example": "100.0000"
              },
              "currency": {
                "type": "string",
                "enum": [
                  "USD"
                ]
              },
              "location_id": {
                "type": "integer"
              },
              "months": {
                "type": "integer",
                "enum": [
                  1,
                  3,
                  6,
                  12,
                  24,
                  36
                ]
              },
              "monthly_price_usd": {
                "type": "string",
                "example": "1.5000"
              }
            },
            "required": [
              "amount_usd",
              "balance_usd",
              "currency",
              "location_id",
              "months",
              "monthly_price_usd"
            ]
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "AlertItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID алерта"
          },
          "text_ru": {
            "type": "string",
            "description": "Текст на русском"
          },
          "text_en": {
            "type": "string",
            "description": "Текст на английском"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Дата создания в UTC"
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Начало события в UTC или null"
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Окончание события в UTC или null"
          },
          "locations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertLocation"
            },
            "description": "Локации, к которым относится алерт, в порядке location_id. Пустой массив означает отсутствие привязки. Список фиксируется при сохранении: добавленные позже локации не включаются автоматически. Названия и коды стран сохранены для этого алерта и не меняются при переименовании локаций."
          }
        },
        "required": [
          "id",
          "text_ru",
          "text_en",
          "created_at",
          "starts_at",
          "ends_at",
          "locations"
        ],
        "title": "AlertItem"
      },
      "AlertsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "alerts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertItem"
            }
          }
        },
        "required": [
          "success",
          "alerts"
        ],
        "title": "AlertsResponse",
        "example": {
          "success": true,
          "alerts": [
            {
              "id": 1,
              "text_ru": "🇵🇱 Польша: добавлены мощности VPS на AMD Ryzen 9 9950X3D.",
              "text_en": "🇵🇱 Poland: VPS capacity added on AMD Ryzen 9 9950X3D.",
              "created_at": "2026-10-18T10:00:00Z",
              "starts_at": null,
              "ends_at": null,
              "locations": [
                {
                  "location_id": 1,
                  "location_name": "Poland",
                  "country_code": "PL"
                }
              ]
            },
            {
              "id": 2,
              "text_ru": "Плановое обновление нод с перезагрузкой серверов.",
              "text_en": "Scheduled node maintenance with server restarts.",
              "created_at": "2026-10-18T09:00:00Z",
              "starts_at": "2026-10-19T02:00:00Z",
              "ends_at": "2026-10-19T03:00:00Z",
              "locations": [
                {
                  "location_id": 1,
                  "location_name": "Poland",
                  "country_code": "PL"
                },
                {
                  "location_id": 2,
                  "location_name": "Germany",
                  "country_code": "DE"
                }
              ]
            }
          ]
        }
      },
      "MailMailbox": {
        "type": "object",
        "required": [
          "id",
          "account_id",
          "domain_id",
          "email",
          "name",
          "status",
          "enabled",
          "access_allowed",
          "quota_mb",
          "file_quota_bytes",
          "ready_at",
          "paid_until",
          "delete_after",
          "api_user_id",
          "auto_renew",
          "outbound_high_limit",
          "outbound_daily_recipient_limit",
          "outbound_daily_recipients_used",
          "outbound_daily_recipients_remaining",
          "outbound_messages_per_minute",
          "outbound_minute_messages_used",
          "outbound_minute_messages_remaining",
          "outbound_recipients_per_message",
          "storage_shared",
          "used_bytes",
          "file_used_bytes"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 0
          },
          "account_id": {
            "type": "integer",
            "minimum": 0
          },
          "domain_id": {
            "type": "integer",
            "minimum": 0
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "access_allowed": {
            "type": "boolean"
          },
          "quota_mb": {
            "type": "integer",
            "minimum": 0,
            "description": "Общий лимит писем, вложений и файлов в МиБ."
          },
          "used_bytes": {
            "type": "integer",
            "minimum": 0,
            "description": "Общий занятый объём в байтах, уже включает файлы и MIME-кодирование."
          },
          "file_quota_bytes": {
            "type": "integer",
            "minimum": 0,
            "description": "Тот же общий лимит в байтах: quota_mb × 1048576. Не добавляется к quota_mb."
          },
          "file_used_bytes": {
            "type": "integer",
            "minimum": 0,
            "description": "Исходный размер отдельных файлов без MIME-кодирования, для аналитики. Не прибавляйте к used_bytes."
          },
          "signature": {
            "type": "string"
          },
          "ready_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "paid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "delete_after": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "api_user_id": {
            "type": "string"
          },
          "auto_renew": {
            "type": "boolean"
          },
          "outbound_high_limit": {
            "type": "boolean",
            "description": "Повышенный дневной лимит ящика."
          },
          "outbound_daily_recipient_limit": {
            "type": "integer",
            "minimum": 0,
            "description": "Лимит получателей за последние 24 часа."
          },
          "outbound_daily_recipients_used": {
            "type": "integer",
            "minimum": 0,
            "description": "Получателей учтено за последние 24 часа."
          },
          "outbound_daily_recipients_remaining": {
            "type": "integer",
            "minimum": 0,
            "description": "Остаток получателей за 24 часа, не меньше 0."
          },
          "outbound_messages_per_minute": {
            "type": "integer",
            "minimum": 0,
            "description": "Лимит писем за последние 60 секунд."
          },
          "outbound_minute_messages_used": {
            "type": "integer",
            "minimum": 0,
            "description": "Писем учтено за последние 60 секунд."
          },
          "outbound_minute_messages_remaining": {
            "type": "integer",
            "minimum": 0,
            "description": "Остаток писем за 60 секунд, не меньше 0."
          },
          "outbound_recipients_per_message": {
            "type": "integer",
            "minimum": 0,
            "description": "Максимум получателей одного письма суммарно To/Cc/Bcc."
          },
          "storage_shared": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Письма, вложения и файлы используют общий объём хранилища."
          }
        }
      },
      "MailOperation": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "mailbox_id",
          "status",
          "run_at",
          "created_at",
          "completed_at",
          "error",
          "result"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "mailbox_id": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed",
              "uncertain",
              "cancelled"
            ]
          },
          "run_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "string",
                "description": "mail_daily_limit_exceeded: Достигнут лимит получателей за последние 24 часа.\nmail_minute_limit_exceeded: Достигнут лимит писем за последние 60 секунд.\nmail_too_many_recipients: Слишком много получателей одного письма.\nmail_policy_unavailable: Проверка лимитов отправки временно недоступна.\nmailbox_unavailable: Отправка с ящика недоступна.\nmail_operation_failed: Другая ошибка почтовой операции."
              },
              {
                "type": "null"
              }
            ]
          },
          "result": {
            "type": "object",
            "properties": {
              "mailbox_id": {
                "type": "integer",
                "minimum": 1
              },
              "email": {
                "type": "string"
              },
              "quota_mb": {
                "type": "integer",
                "minimum": 1
              },
              "status": {
                "type": "string"
              },
              "ready_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "paid_until": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": []
          }
        }
      },
      "MailMailboxResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/MailMailbox"
          }
        }
      },
      "MailMailboxesResponse": {
        "type": "object",
        "required": [
          "success",
          "data",
          "total_count"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailMailbox"
            }
          },
          "total_count": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "MailOperationResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/MailOperation"
          }
        }
      },
      "MailRequest": {
        "additionalProperties": false,
        "properties": {
          "api_key_id": {
            "exclusiveMinimum": 0,
            "maximum": 9223372036854775807,
            "title": "Api Key Id",
            "type": "integer",
            "description": "ID интеграции, соответствующий X-Api-Key."
          }
        },
        "required": [
          "api_key_id"
        ],
        "title": "MailRequest",
        "type": "object"
      },
      "MailAccountCreate": {
        "additionalProperties": false,
        "properties": {
          "api_key_id": {
            "exclusiveMinimum": 0,
            "maximum": 9223372036854775807,
            "title": "Api Key Id",
            "type": "integer",
            "description": "ID интеграции, соответствующий X-Api-Key."
          },
          "api_user_id": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Api User Id",
            "type": "string",
            "description": "Ваш постоянный идентификатор клиента внутри интеграции."
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "type": "string",
            "description": "Отображаемое имя."
          }
        },
        "required": [
          "api_key_id",
          "api_user_id",
          "name"
        ],
        "title": "AccountCreate",
        "type": "object"
      },
      "MailAccountUpdate": {
        "additionalProperties": false,
        "properties": {
          "api_key_id": {
            "exclusiveMinimum": 0,
            "maximum": 9223372036854775807,
            "title": "Api Key Id",
            "type": "integer",
            "description": "ID интеграции, соответствующий X-Api-Key."
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 120,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name",
            "description": "Отображаемое имя."
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Enabled",
            "description": "Разрешён ли доступ."
          },
          "password": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 12,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Password",
            "description": "Новый пароль, 12–128 символов."
          }
        },
        "required": [
          "api_key_id"
        ],
        "title": "AccountUpdate",
        "type": "object"
      },
      "MailDomainCreate": {
        "additionalProperties": false,
        "properties": {
          "api_key_id": {
            "exclusiveMinimum": 0,
            "maximum": 9223372036854775807,
            "title": "Api Key Id",
            "type": "integer",
            "description": "ID интеграции, соответствующий X-Api-Key."
          },
          "name": {
            "maxLength": 253,
            "minLength": 3,
            "title": "Name",
            "type": "string",
            "description": "Полное доменное имя без протокола, пути и порта."
          }
        },
        "required": [
          "api_key_id",
          "name"
        ],
        "title": "DomainCreate",
        "type": "object"
      },
      "MailPayment": {
        "additionalProperties": false,
        "properties": {
          "api_key_id": {
            "exclusiveMinimum": 0,
            "maximum": 9223372036854775807,
            "title": "Api Key Id",
            "type": "integer",
            "description": "ID интеграции, соответствующий X-Api-Key."
          },
          "expected_amount_usd": {
            "anyOf": [
              {
                "pattern": "^\\d{1,11}\\.\\d{4}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Expected Amount Usd",
            "description": "Необязательное подтверждение цены: строка USD с четырьмя знаками. Для покупки/продления требуется точное совпадение; для увеличения объёма это максимально допустимая сумма. Превышение или изменение цены возвращает 409 price_changed без списания."
          }
        },
        "required": [
          "api_key_id"
        ],
        "title": "MailPayment",
        "type": "object"
      },
      "MailPurchase": {
        "additionalProperties": false,
        "properties": {
          "api_key_id": {
            "exclusiveMinimum": 0,
            "maximum": 9223372036854775807,
            "title": "Api Key Id",
            "type": "integer",
            "description": "ID интеграции, соответствующий X-Api-Key."
          },
          "expected_amount_usd": {
            "anyOf": [
              {
                "pattern": "^\\d{1,11}\\.\\d{4}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Expected Amount Usd",
            "description": "Необязательное подтверждение цены: строка USD с четырьмя знаками. Для покупки/продления требуется точное совпадение; для увеличения объёма это максимально допустимая сумма. Превышение или изменение цены возвращает 409 price_changed без списания."
          },
          "account_id": {
            "exclusiveMinimum": 0,
            "title": "Account Id",
            "type": "integer",
            "description": "ID аккаунта клиента этой интеграции."
          },
          "domain_id": {
            "exclusiveMinimum": 0,
            "title": "Domain Id",
            "type": "integer",
            "description": "ID активного домена, доступного аккаунту."
          },
          "local_part": {
            "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$",
            "title": "Local Part",
            "type": "string",
            "description": "Часть адреса до @: строчные латинские буквы, цифры, точки, подчёркивания и дефисы; первый символ — буква или цифра."
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "type": "string",
            "description": "Отображаемое имя."
          },
          "password": {
            "maxLength": 128,
            "minLength": 12,
            "title": "Password",
            "type": "string",
            "description": "Новый пароль, 12–128 символов."
          },
          "plan_code": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Plan Code",
            "type": "string",
            "description": "Активный code из GET /mail/plans."
          },
          "auto_renew": {
            "default": false,
            "title": "Auto Renew",
            "type": "boolean",
            "description": "Автоматически продлевать с баланса интеграции."
          }
        },
        "required": [
          "api_key_id",
          "account_id",
          "domain_id",
          "local_part",
          "name",
          "password",
          "plan_code"
        ],
        "title": "MailPurchase",
        "type": "object"
      },
      "MailUpgrade": {
        "additionalProperties": false,
        "properties": {
          "api_key_id": {
            "exclusiveMinimum": 0,
            "maximum": 9223372036854775807,
            "title": "Api Key Id",
            "type": "integer",
            "description": "ID интеграции, соответствующий X-Api-Key."
          },
          "expected_amount_usd": {
            "anyOf": [
              {
                "pattern": "^\\d{1,11}\\.\\d{4}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Expected Amount Usd",
            "description": "Необязательное подтверждение цены: строка USD с четырьмя знаками. Для покупки/продления требуется точное совпадение; для увеличения объёма это максимально допустимая сумма. Превышение или изменение цены возвращает 409 price_changed без списания."
          },
          "plan_code": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Plan Code",
            "type": "string",
            "description": "Активный code из GET /mail/plans."
          }
        },
        "required": [
          "api_key_id",
          "plan_code"
        ],
        "title": "MailUpgrade",
        "type": "object"
      },
      "MailboxSettings": {
        "additionalProperties": false,
        "properties": {
          "api_key_id": {
            "exclusiveMinimum": 0,
            "maximum": 9223372036854775807,
            "title": "Api Key Id",
            "type": "integer",
            "description": "ID интеграции, соответствующий X-Api-Key."
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 120,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name",
            "description": "Отображаемое имя."
          },
          "password": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 12,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Password",
            "description": "Новый пароль, 12–128 символов."
          },
          "signature": {
            "anyOf": [
              {
                "maxLength": 5000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Signature",
            "description": "Подпись ящика; пустая строка очищает её."
          }
        },
        "required": [
          "api_key_id"
        ],
        "title": "MailboxSettings",
        "type": "object"
      },
      "MailAutoRenew": {
        "additionalProperties": false,
        "properties": {
          "api_key_id": {
            "exclusiveMinimum": 0,
            "maximum": 9223372036854775807,
            "title": "Api Key Id",
            "type": "integer",
            "description": "ID интеграции, соответствующий X-Api-Key."
          },
          "auto_renew": {
            "title": "Auto Renew",
            "type": "boolean",
            "description": "Автоматически продлевать с баланса интеграции."
          }
        },
        "required": [
          "api_key_id",
          "auto_renew"
        ],
        "title": "MailAutoRenew",
        "type": "object"
      },
      "MailAccess": {
        "additionalProperties": false,
        "properties": {
          "api_key_id": {
            "exclusiveMinimum": 0,
            "maximum": 9223372036854775807,
            "title": "Api Key Id",
            "type": "integer",
            "description": "ID интеграции, соответствующий X-Api-Key."
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean",
            "description": "Разрешён ли доступ."
          }
        },
        "required": [
          "api_key_id",
          "enabled"
        ],
        "title": "MailAccess",
        "type": "object"
      },
      "MailAssign": {
        "additionalProperties": false,
        "properties": {
          "api_key_id": {
            "exclusiveMinimum": 0,
            "maximum": 9223372036854775807,
            "title": "Api Key Id",
            "type": "integer",
            "description": "ID интеграции, соответствующий X-Api-Key."
          },
          "account_id": {
            "exclusiveMinimum": 0,
            "title": "Account Id",
            "type": "integer",
            "description": "ID аккаунта клиента этой интеграции."
          }
        },
        "required": [
          "api_key_id",
          "account_id"
        ],
        "title": "MailAssign",
        "type": "object"
      },
      "MailKeyCreate": {
        "additionalProperties": false,
        "properties": {
          "api_key_id": {
            "exclusiveMinimum": 0,
            "maximum": 9223372036854775807,
            "title": "Api Key Id",
            "type": "integer",
            "description": "ID интеграции, соответствующий X-Api-Key."
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "type": "string",
            "description": "Отображаемое имя."
          }
        },
        "required": [
          "api_key_id",
          "name"
        ],
        "title": "MailKeyCreate",
        "type": "object"
      },
      "MailAccount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "api_user_id": {
            "type": "string"
          },
          "login": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "api_user_id",
          "login",
          "name",
          "enabled",
          "created_at",
          "updated_at"
        ]
      },
      "MailAccountSecret": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "api_user_id": {
            "type": "string"
          },
          "login": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "password": {
            "type": "string",
            "description": "Присутствует при первом создании и сбросе пароля; отсутствует при повторном создании."
          }
        },
        "required": [
          "id",
          "api_user_id",
          "login",
          "name",
          "enabled",
          "created_at",
          "updated_at"
        ]
      },
      "MailPlan": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "mail_quota_mb": {
            "type": "integer",
            "minimum": 1,
            "description": "Общий объём писем и файлов в МиБ."
          },
          "file_quota_mb": {
            "type": "integer",
            "minimum": 0,
            "description": "Тот же общий лимит в МиБ, равен mail_quota_mb. Не складывайте эти поля."
          },
          "monthly_price_usd": {
            "type": "string",
            "description": "Конечная цена в USD за календарный месяц."
          },
          "active": {
            "type": "boolean"
          },
          "storage_shared": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Письма, вложения и файлы используют общий объём хранилища."
          }
        },
        "required": [
          "code",
          "mail_quota_mb",
          "file_quota_mb",
          "monthly_price_usd",
          "active",
          "storage_shared"
        ]
      },
      "MailPlans": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "enum": [
              "USD"
            ]
          },
          "period": {
            "type": "string",
            "enum": [
              "calendar_month"
            ]
          },
          "upgrade_only": {
            "type": "boolean"
          },
          "max_mail_quota_mb": {
            "type": "integer",
            "minimum": 1
          },
          "storage_step_mb": {
            "type": "integer",
            "minimum": 1
          },
          "plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailPlan"
            }
          }
        },
        "required": [
          "currency",
          "period",
          "upgrade_only",
          "max_mail_quota_mb",
          "storage_step_mb",
          "plans"
        ]
      },
      "MailDomain": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "deleting",
              "deleted"
            ]
          },
          "is_shared": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "is_shared"
        ]
      },
      "MailIntegrationDomain": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "deleting",
              "deleted"
            ]
          },
          "is_shared": {
            "type": "boolean"
          },
          "account_id": {
            "type": "integer",
            "minimum": 1
          },
          "api_user_id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "is_shared",
          "account_id",
          "api_user_id"
        ]
      },
      "MailDnsRecord": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "observed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "matches": {
            "type": "boolean"
          },
          "error": {
            "type": "string",
            "enum": [
              "dns_unavailable"
            ]
          }
        },
        "required": [
          "type",
          "name",
          "value",
          "observed",
          "matches"
        ]
      },
      "MailDns": {
        "type": "object",
        "properties": {
          "domain_id": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string"
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailDnsRecord"
            }
          }
        },
        "required": [
          "domain_id",
          "status",
          "records"
        ]
      },
      "MailQuote": {
        "type": "object",
        "properties": {
          "amount_usd": {
            "type": "string"
          },
          "balance_usd": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "enum": [
              "USD"
            ]
          },
          "months": {
            "type": "integer",
            "enum": [
              1
            ]
          },
          "plan": {
            "$ref": "#/components/schemas/MailPlan"
          },
          "allow_negative_balance": {
            "type": "boolean"
          }
        },
        "required": [
          "amount_usd",
          "balance_usd",
          "currency",
          "months",
          "plan",
          "allow_negative_balance"
        ]
      },
      "MailKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "created_at",
          "active"
        ]
      },
      "MailKeyCreated": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "key": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "created_at",
          "key"
        ]
      },
      "MailKeyDetails": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "active": {
            "type": "boolean"
          },
          "key": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "created_at",
          "active",
          "key"
        ]
      },
      "MailMailboxState": {
        "type": "object",
        "required": [
          "id",
          "account_id",
          "domain_id",
          "email",
          "name",
          "status",
          "enabled",
          "access_allowed",
          "quota_mb",
          "file_quota_bytes",
          "ready_at",
          "paid_until",
          "delete_after",
          "api_user_id",
          "auto_renew",
          "outbound_high_limit",
          "outbound_daily_recipient_limit",
          "outbound_messages_per_minute",
          "outbound_recipients_per_message",
          "storage_shared",
          "used_bytes",
          "file_used_bytes"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 0
          },
          "account_id": {
            "type": "integer",
            "minimum": 0
          },
          "domain_id": {
            "type": "integer",
            "minimum": 0
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "access_allowed": {
            "type": "boolean"
          },
          "quota_mb": {
            "type": "integer",
            "minimum": 0,
            "description": "Общий лимит писем, вложений и файлов в МиБ."
          },
          "used_bytes": {
            "type": "integer",
            "minimum": 0,
            "description": "Общий занятый объём в байтах, уже включает файлы и MIME-кодирование."
          },
          "file_quota_bytes": {
            "type": "integer",
            "minimum": 0,
            "description": "Тот же общий лимит в байтах: quota_mb × 1048576. Не добавляется к quota_mb."
          },
          "file_used_bytes": {
            "type": "integer",
            "minimum": 0,
            "description": "Исходный размер отдельных файлов без MIME-кодирования, для аналитики. Не прибавляйте к used_bytes."
          },
          "signature": {
            "type": "string"
          },
          "ready_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "paid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "delete_after": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "api_user_id": {
            "type": "string"
          },
          "auto_renew": {
            "type": "boolean"
          },
          "outbound_high_limit": {
            "type": "boolean",
            "description": "Повышенный дневной лимит ящика."
          },
          "outbound_daily_recipient_limit": {
            "type": "integer",
            "minimum": 0,
            "description": "Лимит получателей за последние 24 часа."
          },
          "outbound_messages_per_minute": {
            "type": "integer",
            "minimum": 0,
            "description": "Лимит писем за последние 60 секунд."
          },
          "outbound_recipients_per_message": {
            "type": "integer",
            "minimum": 0,
            "description": "Максимум получателей одного письма суммарно To/Cc/Bcc."
          },
          "storage_shared": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Письма, вложения и файлы используют общий объём хранилища."
          }
        }
      },
      "MailAccountResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/MailAccount"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MailAccountSecretResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/MailAccountSecret"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MailAccountsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailAccount"
            }
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MailPlansResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/MailPlans"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MailDomainsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailIntegrationDomain"
            }
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MailAccountDomainsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailDomain"
            }
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MailDomainResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/MailDomain"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MailDnsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/MailDns"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MailQuoteResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/MailQuote"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MailDeletedResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "deleted": {
                "type": "boolean",
                "enum": [
                  true
                ]
              }
            },
            "required": [
              "deleted"
            ]
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MailKeysResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailKey"
            }
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MailKeyCreatedResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/MailKeyCreated"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MailKeyDetailsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/MailKeyDetails"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MailKeyRemovalResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "revoked": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  }
                },
                "required": [
                  "revoked"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "deleted": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  }
                },
                "required": [
                  "deleted"
                ]
              }
            ]
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MailMailboxStateResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/MailMailboxState"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MailLoginLinkRequest": {
        "additionalProperties": false,
        "properties": {
          "api_key_id": {
            "exclusiveMinimum": 0,
            "maximum": 9223372036854775807,
            "title": "Api Key Id",
            "type": "integer",
            "description": "ID интеграции, соответствующий X-Api-Key."
          },
          "mailbox_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 9223372036854775807
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "ID ящика этого аккаунта; null — весь аккаунт."
          },
          "locale": {
            "type": "string",
            "enum": [
              "en",
              "ru",
              "fr",
              "es",
              "de",
              "zh-cn",
              "ko",
              "tr",
              "hi",
              "pt-br"
            ],
            "default": "en"
          }
        },
        "required": [
          "api_key_id"
        ],
        "title": "MailLoginLinkRequest",
        "type": "object",
        "example": {
          "api_key_id": 1,
          "mailbox_id": 42,
          "locale": "ru"
        }
      },
      "MailLoginLink": {
        "type": "object",
        "required": [
          "login_url",
          "expires_in",
          "expires_at",
          "account_id",
          "mailbox_id"
        ],
        "properties": {
          "login_url": {
            "type": "string",
            "format": "uri",
            "description": "Одноразовая ссылка; сохраните fragment #token при переходе."
          },
          "expires_in": {
            "type": "integer",
            "enum": [
              300
            ]
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "account_id": {
            "type": "integer",
            "minimum": 1
          },
          "mailbox_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "MailLoginLinkResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/MailLoginLink"
          }
        },
        "example": {
          "success": true,
          "data": {
            "login_url": "https://adapt-mail.com/ru/auth/#token=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
            "expires_in": 300,
            "expires_at": "2026-10-21T12:05:00Z",
            "account_id": 12,
            "mailbox_id": 42
          }
        }
      },
      "FirewallSmtpBody": {
        "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. При конфликте перечитайте настройки."
          },
          "blocked": {
            "type": "boolean",
            "title": "Blocked",
            "description": "true — закрыть исходящие SMTP-порты, false — открыть."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "revision",
          "blocked"
        ],
        "title": "FirewallSmtpBody",
        "example": {
          "api_key_id": 1,
          "revision": 0,
          "blocked": false
        }
      },
      "AlertLocation": {
        "type": "object",
        "properties": {
          "location_id": {
            "type": "integer",
            "description": "ID связанной локации."
          },
          "location_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Сохранённое отображаемое название, например Poland; может отличаться от справочника локаций. null, если не задано."
          },
          "country_code": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Двухбуквенный код страны для флага, например PL. null, если не задан."
          }
        },
        "required": [
          "location_id",
          "location_name",
          "country_code"
        ],
        "title": "AlertLocation"
      },
      "LookingGlassCheckRequest": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Api Key Id",
            "description": "ID интеграции, соответствующий X-Api-Key."
          },
          "point_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Point Id",
            "description": "ID точки из GET /looking-glass/points."
          },
          "type": {
            "type": "string",
            "enum": [
              "ping",
              "traceroute",
              "mtr"
            ],
            "title": "Type",
            "description": "Ручная проверка: ping, traceroute или mtr."
          },
          "family": {
            "type": "integer",
            "enum": [
              4,
              6
            ],
            "title": "Family",
            "description": "Семейство IP: целое число 4 или 6; числовая цель должна ему соответствовать."
          },
          "target": {
            "type": "string",
            "maxLength": 253,
            "minLength": 1,
            "title": "Target",
            "description": "Публичный числовой IP или домен без протокола, порта, пути и параметров. DNS разрешается в выбранной локации."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_id",
          "point_id",
          "type",
          "family",
          "target"
        ],
        "title": "CheckRequest"
      },
      "LookingGlassCheckResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "const": true,
            "title": "Success",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/LookingGlassCheckResult"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "CheckResponse"
      },
      "LookingGlassCheckResult": {
        "properties": {
          "point_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Point Id"
          },
          "type": {
            "type": "string",
            "enum": [
              "ping",
              "traceroute",
              "mtr"
            ],
            "title": "Type"
          },
          "target": {
            "type": "string",
            "title": "Target",
            "description": "Фактически проверенный IP после разрешения DNS."
          },
          "family": {
            "type": "integer",
            "enum": [
              4,
              6
            ],
            "title": "Family"
          },
          "return_code": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 255.0,
                "minimum": -255.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Code",
            "description": "Код завершения команды; ненулевое значение не является ошибкой HTTP. null при timed_out=true."
          },
          "timed_out": {
            "type": "boolean",
            "title": "Timed Out",
            "description": "При true проверка вернула неполный результат, return_code=null. HTTP 200 сохраняется."
          },
          "duration_ms": {
            "type": "integer",
            "maximum": 40000.0,
            "minimum": 0.0,
            "title": "Duration Ms",
            "description": "Время выполнения диагностики в миллисекундах, не задержка сети."
          },
          "output": {
            "type": "string",
            "maxLength": 65536,
            "title": "Output",
            "description": "Текст Ping/Traceroute или JSON-строка MTR. Отображайте как текст; при ошибке разбора MTR используйте исходный текст."
          }
        },
        "type": "object",
        "required": [
          "point_id",
          "type",
          "target",
          "family",
          "return_code",
          "timed_out",
          "duration_ms",
          "output"
        ],
        "title": "CheckResult"
      },
      "LookingGlassPointsResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "const": true,
            "title": "Success",
            "default": true
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/LookingGlassPoint"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "PointsResponse"
      },
      "LookingGlassPoint": {
        "properties": {
          "id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Id"
          },
          "location_id": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Location Id"
          },
          "location_name": {
            "type": "string",
            "title": "Location Name"
          },
          "country_code": {
            "type": "string",
            "title": "Country Code"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "ipv4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ipv4"
          },
          "ipv6": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ipv6"
          },
          "ipv4_enabled": {
            "type": "boolean",
            "title": "Ipv4 Enabled",
            "description": "Разрешена ли диагностика этого семейства; наличие IP само по себе не означает доступность."
          },
          "ipv6_enabled": {
            "type": "boolean",
            "title": "Ipv6 Enabled",
            "description": "Разрешена ли диагностика этого семейства; наличие IP само по себе не означает доступность."
          },
          "latency_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Url",
            "description": "HTTPS URL для прямого замера из браузера; null, если соответствующее семейство отключено или адрес не настроен. Передаётся без изменения. При доступности обоих семейств браузер выбирает семейство; при одном включённом используется его URL."
          },
          "latency_ipv4_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ipv4 Url",
            "description": "HTTPS URL для прямого замера из браузера; null, если соответствующее семейство отключено или адрес не настроен. Передаётся без изменения."
          },
          "latency_ipv6_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ipv6 Url",
            "description": "HTTPS URL для прямого замера из браузера; null, если соответствующее семейство отключено или адрес не настроен. Передаётся без изменения."
          },
          "checks": {
            "items": {
              "type": "string",
              "enum": [
                "ping",
                "traceroute",
                "mtr"
              ]
            },
            "type": "array",
            "title": "Checks"
          }
        },
        "type": "object",
        "required": [
          "id",
          "location_id",
          "location_name",
          "country_code",
          "city",
          "ipv4",
          "ipv6",
          "ipv4_enabled",
          "ipv6_enabled",
          "latency_url",
          "latency_ipv4_url",
          "latency_ipv6_url",
          "checks"
        ],
        "title": "LookingGlassPoint"
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Секретный ключ интеграции из дашборда. Доступ по IP настраивается в дашборде во вкладке **Белый список**. Пустой список разрешает запросы с любого IP; непустой — только с разрешённых IPv4/IPv6-адресов и подсетей CIDR. Действующий API-ключ обязателен всегда. Запросы вне списка возвращают HTTP 403 с `detail.code=ip_not_allowed`. Доступ через дашборд и отправка вебхуков сохраняются."
      }
    }
  },
  "servers": [
    {
      "url": "https://cloud-api.adaptgroup.pro"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Catalog",
      "x-displayName": "Каталог",
      "description": "Маршруты раздела «Каталог» для интеграции Cloud API."
    },
    {
      "name": "Monitoring",
      "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."
    },
    {
      "name": "Backups",
      "x-displayName": "Бекапы",
      "description": "Хранение и восстановление копий VPS.\n\n## Размеры бекапа\n\nРазмер хранения бекапа (stored_size_bytes) и размер ZIP для скачивания (size_bytes экспорта) — разные величины. Экспорт собирается отдельно из восстановленного образа диска и сжимается заново, поэтому архив может быть больше или меньше. Само по себе различие размеров не означает повреждение бекапа."
    },
    {
      "name": "Mail",
      "description": "Аккаунты, домены, DNS, оплата ящиков, настройки, лимиты отправки и API-ключи. Начните с [руководства по подключению почты](./mail-guide)."
    },
    {
      "name": "Looking Glass",
      "x-displayName": "Looking Glass",
      "description": "Точки диагностики, ручные проверки и задержка HTTPS из браузера."
    }
  ]
}
