{
    "openapi": "3.1.1",
    "info": {
        "title": "ProxyCola Partner API",
        "version": "1.0.0",
        "description": "Buy, renew and manage your proxies. Import this file in Postman, then set your Bearer token. POST bodies use JSON. Prices and balances are in USD; dates are UTC."
    },
    "servers": [
        {
            "url": "https://proxycola.com"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "Account & catalog"
        },
        {
            "name": "Buy & renew"
        },
        {
            "name": "Manage proxies"
        }
    ],
    "paths": {
        "/api/v1/account/": {
            "get": {
                "operationId": "account",
                "tags": [
                    "Account & catalog"
                ],
                "summary": "Account & limits",
                "description": "Verify your token and get the account ID, email and request limit per minute.",
                "responses": {
                    "200": {
                        "description": "Success. Examples use illustrative IDs, prices and credentials.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/accountResponse"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "user": {
                                            "id": 42,
                                            "email": "you@example.com"
                                        },
                                        "api_key": {
                                            "id": 1,
                                            "name": "Partner API",
                                            "rate_limit_per_minute": 300
                                        }
                                    },
                                    "request_id": "..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "When present, seconds to wait before retrying.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 0
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/balance/": {
            "get": {
                "operationId": "balance",
                "tags": [
                    "Account & catalog"
                ],
                "summary": "Balance in USD",
                "description": "Check your USD balance before buying or renewing.",
                "responses": {
                    "200": {
                        "description": "Success. Examples use illustrative IDs, prices and credentials.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/balanceResponse"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "balance": 100,
                                        "currency": "usd",
                                        "balance_text": "$100.00"
                                    },
                                    "request_id": "..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "When present, seconds to wait before retrying.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 0
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/catalog/": {
            "get": {
                "operationId": "catalog",
                "tags": [
                    "Account & catalog"
                ],
                "summary": "Countries & plans",
                "description": "Get countries, operators and plans. Use their codes and amount values when buying.\n\nChoose a country with is_available=true and an operator with is_sellable=true. plans contains prices by number of days, e.g. plans[\"30\"].",
                "responses": {
                    "200": {
                        "description": "Success. Examples use illustrative IDs, prices and credentials.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/catalogResponse"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "countries": [
                                            {
                                                "id": 1,
                                                "code": "ua",
                                                "name": "Ukraine",
                                                "operators": [
                                                    {
                                                        "id": 1,
                                                        "code": "kyivstar",
                                                        "name": "Kyivstar",
                                                        "is_active": 1,
                                                        "availables": 10,
                                                        "is_sellable": true
                                                    }
                                                ],
                                                "plans": {
                                                    "30": {
                                                        "id": 1,
                                                        "amount": 30,
                                                        "price": "10.00",
                                                        "old_price": null,
                                                        "currency": "usd",
                                                        "is_active": 1,
                                                        "sort": 30
                                                    }
                                                },
                                                "is_available": true
                                            }
                                        ]
                                    },
                                    "request_id": "..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "When present, seconds to wait before retrying.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 0
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/proxies/quote/": {
            "post": {
                "operationId": "quote",
                "tags": [
                    "Buy & renew"
                ],
                "summary": "Check the price",
                "description": "Calculate the purchase or renewal price before paying. No money is charged.\n\nFor renewal, send only proxy_id, amount and optionally max_total. A quote does not reserve price or availability.",
                "responses": {
                    "200": {
                        "description": "Success. Examples use illustrative IDs, prices and credentials.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/quoteResponse"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "plan_type": "time",
                                        "plan_id": 1,
                                        "amount": 30,
                                        "unit": "days",
                                        "quantity": 1,
                                        "country_id": 1,
                                        "country_code": "ua",
                                        "operator_id": 1,
                                        "operator_code": "kyivstar",
                                        "unit_price": "10.00",
                                        "total": "10.00",
                                        "currency": "usd"
                                    },
                                    "request_id": "..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "When present, seconds to wait before retrying.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 0
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/quoteRequest"
                            },
                            "examples": {
                                "purchase": {
                                    "value": {
                                        "plan_type": "time",
                                        "amount": 30,
                                        "country_code": "ua",
                                        "operator_code": "kyivstar",
                                        "max_total": "10.00"
                                    }
                                },
                                "renewal": {
                                    "value": {
                                        "proxy_id": 1702,
                                        "amount": 30,
                                        "max_total": "10.00"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/proxies/buy/": {
            "post": {
                "operationId": "buy",
                "tags": [
                    "Buy & renew"
                ],
                "summary": "Buy proxies",
                "description": "Buy 1–10 proxies from your balance in one request. If the purchase fails, none are charged or created.\n\nUse the returned proxy_ids in GET /proxies/?ids=… for connection details. HTTP 201 means purchased; 200 with replayed=true returns an earlier result. Activation may take a short time.\n\nRequired header Idempotency-Key: 8–128 letters, digits or . _ : -. Use a new key for each new operation. After a timeout, retry the same request and key to avoid a second charge.",
                "responses": {
                    "201": {
                        "description": "Purchased. Examples use illustrative IDs, prices and credentials.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/buyResponse"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "operation_id": 42,
                                        "proxy_ids": [
                                            1702
                                        ],
                                        "quote": {
                                            "plan_type": "time",
                                            "plan_id": 1,
                                            "amount": 30,
                                            "unit": "days",
                                            "quantity": 1,
                                            "country_id": 1,
                                            "country_code": "ua",
                                            "operator_id": 1,
                                            "operator_code": "kyivstar",
                                            "unit_price": "10.00",
                                            "total": "10.00",
                                            "currency": "usd"
                                        },
                                        "balance_after": "90.00",
                                        "replayed": false
                                    },
                                    "request_id": "..."
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "Previously completed purchase; no new charge.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/buyResponse"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "operation_id": 42,
                                        "proxy_ids": [
                                            1702
                                        ],
                                        "quote": {
                                            "plan_type": "time",
                                            "plan_id": 1,
                                            "amount": 30,
                                            "unit": "days",
                                            "quantity": 1,
                                            "country_id": 1,
                                            "country_code": "ua",
                                            "operator_id": 1,
                                            "operator_code": "kyivstar",
                                            "unit_price": "10.00",
                                            "total": "10.00",
                                            "currency": "usd"
                                        },
                                        "balance_after": "90.00",
                                        "replayed": true
                                    },
                                    "request_id": "..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "When present, seconds to wait before retrying.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 0
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/buyRequest"
                            },
                            "example": {
                                "plan_type": "time",
                                "amount": 30,
                                "country_code": "ua",
                                "operator_code": "kyivstar",
                                "max_total": "10.00"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "description": "Required header Idempotency-Key: 8–128 letters, digits or . _ : -. Use a new key for each new operation. After a timeout, retry the same request and key to avoid a second charge.",
                        "schema": {
                            "type": "string",
                            "minLength": 8,
                            "maxLength": 128,
                            "pattern": "^[A-Za-z0-9._:-]{8,128}$"
                        }
                    }
                ]
            }
        },
        "/api/v1/proxies/renew/": {
            "post": {
                "operationId": "renew",
                "tags": [
                    "Buy & renew"
                ],
                "summary": "Renew a proxy",
                "description": "Add days to your proxy. Unused time is kept; an expired term restarts at renewal.\n\nLogin, password and port stay the same. Blocked or archived proxies cannot be renewed. Success: HTTP 200; replayed=true means no new charge.\n\nRequired header Idempotency-Key: 8–128 letters, digits or . _ : -. Use a new key for each new operation. After a timeout, retry the same request and key to avoid a second charge.",
                "responses": {
                    "200": {
                        "description": "Success. Examples use illustrative IDs, prices and credentials.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/renewResponse"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "proxy_id": 1702,
                                        "quote": {
                                            "proxy_id": 1702,
                                            "plan_type": "time",
                                            "plan_id": 1,
                                            "amount": 30,
                                            "unit": "days",
                                            "quantity": 1,
                                            "unit_price": "10.00",
                                            "total": "10.00",
                                            "currency": "usd"
                                        },
                                        "expires_at": "2026-11-25 12:00:00",
                                        "traffic_left": 0,
                                        "operation_id": 43,
                                        "balance_after": "80.00",
                                        "replayed": false
                                    },
                                    "request_id": "..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "When present, seconds to wait before retrying.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 0
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/renewRequest"
                            },
                            "example": {
                                "proxy_id": 1702,
                                "amount": 30,
                                "max_total": "10.00"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "description": "Required header Idempotency-Key: 8–128 letters, digits or . _ : -. Use a new key for each new operation. After a timeout, retry the same request and key to avoid a second charge.",
                        "schema": {
                            "type": "string",
                            "minLength": 8,
                            "maxLength": 128,
                            "pattern": "^[A-Za-z0-9._:-]{8,128}$"
                        }
                    }
                ]
            }
        },
        "/api/v1/proxies/": {
            "get": {
                "operationId": "proxies",
                "tags": [
                    "Manage proxies"
                ],
                "summary": "Proxies & credentials",
                "description": "List proxies with credentials, connection URLs and settings. Find specific proxies by ID, port or status.\n\nFilters apply together. pagination.total counts matches before pagination. Archived proxies are excluded. traffic_left is in bytes; dates are UTC.",
                "responses": {
                    "200": {
                        "description": "Success. Examples use illustrative IDs, prices and credentials.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/proxiesResponse"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "items": [
                                            {
                                                "id": 1702,
                                                "host": "tproxy.pro",
                                                "port": 20000,
                                                "login": "example_user",
                                                "password": "<PROXY_PASSWORD>",
                                                "http_url": "http://example_user:<PROXY_PASSWORD>@tproxy.pro:20000",
                                                "socks5_url": "socks5://example_user:<PROXY_PASSWORD>@tproxy.pro:20000",
                                                "udp_supported": false,
                                                "plan_type": "time",
                                                "status": 1,
                                                "is_active": true,
                                                "expires_at": "2026-10-25 12:00:00",
                                                "traffic_left": 0,
                                                "country": {
                                                    "id": 1,
                                                    "code": "ua",
                                                    "name": "Ukraine"
                                                },
                                                "operator": {
                                                    "id": 1,
                                                    "code": "kyivstar",
                                                    "name": "Kyivstar"
                                                },
                                                "auto_renew": false,
                                                "ip_change_interval": 0,
                                                "ip_bindings": []
                                            }
                                        ],
                                        "pagination": {
                                            "limit": 100,
                                            "offset": 0,
                                            "total": 1
                                        }
                                    },
                                    "request_id": "..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "When present, seconds to wait before retrying.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 0
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "ids",
                        "in": "query",
                        "required": false,
                        "description": "1–100 IDs separated by commas, e.g. 1702,1703.",
                        "schema": {
                            "type": "string",
                            "pattern": "^[1-9][0-9]*(,[1-9][0-9]*){0,99}$",
                            "example": "1702,1703"
                        }
                    },
                    {
                        "name": "port",
                        "in": "query",
                        "required": false,
                        "description": "Proxy port: 1–65535.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 65535
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "all, active or expired (inactive). Defaults to all.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all",
                                "active",
                                "expired"
                            ],
                            "default": "all"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Page size: 1–500. Defaults to 100.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 500,
                            "default": 100
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Number of results to skip. Defaults to 0.",
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "default": 0
                        }
                    }
                ]
            }
        },
        "/api/v1/proxies/settings/": {
            "post": {
                "operationId": "settings",
                "tags": [
                    "Manage proxies"
                ],
                "summary": "Proxy settings",
                "description": "Change the IP rotation timer, auto-renewal, password or allowed IPs. Only supplied settings change.\n\nActive proxies only. Send at least one setting. Errors leave all settings unchanged; identical retries are safe. Changes may take a short time to apply.",
                "responses": {
                    "200": {
                        "description": "Success. Examples use illustrative IDs, prices and credentials.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/settingsResponse"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "proxy_id": 1702,
                                        "changed": true,
                                        "settings": {
                                            "auto_renew": true,
                                            "ip_change_interval": 10,
                                            "ip_bindings": [
                                                "192.0.2.10"
                                            ]
                                        }
                                    },
                                    "request_id": "..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "When present, seconds to wait before retrying.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 0
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/settingsRequest"
                            },
                            "example": {
                                "proxy_id": 1702,
                                "auto_renew": true,
                                "ip_change_interval": 10,
                                "ip_bindings": [
                                    "192.0.2.10"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/proxies/set-location/": {
            "post": {
                "operationId": "set_location",
                "tags": [
                    "Manage proxies"
                ],
                "summary": "Change location",
                "description": "Switch an active proxy to another country and operator from the catalog.\n\nCountry changes: once per 10 minutes; operator changes: once per 5 minutes. Changing country adjusts remaining paid time to the new country’s price.",
                "responses": {
                    "200": {
                        "description": "Success. Examples use illustrative IDs, prices and credentials.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/set_locationResponse"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "proxy_id": 1702,
                                        "country_code": "ua",
                                        "operator_code": "kyivstar"
                                    },
                                    "request_id": "..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "When present, seconds to wait before retrying.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 0
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/set_locationRequest"
                            },
                            "example": {
                                "proxy_id": 1702,
                                "country_code": "ua",
                                "operator_code": "kyivstar"
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/proxies/set-operator/": {
            "post": {
                "operationId": "set_operator",
                "tags": [
                    "Manage proxies"
                ],
                "summary": "Change operator",
                "description": "Change the operator while keeping the proxy’s country. Get the operator code from the catalog.\n\nChange operators once per 5 minutes. A cooldown response includes data.retry_after in seconds.",
                "responses": {
                    "200": {
                        "description": "Success. Examples use illustrative IDs, prices and credentials.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/set_operatorResponse"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "proxy_id": 1702,
                                        "country_code": "ua",
                                        "operator_code": "kyivstar"
                                    },
                                    "request_id": "..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "When present, seconds to wait before retrying.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 0
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/set_operatorRequest"
                            },
                            "example": {
                                "proxy_id": 1702,
                                "operator_code": "kyivstar"
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/proxies/change-ip/": {
            "post": {
                "operationId": "change_ip",
                "tags": [
                    "Manage proxies"
                ],
                "summary": "Rotate IP",
                "description": "Request a new exit IP for an active proxy. After rotation, use check-ip to verify the address.",
                "responses": {
                    "200": {
                        "description": "Success. Examples use illustrative IDs, prices and credentials.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/change_ipResponse"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "proxy_id": 1702,
                                        "hub_response": {}
                                    },
                                    "request_id": "..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "When present, seconds to wait before retrying.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 0
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "When present, seconds to wait before retrying.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 0
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/change_ipRequest"
                            },
                            "example": {
                                "proxy_id": 1702
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/proxies/check-ip/": {
            "post": {
                "operationId": "check_ip",
                "tags": [
                    "Manage proxies"
                ],
                "summary": "Check current IP",
                "description": "Get an active proxy’s current exit IP. This checks the connection without rotating the IP.",
                "responses": {
                    "200": {
                        "description": "Success. Examples use illustrative IDs, prices and credentials.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/check_ipResponse"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "proxy_id": 1702,
                                        "current_ip": "203.0.113.10"
                                    },
                                    "request_id": "..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "When present, seconds to wait before retrying.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 0
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Read error and message; keep request_id when contacting support. When data.retry_after is present, wait that many seconds.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/check_ipRequest"
                            },
                            "example": {
                                "proxy_id": 1702
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "buyRequest": {
                "type": "object",
                "properties": {
                    "plan_type": {
                        "type": "string",
                        "enum": [
                            "time"
                        ],
                        "description": "Plan type from the catalog."
                    },
                    "amount": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100000,
                        "description": "Number of days from the catalog."
                    },
                    "country_code": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Country code from countries[].code."
                    },
                    "operator_code": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Available operator code for the selected country from operators[].code."
                    },
                    "quantity": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10,
                        "default": 1,
                        "description": "1–10. Defaults to 1."
                    },
                    "max_total": {
                        "oneOf": [
                            {
                                "type": "string",
                                "pattern": "^[0-9]{1,9}(\\.[0-9]{1,2})?$"
                            },
                            {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 999999999
                            }
                        ],
                        "description": "Maximum total in USD, e.g. \"20.00\". A higher price is rejected without charging."
                    }
                },
                "additionalProperties": false,
                "required": [
                    "plan_type",
                    "amount",
                    "country_code",
                    "operator_code"
                ]
            },
            "renewRequest": {
                "type": "object",
                "properties": {
                    "proxy_id": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "Your proxy ID from GET /proxies/."
                    },
                    "amount": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100000,
                        "description": "Number of days from the catalog."
                    },
                    "max_total": {
                        "oneOf": [
                            {
                                "type": "string",
                                "pattern": "^[0-9]{1,9}(\\.[0-9]{1,2})?$"
                            },
                            {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 999999999
                            }
                        ],
                        "description": "Maximum total in USD, e.g. \"20.00\". A higher price is rejected without charging."
                    }
                },
                "additionalProperties": false,
                "required": [
                    "proxy_id",
                    "amount"
                ]
            },
            "settingsRequest": {
                "type": "object",
                "properties": {
                    "proxy_id": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "Your proxy ID from GET /proxies/."
                    },
                    "auto_renew": {
                        "type": "boolean",
                        "description": "true to enable, false to disable. Only paid proxies can enable it."
                    },
                    "ip_change_interval": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1440,
                        "description": "IP rotation interval in minutes: 0–1440. 0 disables the timer."
                    },
                    "password": {
                        "type": "string",
                        "minLength": 12,
                        "maxLength": 64,
                        "pattern": "^[!-~]{12,64}$",
                        "description": "New password: 12–64 printable ASCII characters, no spaces."
                    },
                    "ip_bindings": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "format": "ipv4"
                        },
                        "maxItems": 10,
                        "description": "Up to 10 allowed IPv4 addresses. [] removes the IP restriction."
                    }
                },
                "additionalProperties": false,
                "required": [
                    "proxy_id"
                ],
                "minProperties": 2
            },
            "set_locationRequest": {
                "type": "object",
                "properties": {
                    "proxy_id": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "Your proxy ID from GET /proxies/."
                    },
                    "country_code": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Country code from countries[].code."
                    },
                    "operator_code": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Available operator code for the selected country from operators[].code."
                    }
                },
                "additionalProperties": false,
                "required": [
                    "proxy_id",
                    "country_code",
                    "operator_code"
                ]
            },
            "set_operatorRequest": {
                "type": "object",
                "properties": {
                    "proxy_id": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "Your proxy ID from GET /proxies/."
                    },
                    "operator_code": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Available operator code for the selected country from operators[].code."
                    }
                },
                "additionalProperties": false,
                "required": [
                    "proxy_id",
                    "operator_code"
                ]
            },
            "change_ipRequest": {
                "type": "object",
                "properties": {
                    "proxy_id": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "Your proxy ID from GET /proxies/."
                    }
                },
                "additionalProperties": false,
                "required": [
                    "proxy_id"
                ]
            },
            "check_ipRequest": {
                "type": "object",
                "properties": {
                    "proxy_id": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "Your proxy ID from GET /proxies/."
                    }
                },
                "additionalProperties": false,
                "required": [
                    "proxy_id"
                ]
            },
            "quoteRequest": {
                "oneOf": [
                    {
                        "$ref": "#/components/schemas/buyRequest"
                    },
                    {
                        "$ref": "#/components/schemas/renewRequest"
                    }
                ]
            },
            "Plan": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "minimum": 1
                    },
                    "amount": {
                        "type": "integer"
                    },
                    "price": {
                        "type": "string",
                        "pattern": "^-?[0-9]+\\.[0-9]{2}$",
                        "description": "Amount in USD with two decimal places."
                    },
                    "old_price": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "currency": {
                        "type": "string"
                    },
                    "is_active": {
                        "type": "integer"
                    },
                    "sort": {
                        "type": "integer"
                    }
                },
                "additionalProperties": true
            },
            "CatalogCountry": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "label": {
                        "type": "string"
                    },
                    "has_operators": {
                        "type": "boolean"
                    },
                    "has_sellable_operators": {
                        "type": "boolean"
                    },
                    "is_available": {
                        "type": "boolean"
                    },
                    "discount_label": {
                        "type": "string"
                    },
                    "plans": {
                        "type": "object",
                        "additionalProperties": {
                            "$ref": "#/components/schemas/Plan"
                        }
                    },
                    "operators": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "code": {
                                    "type": "string"
                                },
                                "name": {
                                    "type": "string"
                                },
                                "is_active": {
                                    "type": "integer"
                                },
                                "availables": {
                                    "type": "integer"
                                },
                                "is_sellable": {
                                    "type": "boolean"
                                }
                            },
                            "additionalProperties": true
                        }
                    }
                },
                "additionalProperties": true
            },
            "PurchaseQuote": {
                "type": "object",
                "properties": {
                    "plan_type": {
                        "type": "string",
                        "enum": [
                            "time"
                        ]
                    },
                    "plan_id": {
                        "type": "integer",
                        "minimum": 1
                    },
                    "amount": {
                        "type": "integer"
                    },
                    "unit": {
                        "type": "string",
                        "enum": [
                            "days"
                        ],
                        "description": "gb denotes GiB (1073741824 bytes)."
                    },
                    "quantity": {
                        "type": "integer"
                    },
                    "unit_price": {
                        "type": "string",
                        "pattern": "^-?[0-9]+\\.[0-9]{2}$",
                        "description": "Amount in USD with two decimal places."
                    },
                    "total": {
                        "type": "string",
                        "pattern": "^-?[0-9]+\\.[0-9]{2}$",
                        "description": "Amount in USD with two decimal places."
                    },
                    "currency": {
                        "type": "string"
                    },
                    "country_id": {
                        "type": "integer",
                        "minimum": 1
                    },
                    "country_code": {
                        "type": "string"
                    },
                    "operator_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "operator_code": {
                        "type": "string"
                    }
                },
                "additionalProperties": true,
                "required": [
                    "plan_type",
                    "amount",
                    "total",
                    "country_code",
                    "operator_code"
                ]
            },
            "RenewalQuote": {
                "type": "object",
                "properties": {
                    "proxy_id": {
                        "type": "integer",
                        "minimum": 1
                    },
                    "plan_type": {
                        "type": "string",
                        "enum": [
                            "time"
                        ]
                    },
                    "plan_id": {
                        "type": "integer",
                        "minimum": 1
                    },
                    "amount": {
                        "type": "integer"
                    },
                    "unit": {
                        "type": "string",
                        "enum": [
                            "days"
                        ],
                        "description": "gb denotes GiB (1073741824 bytes)."
                    },
                    "quantity": {
                        "type": "integer"
                    },
                    "unit_price": {
                        "type": "string",
                        "pattern": "^-?[0-9]+\\.[0-9]{2}$",
                        "description": "Amount in USD with two decimal places."
                    },
                    "total": {
                        "type": "string",
                        "pattern": "^-?[0-9]+\\.[0-9]{2}$",
                        "description": "Amount in USD with two decimal places."
                    },
                    "currency": {
                        "type": "string"
                    }
                },
                "additionalProperties": true,
                "required": [
                    "proxy_id",
                    "plan_type",
                    "amount",
                    "total"
                ]
            },
            "Proxy": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "minimum": 1
                    },
                    "host": {
                        "type": "string"
                    },
                    "port": {
                        "type": "integer"
                    },
                    "login": {
                        "type": "string"
                    },
                    "password": {
                        "type": "string"
                    },
                    "http_url": {
                        "type": "string"
                    },
                    "socks5_url": {
                        "type": "string"
                    },
                    "udp_supported": {
                        "type": "boolean"
                    },
                    "plan_type": {
                        "type": "string",
                        "enum": [
                            "time"
                        ]
                    },
                    "status": {
                        "type": "integer"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "UTC date as YYYY-MM-DD HH:mm:ss, or null."
                    },
                    "traffic_left": {
                        "type": "integer",
                        "description": "Remaining traffic in bytes."
                    },
                    "country": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "code": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "additionalProperties": true
                    },
                    "operator": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "code": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "additionalProperties": true
                    },
                    "created_at": {
                        "type": "string",
                        "description": "UTC: YYYY-MM-DD HH:mm:ss."
                    },
                    "updated_at": {
                        "type": "string",
                        "description": "UTC: YYYY-MM-DD HH:mm:ss."
                    },
                    "auto_renew": {
                        "type": "boolean"
                    },
                    "ip_change_interval": {
                        "type": "integer"
                    },
                    "ip_bindings": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "format": "ipv4"
                        },
                        "maxItems": 10
                    }
                },
                "additionalProperties": true,
                "required": [
                    "id",
                    "host",
                    "port",
                    "login",
                    "password"
                ]
            },
            "Error": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": false
                    },
                    "error": {
                        "type": "string"
                    },
                    "message": {
                        "type": "string"
                    },
                    "request_id": {
                        "type": "string"
                    },
                    "data": {
                        "oneOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "retry_after": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "description": "Seconds to wait before retrying."
                                    }
                                },
                                "additionalProperties": true
                            },
                            {
                                "type": "array",
                                "items": {}
                            }
                        ]
                    }
                },
                "additionalProperties": true,
                "required": [
                    "success",
                    "error",
                    "message",
                    "request_id"
                ]
            },
            "accountResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "user": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "integer",
                                        "minimum": 1
                                    },
                                    "email": {
                                        "type": "string"
                                    }
                                },
                                "additionalProperties": true
                            },
                            "api_key": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "integer",
                                        "minimum": 1
                                    },
                                    "name": {
                                        "type": "string"
                                    },
                                    "rate_limit_per_minute": {
                                        "type": "integer"
                                    }
                                },
                                "additionalProperties": true
                            }
                        },
                        "additionalProperties": true
                    },
                    "request_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": true,
                "required": [
                    "success",
                    "data",
                    "request_id"
                ]
            },
            "balanceResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "balance": {
                                "type": "number"
                            },
                            "currency": {
                                "type": "string"
                            },
                            "balance_text": {
                                "type": "string"
                            }
                        },
                        "additionalProperties": true
                    },
                    "request_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": true,
                "required": [
                    "success",
                    "data",
                    "request_id"
                ]
            },
            "catalogResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "countries": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/CatalogCountry"
                                }
                            }
                        },
                        "additionalProperties": true
                    },
                    "request_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": true,
                "required": [
                    "success",
                    "data",
                    "request_id"
                ]
            },
            "quoteResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "data": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/PurchaseQuote"
                            },
                            {
                                "$ref": "#/components/schemas/RenewalQuote"
                            }
                        ]
                    },
                    "request_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": true,
                "required": [
                    "success",
                    "data",
                    "request_id"
                ]
            },
            "buyResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "proxy_ids": {
                                "type": "array",
                                "items": {
                                    "type": "integer",
                                    "minimum": 1
                                }
                            },
                            "quote": {
                                "$ref": "#/components/schemas/PurchaseQuote"
                            },
                            "operation_id": {
                                "type": "integer",
                                "minimum": 1
                            },
                            "balance_after": {
                                "type": "string",
                                "pattern": "^-?[0-9]+\\.[0-9]{2}$",
                                "description": "Amount in USD with two decimal places."
                            },
                            "replayed": {
                                "type": "boolean"
                            }
                        },
                        "additionalProperties": true
                    },
                    "request_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": true,
                "required": [
                    "success",
                    "data",
                    "request_id"
                ]
            },
            "renewResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "proxy_id": {
                                "type": "integer",
                                "minimum": 1
                            },
                            "quote": {
                                "$ref": "#/components/schemas/RenewalQuote"
                            },
                            "expires_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "UTC date as YYYY-MM-DD HH:mm:ss, or null."
                            },
                            "traffic_left": {
                                "type": "integer"
                            },
                            "operation_id": {
                                "type": "integer",
                                "minimum": 1
                            },
                            "balance_after": {
                                "type": "string",
                                "pattern": "^-?[0-9]+\\.[0-9]{2}$",
                                "description": "Amount in USD with two decimal places."
                            },
                            "replayed": {
                                "type": "boolean"
                            }
                        },
                        "additionalProperties": true
                    },
                    "request_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": true,
                "required": [
                    "success",
                    "data",
                    "request_id"
                ]
            },
            "proxiesResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "items": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/Proxy"
                                }
                            },
                            "pagination": {
                                "type": "object",
                                "properties": {
                                    "limit": {
                                        "type": "integer"
                                    },
                                    "offset": {
                                        "type": "integer"
                                    },
                                    "total": {
                                        "type": "integer"
                                    }
                                },
                                "additionalProperties": true
                            }
                        },
                        "additionalProperties": true
                    },
                    "request_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": true,
                "required": [
                    "success",
                    "data",
                    "request_id"
                ]
            },
            "settingsResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "proxy_id": {
                                "type": "integer",
                                "minimum": 1
                            },
                            "changed": {
                                "type": "boolean"
                            },
                            "settings": {
                                "type": "object",
                                "properties": {
                                    "auto_renew": {
                                        "type": "boolean"
                                    },
                                    "ip_change_interval": {
                                        "type": "integer"
                                    },
                                    "ip_bindings": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "format": "ipv4"
                                        },
                                        "maxItems": 10
                                    }
                                },
                                "additionalProperties": true
                            }
                        },
                        "additionalProperties": true
                    },
                    "request_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": true,
                "required": [
                    "success",
                    "data",
                    "request_id"
                ]
            },
            "set_locationResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "proxy_id": {
                                "type": "integer",
                                "minimum": 1
                            },
                            "country_code": {
                                "type": "string"
                            },
                            "operator_code": {
                                "type": "string"
                            },
                            "operator_name": {
                                "type": "string"
                            },
                            "country_name": {
                                "type": "string"
                            },
                            "expires_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "UTC date as YYYY-MM-DD HH:mm:ss, or null."
                            }
                        },
                        "additionalProperties": true
                    },
                    "request_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": true,
                "required": [
                    "success",
                    "data",
                    "request_id"
                ]
            },
            "set_operatorResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "proxy_id": {
                                "type": "integer",
                                "minimum": 1
                            },
                            "country_code": {
                                "type": "string"
                            },
                            "operator_code": {
                                "type": "string"
                            },
                            "operator_name": {
                                "type": "string"
                            },
                            "country_name": {
                                "type": "string"
                            },
                            "expires_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "UTC date as YYYY-MM-DD HH:mm:ss, or null."
                            }
                        },
                        "additionalProperties": true
                    },
                    "request_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": true,
                "required": [
                    "success",
                    "data",
                    "request_id"
                ]
            },
            "change_ipResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "proxy_id": {
                                "type": "integer",
                                "minimum": 1
                            },
                            "hub_response": {
                                "type": "object",
                                "properties": {
                                    "success": {
                                        "type": "boolean"
                                    },
                                    "status": {
                                        "type": "string"
                                    },
                                    "message": {
                                        "type": "string"
                                    },
                                    "old_ip": {
                                        "type": "string"
                                    },
                                    "new_ip": {
                                        "type": "string"
                                    },
                                    "operator": {
                                        "type": "string"
                                    },
                                    "country": {
                                        "type": "string"
                                    },
                                    "time": {
                                        "type": "number"
                                    }
                                },
                                "additionalProperties": true
                            }
                        },
                        "additionalProperties": true
                    },
                    "request_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": true,
                "required": [
                    "success",
                    "data",
                    "request_id"
                ]
            },
            "check_ipResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "proxy_id": {
                                "type": "integer",
                                "minimum": 1
                            },
                            "current_ip": {
                                "type": "string"
                            },
                            "time": {
                                "type": "number"
                            },
                            "check_url": {
                                "type": "string"
                            },
                            "attempts": {
                                "type": "integer"
                            }
                        },
                        "additionalProperties": true
                    },
                    "request_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": true,
                "required": [
                    "success",
                    "data",
                    "request_id"
                ]
            }
        }
    }
}