{
  "openapi": "3.1.0",
  "info": {
    "title": "EternityProxy API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.eternityproxy.com"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/api/v1/account/balance": {
      "get": {
        "operationId": "balance",
        "summary": "Баланс",
        "description": "Возвращает денежный баланс владельца ключа в USD. При использовании овердрафта баланс может быть отрицательным.",
        "tags": [
          "Аккаунт"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "balance_usd": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "balance_usd"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "balance_usd": 25
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/catalog": {
      "get": {
        "operationId": "catalog",
        "summary": "Каталог товаров",
        "description": "В products перечислены статические прокси и ключи. Для ключей каждый сервис и единица измерения указаны один раз. unit_price_usd — цена за 1 IP или 1 GB, а minimum_quantity и maximum_quantity задают объём в одном ключе. В rotating перечислены все доступные ротационные пулы: residential (Резидентские), residential-plus (Резидентские+), datacenter (Серверные) и mobile (Мобильные). У residential выбор города недоступен (city_selection: false), а страны берутся из настроенного списка (country_source: configured). Верхнеуровневое residential оставлено для совместимости. maximum_gb — предел одной покупки. Для объёма заказа выберите наибольший minimum_gb, который не превышает заказанный объём. Цена price_per_gb_usd из этой ступени применяется ко всему объёму. Ответ учитывает цены и доступность товаров для вашего аккаунта. Для серверных товаров с выбором протокола поле protocols содержит http и socks5. maximum_quantity ограничивает размер заказа. У фиксированного ISP-пакета заказывайте ровно package_quantity. ISP на 90 дней появляется с duration_days: 90. Выдача ждёт подтверждения срока действия на тех же IP. stock_quantity показывает остаток локального склада, а null означает, что точное количество неизвестно.",
        "tags": [
          "Заказы"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "products": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^(p_[0-9a-f]{32}|key-[a-z0-9]+-(ips|gb))$"
                          },
                          "type": {
                            "enum": [
                              "isp",
                              "dc",
                              "key"
                            ]
                          },
                          "title": {
                            "type": "string"
                          },
                          "country": {
                            "type": "string",
                            "pattern": "^[A-Z]{2}$"
                          },
                          "service": {
                            "type": "string"
                          },
                          "unit": {
                            "type": "string"
                          },
                          "unit_price_usd": {
                            "type": "number"
                          },
                          "package_quantity": {
                            "type": "integer"
                          },
                          "duration_days": {
                            "type": "integer"
                          },
                          "udp": {
                            "type": "boolean"
                          },
                          "protocols": {
                            "type": "array",
                            "items": {
                              "enum": [
                                "http",
                                "socks5"
                              ]
                            }
                          },
                          "instruction_url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "minimum_quantity": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100000
                          },
                          "maximum_quantity": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100000
                          },
                          "stock_quantity": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "title",
                          "unit_price_usd",
                          "maximum_quantity",
                          "stock_quantity"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "rotating": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "enum": [
                              "residential",
                              "residential-plus",
                              "mobile",
                              "datacenter"
                            ]
                          },
                          "maximum_gb": {
                            "type": "integer"
                          },
                          "city_selection": {
                            "type": "boolean"
                          },
                          "country_source": {
                            "enum": [
                              "configured",
                              "provider"
                            ]
                          },
                          "tiers": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "minimum_gb": {
                                  "type": "integer"
                                },
                                "price_per_gb_usd": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "minimum_gb",
                                "price_per_gb_usd"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "id",
                          "maximum_gb",
                          "city_selection",
                          "country_source",
                          "tiers"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "residential": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "minimum_gb": {
                            "type": "integer"
                          },
                          "price_per_gb_usd": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "minimum_gb",
                          "price_per_gb_usd"
                        ],
                        "additionalProperties": false
                      },
                      "deprecated": true
                    }
                  },
                  "required": [
                    "products",
                    "rotating",
                    "residential"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "products": [
                    {
                      "id": "p_62dc14061bbb1bda4ea26b3d5b8fb149",
                      "type": "dc",
                      "title": "Германия [DC]",
                      "country": "DE",
                      "unit_price_usd": 0.9,
                      "duration_days": 30,
                      "udp": false,
                      "protocols": [
                        "http",
                        "socks5"
                      ],
                      "stock_quantity": null,
                      "maximum_quantity": 100
                    },
                    {
                      "id": "p_986ba25ee1540971be818d48076b1d39",
                      "type": "isp",
                      "title": "Германия [ISP]",
                      "country": "DE",
                      "unit_price_usd": 3,
                      "package_quantity": 3,
                      "duration_days": 30,
                      "stock_quantity": null,
                      "maximum_quantity": 3
                    },
                    {
                      "id": "key-9proxy-ips",
                      "type": "key",
                      "title": "9Proxy | IPs",
                      "service": "9Proxy",
                      "unit": "IPs",
                      "unit_price_usd": 0.1,
                      "minimum_quantity": 10,
                      "maximum_quantity": 5000,
                      "stock_quantity": null,
                      "instruction_url": "https://eternityproxy.com/manuals?lang=ru#9proxy"
                    },
                    {
                      "id": "key-9proxy-gb",
                      "type": "key",
                      "title": "9Proxy | GB",
                      "service": "9Proxy",
                      "unit": "GB",
                      "unit_price_usd": 1,
                      "minimum_quantity": 1,
                      "maximum_quantity": 500,
                      "stock_quantity": null,
                      "instruction_url": "https://eternityproxy.com/manuals?lang=ru#9proxy"
                    }
                  ],
                  "rotating": [
                    {
                      "id": "residential",
                      "maximum_gb": 10000,
                      "city_selection": false,
                      "country_source": "configured",
                      "tiers": [
                        {
                          "minimum_gb": 1,
                          "price_per_gb_usd": 1.2
                        },
                        {
                          "minimum_gb": 50,
                          "price_per_gb_usd": 1
                        },
                        {
                          "minimum_gb": 100,
                          "price_per_gb_usd": 0.8
                        },
                        {
                          "minimum_gb": 500,
                          "price_per_gb_usd": 0.7
                        }
                      ]
                    },
                    {
                      "id": "residential-plus",
                      "maximum_gb": 1000,
                      "city_selection": true,
                      "country_source": "provider",
                      "tiers": [
                        {
                          "minimum_gb": 1,
                          "price_per_gb_usd": 1.5
                        },
                        {
                          "minimum_gb": 50,
                          "price_per_gb_usd": 1.4
                        },
                        {
                          "minimum_gb": 200,
                          "price_per_gb_usd": 1.3
                        },
                        {
                          "minimum_gb": 500,
                          "price_per_gb_usd": 1.2
                        }
                      ]
                    },
                    {
                      "id": "datacenter",
                      "maximum_gb": 500,
                      "city_selection": true,
                      "country_source": "provider",
                      "tiers": [
                        {
                          "minimum_gb": 1,
                          "price_per_gb_usd": 1
                        },
                        {
                          "minimum_gb": 51,
                          "price_per_gb_usd": 0.9
                        },
                        {
                          "minimum_gb": 101,
                          "price_per_gb_usd": 0.85
                        },
                        {
                          "minimum_gb": 251,
                          "price_per_gb_usd": 0.8
                        }
                      ]
                    },
                    {
                      "id": "mobile",
                      "maximum_gb": 1000,
                      "city_selection": true,
                      "country_source": "provider",
                      "tiers": [
                        {
                          "minimum_gb": 1,
                          "price_per_gb_usd": 3
                        },
                        {
                          "minimum_gb": 51,
                          "price_per_gb_usd": 2.85
                        },
                        {
                          "minimum_gb": 101,
                          "price_per_gb_usd": 2.7
                        },
                        {
                          "minimum_gb": 251,
                          "price_per_gb_usd": 2.55
                        },
                        {
                          "minimum_gb": 501,
                          "price_per_gb_usd": 2.4
                        }
                      ]
                    }
                  ],
                  "residential": [
                    {
                      "minimum_gb": 1,
                      "price_per_gb_usd": 1.2
                    },
                    {
                      "minimum_gb": 50,
                      "price_per_gb_usd": 1
                    },
                    {
                      "minimum_gb": 100,
                      "price_per_gb_usd": 0.8
                    },
                    {
                      "minimum_gb": 500,
                      "price_per_gb_usd": 0.7
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quotes": {
      "post": {
        "operationId": "quote",
        "summary": "Рассчитать стоимость",
        "description": "Рассчитывает цену на 10 минут. Для ключей с оплатой за IP цена за один IP может быть меньше цента или содержать доли цента. Сумма за весь ключ округляется вверх до цента и указана в total_usd. Поля balance_usd и missing_usd показывают текущий баланс и сколько нужно добавить для покупки с учётом овердрафта. Списание происходит при оформлении заказа.",
        "tags": [
          "Заказы"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "product_id": {
                    "type": "string",
                    "pattern": "^(residential|residential-plus|mobile|datacenter|p_[0-9a-f]{32}|key-[a-z0-9]+-(ips|gb))$"
                  },
                  "quantity": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000
                  },
                  "account_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "const": "default"
                      }
                    ]
                  },
                  "protocol": {
                    "enum": [
                      "http",
                      "socks5"
                    ]
                  }
                },
                "required": [
                  "product_id",
                  "quantity"
                ],
                "additionalProperties": false,
                "if": {
                  "required": [
                    "account_id"
                  ]
                },
                "then": {
                  "properties": {
                    "product_id": {
                      "enum": [
                        "residential",
                        "residential-plus",
                        "mobile",
                        "datacenter"
                      ]
                    }
                  }
                }
              },
              "example": {
                "product_id": "key-9proxy-ips",
                "quantity": 37
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "quote_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "product_id": {
                      "type": "string",
                      "pattern": "^(residential|residential-plus|mobile|datacenter|p_[0-9a-f]{32}|key-[a-z0-9]+-(ips|gb))$"
                    },
                    "quantity": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100000
                    },
                    "unit_price_usd": {
                      "type": "number"
                    },
                    "total_usd": {
                      "type": "number"
                    },
                    "balance_usd": {
                      "type": "number"
                    },
                    "missing_usd": {
                      "type": "number"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "account_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "const": "default"
                        }
                      ]
                    },
                    "protocol": {
                      "enum": [
                        "http",
                        "socks5"
                      ]
                    }
                  },
                  "required": [
                    "quote_id",
                    "product_id",
                    "quantity",
                    "unit_price_usd",
                    "total_usd",
                    "balance_usd",
                    "missing_usd",
                    "expires_at"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "quote_id": "de2cdd43-1aa6-4f35-b9bc-0f2d05c286f0",
                  "product_id": "key-9proxy-ips",
                  "quantity": 37,
                  "unit_price_usd": 0.1,
                  "total_usd": 3.7,
                  "balance_usd": 25,
                  "missing_usd": 0,
                  "expires_at": "2026-11-16T20:10:00.000Z"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders": {
      "post": {
        "operationId": "purchase",
        "summary": "Подтвердить покупку",
        "description": "Оформляет заказ и списывает средства с общего баланса. Повтор с тем же quote_id возвращает тот же заказ.",
        "tags": [
          "Заказы"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quote_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "quote_id"
                ],
                "additionalProperties": false
              },
              "example": {
                "quote_id": "de2cdd43-1aa6-4f35-b9bc-0f2d05c286f0"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Обработка заказа завершена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "product_id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "enum": [
                        "dc",
                        "isp",
                        "static",
                        "key",
                        "rotating"
                      ]
                    },
                    "quantity": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100000
                    },
                    "total_usd": {
                      "type": "number"
                    },
                    "status": {
                      "enum": [
                        "pending",
                        "complete",
                        "failed"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "issued_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "delivery_deadline_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "instruction_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "expires_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "account_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "const": "default"
                        }
                      ]
                    },
                    "protocol": {
                      "enum": [
                        "http",
                        "socks5"
                      ]
                    },
                    "credentials": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "credentials_by_protocol": {
                      "type": "object",
                      "properties": {
                        "http": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "socks5": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "http",
                        "socks5"
                      ],
                      "additionalProperties": false
                    },
                    "credential_expires_at": {
                      "type": "array",
                      "items": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      }
                    },
                    "refund": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "amount_usd": {
                          "type": "number",
                          "minimum": 0
                        },
                        "credited_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "amount_usd",
                        "credited_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "product_id",
                    "title",
                    "type",
                    "quantity",
                    "total_usd",
                    "status",
                    "created_at",
                    "issued_at",
                    "delivery_deadline_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "202": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "product_id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "enum": [
                        "dc",
                        "isp",
                        "static",
                        "key",
                        "rotating"
                      ]
                    },
                    "quantity": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100000
                    },
                    "total_usd": {
                      "type": "number"
                    },
                    "status": {
                      "enum": [
                        "pending",
                        "complete",
                        "failed"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "issued_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "delivery_deadline_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "instruction_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "expires_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "account_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "const": "default"
                        }
                      ]
                    },
                    "protocol": {
                      "enum": [
                        "http",
                        "socks5"
                      ]
                    },
                    "credentials": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "credentials_by_protocol": {
                      "type": "object",
                      "properties": {
                        "http": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "socks5": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "http",
                        "socks5"
                      ],
                      "additionalProperties": false
                    },
                    "credential_expires_at": {
                      "type": "array",
                      "items": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      }
                    },
                    "refund": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "amount_usd": {
                          "type": "number",
                          "minimum": 0
                        },
                        "credited_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "amount_usd",
                        "credited_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "product_id",
                    "title",
                    "type",
                    "quantity",
                    "total_usd",
                    "status",
                    "created_at",
                    "issued_at",
                    "delivery_deadline_at"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "id": "c332dd43-1aa6-4f35-b9bc-0f2d05c286f0",
                  "product_id": "key-9proxy-ips",
                  "title": "9Proxy | 37 IPs",
                  "type": "key",
                  "quantity": 37,
                  "total_usd": 3.7,
                  "status": "pending",
                  "created_at": "2026-11-16T20:02:00.000Z",
                  "issued_at": null,
                  "delivery_deadline_at": "2026-11-16T20:32:00.000Z"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "order-history",
        "summary": "История заказов",
        "description": "Возвращает заказы из API, бота и Mini App, начиная с новых. Возьмите orders[].id и запросите купленный товар через GET /orders/{order_id}.",
        "tags": [
          "Заказы"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 999999999,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "product_id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "type": {
                            "enum": [
                              "dc",
                              "isp",
                              "static",
                              "key",
                              "rotating"
                            ]
                          },
                          "quantity": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100000
                          },
                          "total_usd": {
                            "type": "number"
                          },
                          "status": {
                            "enum": [
                              "pending",
                              "complete",
                              "failed"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "issued_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "delivery_deadline_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "expires_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "account_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "const": "default"
                              }
                            ]
                          },
                          "protocol": {
                            "enum": [
                              "http",
                              "socks5"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "product_id",
                          "title",
                          "type",
                          "quantity",
                          "total_usd",
                          "status",
                          "created_at",
                          "issued_at",
                          "delivery_deadline_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next_offset": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    }
                  },
                  "required": [
                    "orders",
                    "next_offset"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "orders": [
                    {
                      "id": "c84b0abf-1e0f-4ac9-b4a7-21f0d65656a3",
                      "product_id": "p_62dc14061bbb1bda4ea26b3d5b8fb149",
                      "title": "Германия [DC]",
                      "type": "dc",
                      "quantity": 1,
                      "total_usd": 0.9,
                      "status": "complete",
                      "created_at": "2026-11-16T20:00:00.000Z",
                      "issued_at": "2026-11-16T20:00:05.000Z",
                      "delivery_deadline_at": null,
                      "expires_at": "2026-12-16T20:00:00.000Z"
                    }
                  ],
                  "next_offset": null
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{order_id}": {
      "get": {
        "operationId": "order",
        "summary": "Получить купленный товар",
        "description": "Проверяет статус заказа и возвращает купленный товар. После выдачи (status: complete) в credentials приходят строки подключения статических прокси или ключи. Этот метод также работает для покупок из бота и Mini App.",
        "tags": [
          "Заказы"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "product_id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "enum": [
                        "dc",
                        "isp",
                        "static",
                        "key",
                        "rotating"
                      ]
                    },
                    "quantity": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100000
                    },
                    "total_usd": {
                      "type": "number"
                    },
                    "status": {
                      "enum": [
                        "pending",
                        "complete",
                        "failed"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "issued_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "delivery_deadline_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "instruction_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "expires_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "account_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "const": "default"
                        }
                      ]
                    },
                    "protocol": {
                      "enum": [
                        "http",
                        "socks5"
                      ]
                    },
                    "credentials": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "credentials_by_protocol": {
                      "type": "object",
                      "properties": {
                        "http": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "socks5": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "http",
                        "socks5"
                      ],
                      "additionalProperties": false
                    },
                    "credential_expires_at": {
                      "type": "array",
                      "items": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      }
                    },
                    "refund": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "amount_usd": {
                          "type": "number",
                          "minimum": 0
                        },
                        "credited_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "amount_usd",
                        "credited_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "product_id",
                    "title",
                    "type",
                    "quantity",
                    "total_usd",
                    "status",
                    "created_at",
                    "issued_at",
                    "delivery_deadline_at"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "issued": {
                    "summary": "Выданный заказ",
                    "value": {
                      "id": "c84b0abf-1e0f-4ac9-b4a7-21f0d65656a3",
                      "product_id": "p_62dc14061bbb1bda4ea26b3d5b8fb149",
                      "title": "Германия [DC]",
                      "type": "dc",
                      "quantity": 1,
                      "total_usd": 0.9,
                      "status": "complete",
                      "created_at": "2026-11-16T20:00:00.000Z",
                      "issued_at": "2026-11-16T20:00:05.000Z",
                      "delivery_deadline_at": null,
                      "expires_at": "2026-12-16T20:00:00.000Z",
                      "protocol": "http",
                      "credentials": [
                        "192.0.2.10:3128:demo:example"
                      ],
                      "credentials_by_protocol": {
                        "http": [
                          "192.0.2.10:3128:demo:example"
                        ],
                        "socks5": [
                          "192.0.2.10:1081:demo:example"
                        ]
                      },
                      "credential_expires_at": [
                        "2026-12-16T20:00:00.000Z"
                      ]
                    }
                  },
                  "refunded": {
                    "summary": "Заказ с возвратом",
                    "value": {
                      "id": "1b1fb180-762b-40b0-a7b5-16784130a358",
                      "product_id": "p_62dc14061bbb1bda4ea26b3d5b8fb149",
                      "title": "Германия [DC]",
                      "type": "dc",
                      "quantity": 1,
                      "total_usd": 0.9,
                      "status": "failed",
                      "created_at": "2026-11-16T20:01:00.000Z",
                      "issued_at": null,
                      "delivery_deadline_at": null,
                      "expires_at": null,
                      "refund": {
                        "id": "refund:1b1fb180-762b-40b0-a7b5-16784130a358",
                        "amount_usd": 0.9,
                        "credited_at": "2026-11-16T20:31:00.000Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{order_id}/renewal/quote": {
      "post": {
        "operationId": "renewal-quote",
        "summary": "Рассчитать продление",
        "description": "Рассчитывает продление активных статических DC и ISP на 30 или 90 дней по текущей цене аккаунта. Если у DC подключён UDP, продление включает UDP.",
        "tags": [
          "Заказы"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "days": {
                    "type": "integer",
                    "enum": [
                      30,
                      90
                    ]
                  },
                  "proxy_indexes": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "example": {
                "days": 30
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "quote_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "order_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "days": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 3650
                    },
                    "quantity": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "total_usd": {
                      "type": "number"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "status": {
                      "enum": [
                        "quoted",
                        "pending",
                        "review"
                      ]
                    }
                  },
                  "required": [
                    "quote_id",
                    "order_id",
                    "days",
                    "quantity",
                    "total_usd",
                    "expires_at",
                    "status"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "quote_id": "de2cdd43-1aa6-4f35-b9bc-0f2d05c286f0",
                  "order_id": "c84b0abf-1e0f-4ac9-b4a7-21f0d65656a3",
                  "days": 30,
                  "quantity": 1,
                  "total_usd": 0.9,
                  "expires_at": "2026-12-16T19:02:00.000Z",
                  "status": "quoted"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{order_id}/renewal/confirm": {
      "post": {
        "operationId": "renewal-confirm",
        "summary": "Подтвердить продление",
        "description": "Подтверждает продление с общего баланса. Повтор запроса с тем же quote_id возвращает ту же операцию. После статуса complete новую дату можно получить в деталях заказа.",
        "tags": [
          "Заказы"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quote_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "quote_id"
                ],
                "additionalProperties": false
              },
              "example": {
                "quote_id": "de2cdd43-1aa6-4f35-b9bc-0f2d05c286f0"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "quote_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "order_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "enum": [
                        "complete",
                        "pending",
                        "review",
                        "refunded"
                      ]
                    }
                  },
                  "required": [
                    "quote_id",
                    "order_id",
                    "status"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "quote_id": "de2cdd43-1aa6-4f35-b9bc-0f2d05c286f0",
                  "order_id": "c84b0abf-1e0f-4ac9-b4a7-21f0d65656a3",
                  "status": "complete"
                }
              }
            }
          },
          "202": {
            "description": "Продление обрабатывается",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "quote_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "order_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "enum": [
                        "complete",
                        "pending",
                        "review",
                        "refunded"
                      ]
                    }
                  },
                  "required": [
                    "quote_id",
                    "order_id",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rotating/{pool}": {
      "get": {
        "operationId": "pool",
        "summary": "Остаток и настройки пула",
        "description": "Возвращает оставшиеся ГБ, сохранённые настройки и признак поддержки городов. Для residential используется основной аккаунт.",
        "tags": [
          "Ротационные прокси"
        ],
        "parameters": [
          {
            "name": "pool",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "residential",
                "residential-plus",
                "mobile",
                "datacenter"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pool": {
                      "enum": [
                        "residential",
                        "residential-plus",
                        "mobile",
                        "datacenter"
                      ]
                    },
                    "available_gb": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "settings": {
                      "type": "object",
                      "properties": {
                        "countries": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[A-Z]{2}$"
                          },
                          "maxItems": 20,
                          "uniqueItems": true
                        },
                        "session": {
                          "enum": [
                            "random",
                            "sticky"
                          ]
                        },
                        "ttl": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 86400
                        },
                        "format": {
                          "enum": [
                            "colon",
                            "url"
                          ]
                        },
                        "count": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100
                        },
                        "protocol": {
                          "enum": [
                            "http",
                            "socks5"
                          ]
                        },
                        "cities": {
                          "type": "object",
                          "maxProperties": 20,
                          "propertyNames": {
                            "type": "string",
                            "pattern": "^[A-Z]{2}$"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
                          }
                        }
                      },
                      "required": [
                        "countries",
                        "session",
                        "ttl",
                        "format",
                        "count",
                        "protocol"
                      ],
                      "additionalProperties": false
                    },
                    "city_selection": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "pool",
                    "available_gb",
                    "settings",
                    "city_selection"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "pool": "mobile",
                  "available_gb": 8.5,
                  "settings": {
                    "countries": [],
                    "session": "random",
                    "ttl": 60,
                    "format": "colon",
                    "count": 5,
                    "protocol": "http"
                  },
                  "city_selection": true
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rotating/{pool}/countries": {
      "get": {
        "operationId": "countries",
        "summary": "Страны пула",
        "description": "Возвращает коды стран для settings.countries и поддержку выбора города. Для residential возвращает настроенные коды стран (country_source: configured). Для residential-plus, mobile и datacenter возвращает список из каталога пула (country_source: provider). Настроенный код не гарантирует наличие IP в момент подключения.",
        "tags": [
          "Ротационные прокси"
        ],
        "parameters": [
          {
            "name": "pool",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "residential",
                "residential-plus",
                "mobile",
                "datacenter"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "countries": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[A-Z]{2}$"
                      }
                    },
                    "country_source": {
                      "enum": [
                        "configured",
                        "provider"
                      ]
                    },
                    "city_selection": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "countries",
                    "country_source",
                    "city_selection"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "countries": [
                    "DE",
                    "US"
                  ],
                  "country_source": "provider",
                  "city_selection": true
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rotating/{pool}/cities": {
      "get": {
        "operationId": "cities",
        "summary": "Города страны",
        "description": "Для residential-plus, mobile и datacenter возвращает города выбранной страны. Передайте выбранный id в settings.cities. Пустой список при city_selection: true означает, что для этой страны нет доступных городов. Для residential список городов недоступен, ответ содержит cities: [] и city_selection: false.",
        "tags": [
          "Ротационные прокси"
        ],
        "parameters": [
          {
            "name": "pool",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "residential",
                "residential-plus",
                "mobile",
                "datacenter"
              ]
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cities": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "city_selection": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "cities",
                    "city_selection"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "cities": [
                    {
                      "id": "berlin",
                      "name": "Berlin"
                    }
                  ],
                  "city_selection": true
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rotating/{pool}/settings": {
      "put": {
        "operationId": "pool-settings",
        "summary": "Сохранить или сбросить настройки",
        "description": "Заменяет настройки пула, общие с ботом и Mini App. Для сброса отправьте пустой объект {}.",
        "tags": [
          "Ротационные прокси"
        ],
        "parameters": [
          {
            "name": "pool",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "residential",
                "residential-plus",
                "mobile",
                "datacenter"
              ]
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "settings": {
                    "type": "object",
                    "properties": {
                      "countries": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[A-Z]{2}$"
                        },
                        "maxItems": 20,
                        "uniqueItems": true
                      },
                      "session": {
                        "enum": [
                          "random",
                          "sticky"
                        ]
                      },
                      "ttl": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 86400
                      },
                      "format": {
                        "enum": [
                          "colon",
                          "url"
                        ]
                      },
                      "count": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "protocol": {
                        "enum": [
                          "http",
                          "socks5"
                        ]
                      },
                      "cities": {
                        "type": "object",
                        "maxProperties": 20,
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[A-Z]{2}$"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
                        }
                      }
                    },
                    "required": [
                      "countries",
                      "session",
                      "ttl",
                      "format",
                      "count",
                      "protocol"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "example": {
                "settings": {
                  "countries": [
                    "DE"
                  ],
                  "cities": {
                    "DE": "berlin"
                  },
                  "session": "sticky",
                  "ttl": 60,
                  "format": "url",
                  "count": 1,
                  "protocol": "http"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "settings": {
                      "type": "object",
                      "properties": {
                        "countries": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[A-Z]{2}$"
                          },
                          "maxItems": 20,
                          "uniqueItems": true
                        },
                        "session": {
                          "enum": [
                            "random",
                            "sticky"
                          ]
                        },
                        "ttl": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 86400
                        },
                        "format": {
                          "enum": [
                            "colon",
                            "url"
                          ]
                        },
                        "count": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100
                        },
                        "protocol": {
                          "enum": [
                            "http",
                            "socks5"
                          ]
                        },
                        "cities": {
                          "type": "object",
                          "maxProperties": 20,
                          "propertyNames": {
                            "type": "string",
                            "pattern": "^[A-Z]{2}$"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
                          }
                        }
                      },
                      "required": [
                        "countries",
                        "session",
                        "ttl",
                        "format",
                        "count",
                        "protocol"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "settings"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "settings": {
                    "countries": [
                      "DE"
                    ],
                    "cities": {
                      "DE": "berlin"
                    },
                    "session": "sticky",
                    "ttl": 60,
                    "format": "url",
                    "count": 1,
                    "protocol": "http"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rotating/{pool}/proxies": {
      "post": {
        "operationId": "pool-generate",
        "summary": "Получить строки подключения",
        "description": "Генерирует прокси на трафике выбранного пула. Без settings используются сохранённые настройки. Чтобы изменить их для одного запроса, передайте полный объект settings в том же формате, что в PUT /rotating/{pool}/settings.",
        "tags": [
          "Ротационные прокси"
        ],
        "parameters": [
          {
            "name": "pool",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "residential",
                "residential-plus",
                "mobile",
                "datacenter"
              ]
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "settings": {
                    "type": "object",
                    "properties": {
                      "countries": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[A-Z]{2}$"
                        },
                        "maxItems": 20,
                        "uniqueItems": true
                      },
                      "session": {
                        "enum": [
                          "random",
                          "sticky"
                        ]
                      },
                      "ttl": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 86400
                      },
                      "format": {
                        "enum": [
                          "colon",
                          "url"
                        ]
                      },
                      "count": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "protocol": {
                        "enum": [
                          "http",
                          "socks5"
                        ]
                      },
                      "cities": {
                        "type": "object",
                        "maxProperties": 20,
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[A-Z]{2}$"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
                        }
                      }
                    },
                    "required": [
                      "countries",
                      "session",
                      "ttl",
                      "format",
                      "count",
                      "protocol"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "example": {
                "settings": {
                  "countries": [
                    "DE"
                  ],
                  "session": "sticky",
                  "ttl": 60,
                  "format": "url",
                  "count": 1,
                  "protocol": "http"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "proxies": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "proxies"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "proxies": [
                    "http://demo:example@192.0.2.10:3128"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rotating/{pool}/rotate-password": {
      "post": {
        "operationId": "pool-rotate",
        "summary": "Сменить пароль пула",
        "description": "Меняет пароль прокси выбранного пула. Получите новые строки подключения после смены пароля. Интервал между сменами — пять минут.",
        "tags": [
          "Ротационные прокси"
        ],
        "parameters": [
          {
            "name": "pool",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "residential",
                "residential-plus",
                "mobile",
                "datacenter"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rotated": {
                      "const": true
                    }
                  },
                  "required": [
                    "rotated"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "rotated": true
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rotating/{pool}/accounts": {
      "get": {
        "operationId": "accounts",
        "summary": "Список аккаунтов",
        "description": "Возвращает основной аккаунт, общий с ботом, и дополнительные аккаунты владельца ключа в выбранном пуле. Остаток трафика доступен по ID аккаунта.",
        "tags": [
          "Субаккаунты"
        ],
        "parameters": [
          {
            "name": "pool",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "residential",
                "residential-plus",
                "mobile",
                "datacenter"
              ]
            },
            "example": "residential"
          }
        ],
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accounts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "const": "default"
                              }
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "isDefault": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "isDefault",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "accounts"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "accounts": [
                    {
                      "id": "default",
                      "name": "default",
                      "isDefault": true,
                      "createdAt": null
                    },
                    {
                      "id": "f8439efe-a659-4ef7-a405-94976b2fc183",
                      "name": "team01",
                      "isDefault": false,
                      "createdAt": 1794859200000
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-account",
        "summary": "Создать субаккаунт",
        "description": "Создаёт субаккаунт только в выбранном пуле. В примере team01 создаётся в residential с 0 GB. Передайте его ID как account_id и укажите product_id: residential и quantity: 1 в POST /api/v1/quotes. Затем подтвердите полученную котировку через POST /api/v1/orders.",
        "tags": [
          "Субаккаунты"
        ],
        "parameters": [
          {
            "name": "pool",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "residential",
                "residential-plus",
                "mobile",
                "datacenter"
              ]
            },
            "example": "residential"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9]{1,6}$"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              },
              "example": {
                "name": "team01"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "const": "default"
                        }
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "status": {
                      "enum": [
                        "pending_initial_traffic",
                        "ready",
                        "exhausted",
                        "unavailable"
                      ]
                    },
                    "allocatedGb": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "usedGb": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "availableGb": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "isDefault",
                    "createdAt",
                    "status",
                    "allocatedGb",
                    "usedGb",
                    "availableGb"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "id": "f8439efe-a659-4ef7-a405-94976b2fc183",
                  "name": "team01",
                  "isDefault": false,
                  "createdAt": 1794859200000,
                  "status": "pending_initial_traffic",
                  "allocatedGb": 0,
                  "usedGb": 0,
                  "availableGb": 0
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/residential/accounts": {
      "get": {
        "operationId": "accounts-residential",
        "summary": "Список аккаунтов",
        "description": "Возвращает основной аккаунт, общий с ботом, и дополнительные аккаунты владельца ключа в выбранном пуле. Остаток трафика доступен по ID аккаунта.",
        "tags": [
          "Субаккаунты"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accounts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "const": "default"
                              }
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "isDefault": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "isDefault",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "accounts"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "accounts": [
                    {
                      "id": "default",
                      "name": "default",
                      "isDefault": true,
                      "createdAt": null
                    },
                    {
                      "id": "f8439efe-a659-4ef7-a405-94976b2fc183",
                      "name": "team01",
                      "isDefault": false,
                      "createdAt": 1794859200000
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-account-residential",
        "summary": "Создать субаккаунт",
        "description": "Создаёт субаккаунт только в выбранном пуле. В примере team01 создаётся в residential с 0 GB. Передайте его ID как account_id и укажите product_id: residential и quantity: 1 в POST /api/v1/quotes. Затем подтвердите полученную котировку через POST /api/v1/orders.",
        "tags": [
          "Субаккаунты"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9]{1,6}$"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              },
              "example": {
                "name": "team01"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "const": "default"
                        }
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "status": {
                      "enum": [
                        "pending_initial_traffic",
                        "ready",
                        "exhausted",
                        "unavailable"
                      ]
                    },
                    "allocatedGb": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "usedGb": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "availableGb": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "isDefault",
                    "createdAt",
                    "status",
                    "allocatedGb",
                    "usedGb",
                    "availableGb"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "id": "f8439efe-a659-4ef7-a405-94976b2fc183",
                  "name": "team01",
                  "isDefault": false,
                  "createdAt": 1794859200000,
                  "status": "pending_initial_traffic",
                  "allocatedGb": 0,
                  "usedGb": 0,
                  "availableGb": 0
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rotating/{pool}/accounts/{account_id}": {
      "get": {
        "operationId": "account",
        "summary": "Статус и остаток трафика",
        "description": "Возвращает купленный, использованный и оставшийся трафик только выбранного пула. В примере покупка 1 GB для team01 уже завершена. Для residential-plus, mobile и datacenter используются отдельные субаккаунты. Возможные статусы: pending_initial_traffic, ready, exhausted, unavailable.",
        "tags": [
          "Субаккаунты"
        ],
        "parameters": [
          {
            "name": "pool",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "residential",
                "residential-plus",
                "mobile",
                "datacenter"
              ]
            },
            "example": "residential"
          },
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "const": "default"
                }
              ]
            },
            "example": "f8439efe-a659-4ef7-a405-94976b2fc183"
          }
        ],
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "const": "default"
                        }
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "status": {
                      "enum": [
                        "pending_initial_traffic",
                        "ready",
                        "exhausted",
                        "unavailable"
                      ]
                    },
                    "allocatedGb": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "usedGb": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "availableGb": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "isDefault",
                    "createdAt",
                    "status",
                    "allocatedGb",
                    "usedGb",
                    "availableGb"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "id": "f8439efe-a659-4ef7-a405-94976b2fc183",
                  "name": "team01",
                  "isDefault": false,
                  "createdAt": 1794859200000,
                  "status": "ready",
                  "allocatedGb": 1,
                  "usedGb": 0,
                  "availableGb": 1
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/residential/accounts/{account_id}": {
      "get": {
        "operationId": "account-residential",
        "summary": "Статус и остаток трафика",
        "description": "Возвращает купленный, использованный и оставшийся трафик только выбранного пула. В примере покупка 1 GB для team01 уже завершена. Для residential-plus, mobile и datacenter используются отдельные субаккаунты. Возможные статусы: pending_initial_traffic, ready, exhausted, unavailable.",
        "tags": [
          "Субаккаунты"
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "const": "default"
                }
              ]
            },
            "example": "f8439efe-a659-4ef7-a405-94976b2fc183"
          }
        ],
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "const": "default"
                        }
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "status": {
                      "enum": [
                        "pending_initial_traffic",
                        "ready",
                        "exhausted",
                        "unavailable"
                      ]
                    },
                    "allocatedGb": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "usedGb": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "availableGb": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "isDefault",
                    "createdAt",
                    "status",
                    "allocatedGb",
                    "usedGb",
                    "availableGb"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "id": "f8439efe-a659-4ef7-a405-94976b2fc183",
                  "name": "team01",
                  "isDefault": false,
                  "createdAt": 1794859200000,
                  "status": "ready",
                  "allocatedGb": 1,
                  "usedGb": 0,
                  "availableGb": 1
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rotating/{pool}/accounts/{account_id}/proxies": {
      "post": {
        "operationId": "generate",
        "summary": "Сгенерировать прокси",
        "description": "Возвращает строки подключения по настройкам выбранного аккаунта. Без settings основной аккаунт использует настройки бота, дополнительный — стандартные значения. Переданные настройки действуют только для этого запроса.",
        "tags": [
          "Субаккаунты"
        ],
        "parameters": [
          {
            "name": "pool",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "residential",
                "residential-plus",
                "mobile",
                "datacenter"
              ]
            }
          },
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "const": "default"
                }
              ]
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "settings": {
                    "type": "object",
                    "properties": {
                      "countries": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[A-Z]{2}$"
                        },
                        "maxItems": 20,
                        "uniqueItems": true
                      },
                      "session": {
                        "enum": [
                          "random",
                          "sticky"
                        ]
                      },
                      "ttl": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 86400
                      },
                      "format": {
                        "enum": [
                          "colon",
                          "url"
                        ]
                      },
                      "count": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "protocol": {
                        "enum": [
                          "http",
                          "socks5"
                        ]
                      },
                      "cities": {
                        "type": "object",
                        "maxProperties": 20,
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[A-Z]{2}$"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
                        }
                      }
                    },
                    "required": [
                      "countries",
                      "session",
                      "ttl",
                      "format",
                      "count",
                      "protocol"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "example": {
                "settings": {
                  "countries": [
                    "DE"
                  ],
                  "session": "sticky",
                  "ttl": 60,
                  "format": "url",
                  "count": 1,
                  "protocol": "http"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "proxies": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "proxies"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "proxies": [
                    "http://demo:example@192.0.2.10:3128"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/residential/accounts/{account_id}/proxies": {
      "post": {
        "operationId": "generate-residential",
        "summary": "Сгенерировать прокси",
        "description": "Возвращает строки подключения по настройкам выбранного аккаунта. Без settings основной аккаунт использует настройки бота, дополнительный — стандартные значения. Переданные настройки действуют только для этого запроса.",
        "tags": [
          "Субаккаунты"
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "const": "default"
                }
              ]
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "settings": {
                    "type": "object",
                    "properties": {
                      "countries": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[A-Z]{2}$"
                        },
                        "maxItems": 20,
                        "uniqueItems": true
                      },
                      "session": {
                        "enum": [
                          "random",
                          "sticky"
                        ]
                      },
                      "ttl": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 86400
                      },
                      "format": {
                        "enum": [
                          "colon",
                          "url"
                        ]
                      },
                      "count": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "protocol": {
                        "enum": [
                          "http",
                          "socks5"
                        ]
                      }
                    },
                    "required": [
                      "countries",
                      "session",
                      "ttl",
                      "format",
                      "count",
                      "protocol"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "example": {
                "settings": {
                  "countries": [
                    "DE"
                  ],
                  "session": "sticky",
                  "ttl": 60,
                  "format": "url",
                  "count": 1,
                  "protocol": "http"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "proxies": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "proxies"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "proxies": [
                    "http://demo:example@192.0.2.10:3128"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rotating/{pool}/accounts/{account_id}/rotate-password": {
      "post": {
        "operationId": "rotate",
        "summary": "Заменить пароль прокси",
        "description": "Меняет пароль выбранного аккаунта. После замены запросите новые строки подключения. Между сменами пароля должно пройти не менее пяти минут.",
        "tags": [
          "Субаккаунты"
        ],
        "parameters": [
          {
            "name": "pool",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "residential",
                "residential-plus",
                "mobile",
                "datacenter"
              ]
            }
          },
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "const": "default"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rotated": {
                      "const": true
                    }
                  },
                  "required": [
                    "rotated"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "rotated": true
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/residential/accounts/{account_id}/rotate-password": {
      "post": {
        "operationId": "rotate-residential",
        "summary": "Заменить пароль прокси",
        "description": "Меняет пароль выбранного аккаунта. После замены запросите новые строки подключения. Между сменами пароля должно пройти не менее пяти минут.",
        "tags": [
          "Субаккаунты"
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "const": "default"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Результат запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rotated": {
                      "const": true
                    }
                  },
                  "required": [
                    "rotated"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "rotated": true
                }
              }
            }
          },
          "default": {
            "description": "Ошибка",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    }
  }
}
