{
    "openapi": "3.1.0",
    "info": {
        "title": "T7Proxy API",
        "version": "1.0.0",
        "description": "Buy and manage T7Proxy proxies from your code. Docs: https://t7proxy.com/docs/api",
        "contact": {
            "name": "T7Proxy support",
            "email": "support@t7proxy.com",
            "url": "https://t7proxy.com/de"
        }
    },
    "servers": [
        {
            "url": "https://t7proxy.com/api/v1"
        }
    ],
    "tags": [
        {
            "name": "Account"
        },
        {
            "name": "Plans and pricing"
        },
        {
            "name": "Orders"
        },
        {
            "name": "Proxies"
        },
        {
            "name": "Residential"
        },
        {
            "name": "Developer tools"
        }
    ],
    "paths": {
        "/account": {
            "get": {
                "operationId": "getAccount",
                "summary": "Get account",
                "description": "The account behind the key: wallet balance, live orders and proxies, and whether this key may buy. Call this first to check the key works and see the balance. The API can't add money: send the user to `top_up_url`.",
                "tags": [
                    "Account"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "email": "you@example.com",
                                        "name": "Alex",
                                        "balance_usd": 48.5,
                                        "live_orders": 3,
                                        "live_proxies": 27,
                                        "processing_orders": 0,
                                        "key_can_buy": true,
                                        "top_up_url": "https://t7proxy.com/dashboard/wallet",
                                        "note": "Top-ups are made by the account owner on the website (card or crypto). This server cannot add money."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "unauthenticated",
                                        "message": "Missing or revoked T7Proxy key. Create one at https://t7proxy.com/dashboard/api."
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "forbidden",
                                        "message": "Confirm your email address on the website to use this key."
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key"
            }
        },
        "/me": {
            "get": {
                "operationId": "getMe",
                "summary": "Who is signed in",
                "description": "The person behind the key or signed-in app: name, email, wallet balance, and links to their dashboard pages. Made for apps that show who is signed in (T7Proxy Desktop uses it). `links` open the website pages for things the API does not do, such as topping up.",
                "tags": [
                    "Account"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "id": 1207,
                                        "name": "Alex",
                                        "email": "you@example.com",
                                        "email_verified": true,
                                        "two_factor_enabled": false,
                                        "balance_usd": 48.5,
                                        "key_can_buy": false,
                                        "links": {
                                            "dashboard": "https://t7proxy.com/dashboard",
                                            "my_proxies": "https://t7proxy.com/dashboard?tab=my",
                                            "buy": "https://t7proxy.com/dashboard/buy",
                                            "wallet": "https://t7proxy.com/dashboard/wallet",
                                            "account": "https://t7proxy.com/dashboard/settings",
                                            "check_ip": "https://t7proxy.com/ip"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "unauthenticated",
                                        "message": "Missing or revoked T7Proxy key. Create one at https://t7proxy.com/dashboard/api."
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "forbidden",
                                        "message": "Confirm your email address on the website to use this key."
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key"
            }
        },
        "/transactions": {
            "get": {
                "operationId": "listTransactions",
                "summary": "List transactions",
                "description": "Wallet history, newest first: top-ups, purchases, renewals, refunds and adjustments, with the balance after each. Amounts are positive for money in and negative for money out. `type` is `topup`, `purchase`, `refund` or `adjustment`.",
                "tags": [
                    "Account"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many entries, 1 to 200. Default 50.",
                        "schema": {
                            "type": "integer",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "balance_usd": 48.5,
                                        "transactions": [
                                            {
                                                "id": 9123,
                                                "type": "purchase",
                                                "description": "Datacenter IPv4 · United States · 30 days × 5",
                                                "amount_usd": -11.5,
                                                "balance_after_usd": 48.5,
                                                "at": "2026-11-17T09:30:12+00:00"
                                            },
                                            {
                                                "id": 9101,
                                                "type": "topup",
                                                "description": "Top-up by card",
                                                "amount_usd": 50,
                                                "balance_after_usd": 60,
                                                "at": "2026-11-16T18:02:44+00:00"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "invalid_request",
                                        "message": "The product id field is required."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key"
            }
        },
        "/plans": {
            "get": {
                "operationId": "listPlans",
                "summary": "List plans",
                "description": "Proxy plans on sale, with the product_id you pass to quote and buy. Per-IP plans (`ipv4`, `isp`, `mobile`, `ipv6`) are priced per IP for `period_days`. Residential is a traffic package. Plans with `buyable: false` are shown but not on sale right now.",
                "tags": [
                    "Plans and pricing"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "One of `ipv4`, `isp`, `resident`, `mobile`, `ipv6`.",
                        "schema": {
                            "type": "string",
                            "example": "ipv4"
                        }
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "Two-letter code (`US`, `DE`) or part of the country name.",
                        "schema": {
                            "type": "string",
                            "example": "US"
                        }
                    },
                    {
                        "name": "period_days",
                        "in": "query",
                        "required": false,
                        "description": "Only plans of this length, e.g. `30`.",
                        "schema": {
                            "type": "integer",
                            "example": 30
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Max plans, 1 to 200. Default 100. `truncated` says if there were more.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "plans": [
                                            {
                                                "product_id": 1042,
                                                "type": "ipv4",
                                                "type_name": "Datacenter IPv4",
                                                "label": "Datacenter IPv4 · United States · 30 days",
                                                "country_code": "US",
                                                "country_name": "United States",
                                                "carrier": null,
                                                "period_days": 30,
                                                "traffic_gb": null,
                                                "price_usd": 2.29999999999999982236431605997495353221893310546875,
                                                "price_per": "IP",
                                                "min_quantity": 5,
                                                "buyable": true,
                                                "other_periods": null
                                            }
                                        ],
                                        "total": 1,
                                        "truncated": false
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "invalid_request",
                                        "message": "The product id field is required."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key"
            }
        },
        "/quote": {
            "get": {
                "operationId": "getQuote",
                "summary": "Get a quote",
                "description": "The exact total for a plan and quantity, and whether the balance covers it. Nothing is charged. Includes volume discounts and your account discount. Show `total_usd` to the person paying before you buy. Out-of-range quantities are clamped to the plan's limits; the response says which quantity was priced.",
                "tags": [
                    "Plans and pricing"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "product_id",
                        "in": "query",
                        "required": true,
                        "description": "From List plans.",
                        "schema": {
                            "type": "integer",
                            "example": 1042
                        }
                    },
                    {
                        "name": "quantity",
                        "in": "query",
                        "required": false,
                        "description": "IPs to buy. Default: the plan's `min_quantity`. Datacenter IPv4: 5 to 1000; IPv6: 10 to 1000; static ISP: up to 500; mobile: up to 100. Ignored for Residential.",
                        "schema": {
                            "type": "integer",
                            "example": 5
                        }
                    },
                    {
                        "name": "days",
                        "in": "query",
                        "required": false,
                        "description": "A rental period from the plan's `other_periods` (e.g. 7, 90, 365). Default: the plan's `period_days`.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "plan": {
                                            "product_id": 1042,
                                            "type": "ipv4",
                                            "label": "Datacenter IPv4 · United States · 30 days",
                                            "price_usd": 2.29999999999999982236431605997495353221893310546875,
                                            "price_per": "IP",
                                            "min_quantity": 5,
                                            "buyable": true
                                        },
                                        "quantity": 5,
                                        "period_days": 30,
                                        "discount_percent": 0,
                                        "account_discount_usd": 0,
                                        "total_usd": 11.5,
                                        "balance_usd": 60,
                                        "enough_balance": true,
                                        "top_up_url": "https://t7proxy.com/dashboard/wallet"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "not_found",
                                        "message": "No order 5531 on this account. Call GET /api/v1/orders to see yours."
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "request_failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "request_failed",
                                        "message": "This plan is not sold for 60 days. See other_periods in GET /api/v1/plans."
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "invalid_request",
                                        "message": "The product id field is required."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key"
            }
        },
        "/orders": {
            "post": {
                "operationId": "buyProxies",
                "summary": "Buy proxies",
                "description": "Buy a plan and pay from the wallet. Returns the order with its proxies once they are delivered. This spends real money. Always send a `request_key` (or `Idempotency-Key` header) and reuse it on a retry, so a timeout never buys twice: see Safe retries. Most orders come back `active` with their proxies; some come back `processing` and are ready within minutes.",
                "tags": [
                    "Orders"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "Same as `request_key`, for clients that set it as a header.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "order": {
                                            "order_id": 5531,
                                            "label": "Datacenter IPv4 · United States · 30 days",
                                            "type": "ipv4",
                                            "country_code": "US",
                                            "quantity": 5,
                                            "status": "active",
                                            "live": true,
                                            "paid_usd": 11.5,
                                            "auto_renew": true,
                                            "renewable": true,
                                            "renew_price_usd": 11.5,
                                            "expires_at": "2026-12-17T09:30:12+00:00",
                                            "created_at": "2026-11-17T09:30:12+00:00",
                                            "proxies": [
                                                {
                                                    "proxy_id": 88120,
                                                    "host": "185.23.41.7",
                                                    "http_port": 50100,
                                                    "socks5_port": 50101,
                                                    "login": "t7u8812",
                                                    "password": "Kd93mXq2",
                                                    "http_url": "http://t7u8812:Kd93mXq2@185.23.41.7:50100",
                                                    "can_replace_ip": true
                                                },
                                                {
                                                    "proxy_id": 88121,
                                                    "host": "185.23.41.8",
                                                    "http_port": 50100,
                                                    "socks5_port": 50101,
                                                    "login": "t7u8812",
                                                    "password": "Kd93mXq2",
                                                    "http_url": "http://t7u8812:Kd93mXq2@185.23.41.8:50100",
                                                    "can_replace_ip": true
                                                }
                                            ]
                                        },
                                        "balance_usd": 48.5,
                                        "already_placed": false
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "read_only_key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "read_only_key",
                                        "message": "This key is read-only. To let it buy and renew from the wallet, create a key with \"Allow purchases\" at https://t7proxy.com/dashboard/api."
                                    }
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "insufficient_balance",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "insufficient_balance",
                                        "message": "Not enough balance for this order. Balance: $3.20. Top up at https://t7proxy.com/dashboard/wallet."
                                    }
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "price_changed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "price_changed",
                                        "message": "The price went up since you checked it: this order now costs $12.65. Check the new price and try again."
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "purchase_limit",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "purchase_limit",
                                        "message": "This account may place 20 purchases or renewals per hour through MCP. Try again in 12 minutes."
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "request_failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "request_failed",
                                        "message": "This plan is not sold for 60 days. See other_periods in GET /api/v1/plans."
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "invalid_request",
                                        "message": "The product id field is required."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Needs a key with Allow purchases",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "product_id": {
                                        "type": "integer",
                                        "example": 1042,
                                        "description": "From List plans."
                                    },
                                    "quantity": {
                                        "type": "integer",
                                        "example": 5,
                                        "description": "IPs to buy. Default: the plan's `min_quantity`. Datacenter IPv4: 5 to 1000; IPv6: 10 to 1000; static ISP: up to 500; mobile: up to 100. Ignored for Residential."
                                    },
                                    "request_key": {
                                        "type": "string",
                                        "example": "job-2026-11-17-us-dc-5",
                                        "description": "Your own id for this purchase, up to 64 letters, digits, `-` and `_`. Strongly recommended."
                                    },
                                    "days": {
                                        "type": "integer",
                                        "description": "A rental period from the plan's `other_periods`. Default: the plan's `period_days`."
                                    },
                                    "auto_renew": {
                                        "type": "boolean",
                                        "example": true,
                                        "description": "Renew from the wallet before the end. Default `false`."
                                    },
                                    "protocol": {
                                        "type": "string",
                                        "description": "IPv6 only: `HTTPS` (default) or `SOCKS5`. Other types serve both."
                                    },
                                    "allow_ip": {
                                        "type": "string",
                                        "description": "A public IPv4 address that may connect without a password. Not for Residential."
                                    },
                                    "intended_use": {
                                        "type": "string",
                                        "description": "The site or job the proxies are for, e.g. `Google` or `price monitoring`. Up to 60 characters. Not used for Mobile."
                                    },
                                    "expected_total_usd": {
                                        "type": "number",
                                        "example": 11.5,
                                        "description": "The `total_usd` of your quote: the most this order may cost. If it would cost more, nothing is bought and the error is `price_changed`."
                                    }
                                },
                                "required": [
                                    "product_id"
                                ]
                            },
                            "example": {
                                "product_id": 1042,
                                "quantity": 5,
                                "request_key": "job-2026-11-17-us-dc-5",
                                "auto_renew": true
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "listOrders",
                "summary": "List orders",
                "description": "Your proxy orders, newest first, with every proxy's host, ports, login and password. By default only live and processing orders. Set `with_credentials=false` for a light summary without proxies.",
                "tags": [
                    "Orders"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Only this type: `ipv4`, `isp`, `resident`, `mobile` or `ipv6`.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include_expired",
                        "in": "query",
                        "required": false,
                        "description": "Also list orders that have ended. Default `false`.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "with_credentials",
                        "in": "query",
                        "required": false,
                        "description": "Include the proxies with logins and passwords. Default `true`.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Max orders, 1 to 100. Default 50.",
                        "schema": {
                            "type": "integer",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "orders": [
                                            {
                                                "order_id": 5531,
                                                "label": "Datacenter IPv4 · United States · 30 days",
                                                "type": "ipv4",
                                                "country_code": "US",
                                                "quantity": 5,
                                                "status": "active",
                                                "live": true,
                                                "paid_usd": 11.5,
                                                "auto_renew": true,
                                                "renewable": true,
                                                "renew_price_usd": 11.5,
                                                "expires_at": "2026-12-17T09:30:12+00:00",
                                                "created_at": "2026-11-17T09:30:12+00:00",
                                                "proxies": [
                                                    {
                                                        "proxy_id": 88120,
                                                        "host": "185.23.41.7",
                                                        "http_port": 50100,
                                                        "socks5_port": 50101,
                                                        "login": "t7u8812",
                                                        "password": "Kd93mXq2",
                                                        "http_url": "http://t7u8812:Kd93mXq2@185.23.41.7:50100",
                                                        "can_replace_ip": true
                                                    },
                                                    {
                                                        "proxy_id": 88121,
                                                        "host": "185.23.41.8",
                                                        "http_port": 50100,
                                                        "socks5_port": 50101,
                                                        "login": "t7u8812",
                                                        "password": "Kd93mXq2",
                                                        "http_url": "http://t7u8812:Kd93mXq2@185.23.41.8:50100",
                                                        "can_replace_ip": true
                                                    }
                                                ]
                                            }
                                        ],
                                        "count": 1
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "invalid_request",
                                        "message": "The product id field is required."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key"
            }
        },
        "/orders/{order_id}": {
            "get": {
                "operationId": "getOrder",
                "summary": "Get an order",
                "description": "One order with its status, end date and proxies. Use it to wait for an order that is `processing`, or to read new IPs after Replace an IP.",
                "tags": [
                    "Orders"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "order_id",
                        "in": "path",
                        "required": true,
                        "description": "The order's `order_id`.",
                        "schema": {
                            "type": "integer",
                            "example": 5531
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "order": {
                                            "order_id": 5531,
                                            "label": "Datacenter IPv4 · United States · 30 days",
                                            "type": "ipv4",
                                            "country_code": "US",
                                            "quantity": 5,
                                            "status": "active",
                                            "live": true,
                                            "paid_usd": 11.5,
                                            "auto_renew": true,
                                            "renewable": true,
                                            "renew_price_usd": 11.5,
                                            "expires_at": "2026-12-17T09:30:12+00:00",
                                            "created_at": "2026-11-17T09:30:12+00:00",
                                            "proxies": [
                                                {
                                                    "proxy_id": 88120,
                                                    "host": "185.23.41.7",
                                                    "http_port": 50100,
                                                    "socks5_port": 50101,
                                                    "login": "t7u8812",
                                                    "password": "Kd93mXq2",
                                                    "http_url": "http://t7u8812:Kd93mXq2@185.23.41.7:50100",
                                                    "can_replace_ip": true
                                                },
                                                {
                                                    "proxy_id": 88121,
                                                    "host": "185.23.41.8",
                                                    "http_port": 50100,
                                                    "socks5_port": 50101,
                                                    "login": "t7u8812",
                                                    "password": "Kd93mXq2",
                                                    "http_url": "http://t7u8812:Kd93mXq2@185.23.41.8:50100",
                                                    "can_replace_ip": true
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "not_found",
                                        "message": "No order 5531 on this account. Call GET /api/v1/orders to see yours."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key"
            }
        },
        "/orders/{order_id}/export": {
            "get": {
                "operationId": "exportOrder",
                "summary": "Export a proxy list",
                "description": "An order's proxies as plain text, one per line: ready for scrapers, antidetect browsers and proxy checkers. Answers `text/plain`. Errors are still JSON.",
                "tags": [
                    "Orders"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "order_id",
                        "in": "path",
                        "required": true,
                        "description": "The order's `order_id`.",
                        "schema": {
                            "type": "integer",
                            "example": 5531
                        }
                    },
                    {
                        "name": "format",
                        "in": "query",
                        "required": false,
                        "description": "One of `host:port:login:password`, `login:password@host:port`, `url`. Default `host:port:login:password`.",
                        "schema": {
                            "type": "string",
                            "example": "host:port:login:password"
                        }
                    },
                    {
                        "name": "protocol",
                        "in": "query",
                        "required": false,
                        "description": "`http` (default) or `socks5`: which port to use, and the scheme for `url`.",
                        "schema": {
                            "type": "string",
                            "example": "http"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Proxy list",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                },
                                "example": "185.23.41.7:50100:t7u8812:Kd93mXq2\n185.23.41.8:50100:t7u8812:Kd93mXq2\n185.23.41.9:50100:t7u8812:Kd93mXq2\n"
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "not_found",
                                        "message": "No order 5531 on this account. Call GET /api/v1/orders to see yours."
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "invalid_request",
                                        "message": "The product id field is required."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key"
            }
        },
        "/orders/{order_id}/renew": {
            "post": {
                "operationId": "renewOrder",
                "summary": "Renew an order",
                "description": "Renew a live order for another period at today's price, paid from the wallet. The proxies keep the same IPs and logins; `expires_at` moves on by one period. Check `renewable` and `renew_price_usd` on the order first. Send a `request_key` (or `Idempotency-Key` header) and reuse it on a retry: the same key never renews twice, and the answer then has `already_renewed: true`. Residential packages can't be renewed: buy a new one.",
                "tags": [
                    "Orders"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "order_id",
                        "in": "path",
                        "required": true,
                        "description": "The order to renew.",
                        "schema": {
                            "type": "integer",
                            "example": 5531
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "Same as `request_key`, for clients that set it as a header.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "order": {
                                            "order_id": 5531,
                                            "label": "Datacenter IPv4 · United States · 30 days",
                                            "type": "ipv4",
                                            "country_code": "US",
                                            "quantity": 5,
                                            "status": "active",
                                            "live": true,
                                            "paid_usd": 11.5,
                                            "auto_renew": true,
                                            "renewable": true,
                                            "renew_price_usd": 11.5,
                                            "expires_at": "2027-01-16T09:30:12+00:00",
                                            "created_at": "2026-11-17T09:30:12+00:00"
                                        },
                                        "balance_usd": 37,
                                        "already_renewed": false
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "read_only_key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "read_only_key",
                                        "message": "This key is read-only. To let it buy and renew from the wallet, create a key with \"Allow purchases\" at https://t7proxy.com/dashboard/api."
                                    }
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "insufficient_balance",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "insufficient_balance",
                                        "message": "Not enough balance for this order. Balance: $3.20. Top up at https://t7proxy.com/dashboard/wallet."
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "purchase_limit",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "purchase_limit",
                                        "message": "This account may place 20 purchases or renewals per hour through MCP. Try again in 12 minutes."
                                    }
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "in_progress",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "in_progress",
                                        "message": "This order is already being renewed. Please check it again in a moment."
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "not_found",
                                        "message": "No order 5531 on this account. Call GET /api/v1/orders to see yours."
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "request_failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "request_failed",
                                        "message": "This plan is not sold for 60 days. See other_periods in GET /api/v1/plans."
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "invalid_request",
                                        "message": "The product id field is required."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Needs a key with Allow purchases",
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "request_key": {
                                        "type": "string",
                                        "example": "renew-5531-2026-12",
                                        "description": "Your own id for this renewal, up to 64 letters, digits, `-` and `_`. Strongly recommended; use a new one for each renewal."
                                    }
                                }
                            },
                            "example": {
                                "request_key": "renew-5531-2026-12"
                            }
                        }
                    }
                }
            }
        },
        "/orders/{order_id}/auto-renew": {
            "put": {
                "operationId": "setAutoRenew",
                "summary": "Set auto-renew",
                "description": "Turn auto-renew on or off for a live order. When on, the order renews from the wallet `renews_hours_before_end` hours before it ends. Needs a key that allows purchases, for off too, so a read-only key can't let orders lapse.",
                "tags": [
                    "Orders"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "order_id",
                        "in": "path",
                        "required": true,
                        "description": "A live, non-residential order.",
                        "schema": {
                            "type": "integer",
                            "example": 5531
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "order_id": 5531,
                                        "auto_renew": true,
                                        "renews_hours_before_end": 12
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "read_only_key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "read_only_key",
                                        "message": "This key is read-only. To let it buy and renew from the wallet, create a key with \"Allow purchases\" at https://t7proxy.com/dashboard/api."
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "request_failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "request_failed",
                                        "message": "This plan is not sold for 60 days. See other_periods in GET /api/v1/plans."
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "invalid_request",
                                        "message": "The product id field is required."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Needs a key with Allow purchases",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "on": {
                                        "type": "boolean",
                                        "example": true,
                                        "description": "`true` to turn on, `false` to turn off."
                                    }
                                },
                                "required": [
                                    "on"
                                ]
                            },
                            "example": {
                                "on": true
                            }
                        }
                    }
                }
            }
        },
        "/orders/{order_id}/proxies/{proxy_id}/replace": {
            "post": {
                "operationId": "replaceIp",
                "summary": "Replace an IP",
                "description": "Ask for a new IP for one proxy of a live order. Once per proxy every 24 hours (`can_replace_ip` on the proxy says if it's possible now). Not for Residential, which rotates by itself. We test the proxy first: one that works is not replaced and the call returns an error saying so. For a site that blocks the IP, send `reason` `CANT_CHANGE_NETWORK` with the site in `comment`. The new IP shows in Get an order within minutes to a few hours; login and password stay the same.",
                "tags": [
                    "Proxies"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "order_id",
                        "in": "path",
                        "required": true,
                        "description": "The order.",
                        "schema": {
                            "type": "integer",
                            "example": 5531
                        }
                    },
                    {
                        "name": "proxy_id",
                        "in": "path",
                        "required": true,
                        "description": "The proxy's `proxy_id`.",
                        "schema": {
                            "type": "integer",
                            "example": 88120
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "replacement_id": 412,
                                        "old_ip": "185.23.41.7",
                                        "status": "pending",
                                        "fee_usd": 0,
                                        "note": "The new IP appears in GET /api/v1/orders/{id} within a few minutes to a few hours."
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "read_only_key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "read_only_key",
                                        "message": "This key is read-only. To let it buy and renew from the wallet, create a key with \"Allow purchases\" at https://t7proxy.com/dashboard/api."
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "not_found",
                                        "message": "No order 5531 on this account. Call GET /api/v1/orders to see yours."
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "request_failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "request_failed",
                                        "message": "This plan is not sold for 60 days. See other_periods in GET /api/v1/plans."
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "invalid_request",
                                        "message": "The product id field is required."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Needs a key with Allow purchases",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "example": "CANT_CHANGE_NETWORK",
                                        "description": "One of `NOT_WORK`, `INCORRECT_LOCATION`, `LOW_SPEED`, `CANT_CHANGE_NETWORK`, `CUSTOM`."
                                    },
                                    "comment": {
                                        "type": "string",
                                        "example": "Blocked on the target site",
                                        "description": "Optional detail, up to 200 characters."
                                    }
                                },
                                "required": [
                                    "reason"
                                ]
                            },
                            "example": {
                                "reason": "CANT_CHANGE_NETWORK",
                                "comment": "Blocked on the target site"
                            }
                        }
                    }
                }
            }
        },
        "/proxies": {
            "get": {
                "operationId": "listProxies",
                "summary": "List proxies to connect",
                "description": "Every live proxy of the account in one flat list, ready to connect: host, ports, login and password. One row per proxy across all live orders, including orders shared with you by support. A residential package is one row (`rotating: true`) with its main login. Orders that were paid but are still being prepared are picked up first.",
                "tags": [
                    "Proxies"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "proxies": [
                                            {
                                                "id": 88120,
                                                "order_id": 5531,
                                                "type": "ipv4",
                                                "type_label": "IPv4",
                                                "label": "Datacenter IPv4 · United States · 30 days",
                                                "country": "us",
                                                "flag": "https://t7proxy.com/flags/us.svg",
                                                "host": "185.23.41.7",
                                                "port": 50100,
                                                "port_socks": 50101,
                                                "username": "t7u8812",
                                                "password": "Kd93mXq2",
                                                "expires_at": "2026-12-17T09:30:12+00:00",
                                                "rotating": false,
                                                "protocol": "http+socks5",
                                                "ipv6_only": false
                                            },
                                            {
                                                "id": 90211,
                                                "order_id": 5602,
                                                "type": "resident",
                                                "type_label": "Residential",
                                                "label": "Residential · 5 GB",
                                                "country": null,
                                                "flag": null,
                                                "host": "res.t7proxy.com",
                                                "port": 10000,
                                                "port_socks": 10000,
                                                "username": "r7k2m9",
                                                "password": "Qw81zLp0",
                                                "expires_at": "2026-12-21T10:00:00+00:00",
                                                "rotating": true,
                                                "protocol": "http+socks5",
                                                "ipv6_only": false
                                            }
                                        ],
                                        "synced_at": "2026-11-21T10:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "unauthenticated",
                                        "message": "Missing or revoked T7Proxy key. Create one at https://t7proxy.com/dashboard/api."
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "forbidden",
                                        "message": "Confirm your email address on the website to use this key."
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key"
            }
        },
        "/orders/{order_id}/resident": {
            "get": {
                "operationId": "getResidentPackage",
                "summary": "Get a residential package",
                "description": "A live residential package: traffic used and left, the main login, its rotation, the access lists, and the traffic you can add. Traffic counters update every few minutes; `used_gb` and `left_gb` are `null` until the first reading. `add_traffic_options` are the amounts Add traffic takes, priced for your account.",
                "tags": [
                    "Residential"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "order_id",
                        "in": "path",
                        "required": true,
                        "description": "The residential order's `order_id`.",
                        "schema": {
                            "type": "integer",
                            "example": 5602
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "package": {
                                            "order_id": 5602,
                                            "label": "Residential · 5 GB",
                                            "expires_at": "2026-12-21T10:00:00+00:00",
                                            "traffic": {
                                                "total_gb": 5,
                                                "used_gb": 1.8400000000000000799360577730112709105014801025390625,
                                                "left_gb": 3.160000000000000142108547152020037174224853515625,
                                                "added_gb": 0
                                            },
                                            "host": "res.t7proxy.com",
                                            "port": 10000,
                                            "login": "r7k2m9",
                                            "password": "Qw81zLp0",
                                            "rotation": 0,
                                            "rotation_label": "Every request",
                                            "rotation_options": [
                                                {
                                                    "value": 0,
                                                    "label": "Every request"
                                                },
                                                {
                                                    "value": 60,
                                                    "label": "Every 1 min"
                                                },
                                                {
                                                    "value": 300,
                                                    "label": "Every 5 min"
                                                },
                                                {
                                                    "value": 600,
                                                    "label": "Every 10 min"
                                                },
                                                {
                                                    "value": 900,
                                                    "label": "Every 15 min"
                                                },
                                                {
                                                    "value": 1800,
                                                    "label": "Every 30 min"
                                                },
                                                {
                                                    "value": 3600,
                                                    "label": "Every 60 min"
                                                },
                                                {
                                                    "value": -1,
                                                    "label": "Sticky IP"
                                                }
                                            ],
                                            "can_add_traffic": true,
                                            "add_traffic_options": [
                                                {
                                                    "product_id": 2101,
                                                    "gb": 5,
                                                    "price_usd": 17.5,
                                                    "per_gb_usd": 3.5
                                                }
                                            ],
                                            "lists": [
                                                {
                                                    "id": 318,
                                                    "title": "LA sticky",
                                                    "place": "United States · California · Los Angeles",
                                                    "country": "US",
                                                    "region": "California",
                                                    "city": "Los Angeles",
                                                    "isp": null,
                                                    "rotation": -1,
                                                    "rotation_label": "Sticky IP",
                                                    "ports": 3,
                                                    "host": "res.t7proxy.com",
                                                    "port_from": 10000,
                                                    "port_to": 10002,
                                                    "login": "r7geo41",
                                                    "password": "Hn3vX8qa"
                                                }
                                            ],
                                            "max_lists": 20,
                                            "max_ports": 1000
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "package_not_active",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "package_not_active",
                                        "message": "This residential package is not active."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key"
            }
        },
        "/orders/{order_id}/resident/traffic": {
            "post": {
                "operationId": "addResidentTraffic",
                "summary": "Add residential traffic",
                "description": "Add GB to a live residential package, paid from the wallet. The login and end date stay the same. Pick a `product_id` from the package's `add_traffic_options`. Send a `request_key` (or `Idempotency-Key` header) and reuse it on a retry: the same key never adds traffic twice, and the answer then has `already_added: true`. Not possible in the package's last 24 hours.",
                "tags": [
                    "Residential"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "order_id",
                        "in": "path",
                        "required": true,
                        "description": "The residential order.",
                        "schema": {
                            "type": "integer",
                            "example": 5602
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "Same as `request_key`, for clients that set it as a header.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "already_added": false,
                                        "added_gb": 5,
                                        "charged_usd": 17.5,
                                        "balance_usd": 31,
                                        "package": {
                                            "order_id": 5602,
                                            "label": "Residential · 5 GB",
                                            "expires_at": "2026-12-21T10:00:00+00:00",
                                            "traffic": {
                                                "total_gb": 10,
                                                "used_gb": 1.8400000000000000799360577730112709105014801025390625,
                                                "left_gb": 8.160000000000000142108547152020037174224853515625,
                                                "added_gb": 5
                                            },
                                            "host": "res.t7proxy.com",
                                            "port": 10000,
                                            "login": "r7k2m9",
                                            "password": "Qw81zLp0",
                                            "rotation": 0,
                                            "rotation_label": "Every request",
                                            "rotation_options": [
                                                {
                                                    "value": 0,
                                                    "label": "Every request"
                                                },
                                                {
                                                    "value": 60,
                                                    "label": "Every 1 min"
                                                },
                                                {
                                                    "value": 300,
                                                    "label": "Every 5 min"
                                                },
                                                {
                                                    "value": 600,
                                                    "label": "Every 10 min"
                                                },
                                                {
                                                    "value": 900,
                                                    "label": "Every 15 min"
                                                },
                                                {
                                                    "value": 1800,
                                                    "label": "Every 30 min"
                                                },
                                                {
                                                    "value": 3600,
                                                    "label": "Every 60 min"
                                                },
                                                {
                                                    "value": -1,
                                                    "label": "Sticky IP"
                                                }
                                            ],
                                            "can_add_traffic": true,
                                            "add_traffic_options": [
                                                {
                                                    "product_id": 2101,
                                                    "gb": 5,
                                                    "price_usd": 17.5,
                                                    "per_gb_usd": 3.5
                                                }
                                            ],
                                            "lists": [
                                                {
                                                    "id": 318,
                                                    "title": "LA sticky",
                                                    "place": "United States · California · Los Angeles",
                                                    "country": "US",
                                                    "region": "California",
                                                    "city": "Los Angeles",
                                                    "isp": null,
                                                    "rotation": -1,
                                                    "rotation_label": "Sticky IP",
                                                    "ports": 3,
                                                    "host": "res.t7proxy.com",
                                                    "port_from": 10000,
                                                    "port_to": 10002,
                                                    "login": "r7geo41",
                                                    "password": "Hn3vX8qa"
                                                }
                                            ],
                                            "max_lists": 20,
                                            "max_ports": 1000
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "read_only_key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "read_only_key",
                                        "message": "This key is read-only. To let it buy and renew from the wallet, create a key with \"Allow purchases\" at https://t7proxy.com/dashboard/api."
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "package_not_active",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "package_not_active",
                                        "message": "This residential package is not active."
                                    }
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "product_unavailable",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "product_unavailable",
                                        "message": "This traffic package is not on sale right now. Please pick another one."
                                    }
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "insufficient_balance",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "insufficient_balance",
                                        "message": "Not enough balance for this order. Balance: $3.20. Top up at https://t7proxy.com/dashboard/wallet."
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "purchase_limit",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "purchase_limit",
                                        "message": "This account may place 20 purchases or renewals per hour through MCP. Try again in 12 minutes."
                                    }
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "try_again_later",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "try_again_later",
                                        "message": "The rotation could not be changed right now. Please try again in a few minutes."
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "invalid_request",
                                        "message": "The product id field is required."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Needs a key with Allow purchases",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "product_id": {
                                        "type": "integer",
                                        "example": 2101,
                                        "description": "From `add_traffic_options` in Get a residential package."
                                    },
                                    "request_key": {
                                        "type": "string",
                                        "example": "add-5gb-2026-11-21",
                                        "description": "Your own id for this top-up, up to 64 letters, digits, `-` and `_`."
                                    }
                                },
                                "required": [
                                    "product_id",
                                    "request_key"
                                ]
                            },
                            "example": {
                                "product_id": 2101,
                                "request_key": "add-5gb-2026-11-21"
                            }
                        }
                    }
                }
            }
        },
        "/orders/{order_id}/resident/rotation": {
            "put": {
                "operationId": "setResidentRotation",
                "summary": "Set the package rotation",
                "description": "Change how often the package's main login gets a new exit IP. Applies to new connections within a minute. Access lists keep their own rotation.",
                "tags": [
                    "Residential"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "order_id",
                        "in": "path",
                        "required": true,
                        "description": "The residential order.",
                        "schema": {
                            "type": "integer",
                            "example": 5602
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "order_id": 5602,
                                        "rotation": 600,
                                        "rotation_label": "Every 10 min"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "package_not_active",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "package_not_active",
                                        "message": "This residential package is not active."
                                    }
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "try_again_later",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "try_again_later",
                                        "message": "The rotation could not be changed right now. Please try again in a few minutes."
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "invalid_request",
                                        "message": "The product id field is required."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "rotation": {
                                        "type": "integer",
                                        "example": 600,
                                        "description": "Seconds: `0` every request, `-1` sticky, or `60`, `300`, `600`, `900`, `1800`, `3600`."
                                    }
                                },
                                "required": [
                                    "rotation"
                                ]
                            },
                            "example": {
                                "rotation": 600
                            }
                        }
                    }
                }
            }
        },
        "/resident/geo": {
            "get": {
                "operationId": "listResidentCountries",
                "summary": "List residential countries",
                "description": "Countries an access list can target, sorted by name. Pass a `code` as `country` when you create an access list, or to Get a country for its regions, cities and ISPs.",
                "tags": [
                    "Residential"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "countries": [
                                            {
                                                "code": "DE",
                                                "name": "Germany"
                                            },
                                            {
                                                "code": "US",
                                                "name": "United States"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "unauthenticated",
                                        "message": "Missing or revoked T7Proxy key. Create one at https://t7proxy.com/dashboard/api."
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key"
            }
        },
        "/resident/geo/{country}": {
            "get": {
                "operationId": "getResidentCountry",
                "summary": "Get a residential country",
                "description": "The regions of one country, each with its cities and their ISPs. Use the exact `name` values as `region`, `city` and `isp` when you create an access list. Each level is optional, but needs the one above it.",
                "tags": [
                    "Residential"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "country",
                        "in": "path",
                        "required": true,
                        "description": "Two-letter country code from List residential countries.",
                        "schema": {
                            "type": "string",
                            "example": "US"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "country": "US",
                                        "regions": [
                                            {
                                                "name": "California",
                                                "cities": [
                                                    {
                                                        "name": "Los Angeles",
                                                        "isps": [
                                                            "AT&T Internet",
                                                            "Spectrum"
                                                        ]
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "not_found",
                                        "message": "No order 5531 on this account. Call GET /api/v1/orders to see yours."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key"
            }
        },
        "/orders/{order_id}/resident/lists": {
            "post": {
                "operationId": "createResidentList",
                "summary": "Create an access list",
                "description": "A new login inside a residential package, with its own location, rotation and ports. Leave `country` out for exit IPs anywhere. Each port from `port_from` to `port_to` is its own exit IP; traffic comes out of the package. Up to 20 lists per package.",
                "tags": [
                    "Residential"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "order_id",
                        "in": "path",
                        "required": true,
                        "description": "The residential order.",
                        "schema": {
                            "type": "integer",
                            "example": 5602
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "list": {
                                            "id": 318,
                                            "title": "LA sticky",
                                            "place": "United States · California · Los Angeles",
                                            "country": "US",
                                            "region": "California",
                                            "city": "Los Angeles",
                                            "isp": null,
                                            "rotation": -1,
                                            "rotation_label": "Sticky IP",
                                            "ports": 3,
                                            "host": "res.t7proxy.com",
                                            "port_from": 10000,
                                            "port_to": 10002,
                                            "login": "r7geo41",
                                            "password": "Hn3vX8qa"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "package_not_active",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "package_not_active",
                                        "message": "This residential package is not active."
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid_location",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "invalid_location",
                                        "message": "That region is not available. Please pick another one."
                                    }
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "list_limit",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "list_limit",
                                        "message": "You can have up to 20 lists per package. Delete one first."
                                    }
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "try_again_later",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "try_again_later",
                                        "message": "The rotation could not be changed right now. Please try again in a few minutes."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "LA sticky",
                                        "description": "Your name for the list, up to 40 characters. Default \"List N\"."
                                    },
                                    "country": {
                                        "type": "string",
                                        "example": "US",
                                        "description": "Two-letter code from List residential countries."
                                    },
                                    "region": {
                                        "type": "string",
                                        "example": "California",
                                        "description": "A region `name` from Get a residential country. Needs `country`."
                                    },
                                    "city": {
                                        "type": "string",
                                        "example": "Los Angeles",
                                        "description": "A city `name` in that region. Needs `region`."
                                    },
                                    "isp": {
                                        "type": "string",
                                        "description": "An ISP in that city. Needs `city`."
                                    },
                                    "rotation": {
                                        "type": "integer",
                                        "example": -1,
                                        "description": "Seconds: `0` every request, `-1` sticky, or `60`, `300`, `600`, `900`, `1800`, `3600`."
                                    },
                                    "ports": {
                                        "type": "integer",
                                        "example": 3,
                                        "description": "How many ports (exit IPs), 1 to 1000."
                                    }
                                },
                                "required": [
                                    "rotation",
                                    "ports"
                                ]
                            },
                            "example": {
                                "title": "LA sticky",
                                "country": "US",
                                "region": "California",
                                "city": "Los Angeles",
                                "rotation": -1,
                                "ports": 3
                            }
                        }
                    }
                }
            }
        },
        "/orders/{order_id}/resident/lists/{list_id}/rotation": {
            "put": {
                "operationId": "setResidentListRotation",
                "summary": "Set an access list's rotation",
                "description": "Change how often one access list gets a new exit IP.",
                "tags": [
                    "Residential"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "order_id",
                        "in": "path",
                        "required": true,
                        "description": "The residential order.",
                        "schema": {
                            "type": "integer",
                            "example": 5602
                        }
                    },
                    {
                        "name": "list_id",
                        "in": "path",
                        "required": true,
                        "description": "The list's `id`.",
                        "schema": {
                            "type": "integer",
                            "example": 318
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "list": {
                                            "id": 318,
                                            "title": "LA sticky",
                                            "place": "United States · California · Los Angeles",
                                            "country": "US",
                                            "region": "California",
                                            "city": "Los Angeles",
                                            "isp": null,
                                            "rotation": 300,
                                            "rotation_label": "Every 5 min",
                                            "ports": 3,
                                            "host": "res.t7proxy.com",
                                            "port_from": 10000,
                                            "port_to": 10002,
                                            "login": "r7geo41",
                                            "password": "Hn3vX8qa"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "package_not_active",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "package_not_active",
                                        "message": "This residential package is not active."
                                    }
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "try_again_later",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "try_again_later",
                                        "message": "The rotation could not be changed right now. Please try again in a few minutes."
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "invalid_request",
                                        "message": "The product id field is required."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "rotation": {
                                        "type": "integer",
                                        "example": 300,
                                        "description": "Seconds: `0` every request, `-1` sticky, or `60`, `300`, `600`, `900`, `1800`, `3600`."
                                    }
                                },
                                "required": [
                                    "rotation"
                                ]
                            },
                            "example": {
                                "rotation": 300
                            }
                        }
                    }
                }
            }
        },
        "/orders/{order_id}/resident/lists/{list_id}": {
            "delete": {
                "operationId": "deleteResidentList",
                "summary": "Delete an access list",
                "description": "Delete an access list. Its login stops working at once.",
                "tags": [
                    "Residential"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "order_id",
                        "in": "path",
                        "required": true,
                        "description": "The residential order.",
                        "schema": {
                            "type": "integer",
                            "example": 5602
                        }
                    },
                    {
                        "name": "list_id",
                        "in": "path",
                        "required": true,
                        "description": "The list's `id`.",
                        "schema": {
                            "type": "integer",
                            "example": 318
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "deleted": true,
                                        "list_id": 318
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "package_not_active",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "package_not_active",
                                        "message": "This residential package is not active."
                                    }
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "try_again_later",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "try_again_later",
                                        "message": "The rotation could not be changed right now. Please try again in a few minutes."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key"
            }
        },
        "/orders/{order_id}/resident/lists/{list_id}/export": {
            "get": {
                "operationId": "exportResidentList",
                "summary": "Export an access list",
                "description": "An access list as plain text, `host:port:login:password`, one line per port. Answers `text/plain`. Errors are still JSON.",
                "tags": [
                    "Residential"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "order_id",
                        "in": "path",
                        "required": true,
                        "description": "The residential order.",
                        "schema": {
                            "type": "integer",
                            "example": 5602
                        }
                    },
                    {
                        "name": "list_id",
                        "in": "path",
                        "required": true,
                        "description": "The list's `id`.",
                        "schema": {
                            "type": "integer",
                            "example": 318
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Proxy list",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                },
                                "example": "res.t7proxy.com:10000:r7geo41:Hn3vX8qa\nres.t7proxy.com:10001:r7geo41:Hn3vX8qa\nres.t7proxy.com:10002:r7geo41:Hn3vX8qa\n"
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "not_found",
                                        "message": "No order 5531 on this account. Call GET /api/v1/orders to see yours."
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "Any key"
            }
        },
        "/desktop/version": {
            "get": {
                "operationId": "getDesktopVersion",
                "summary": "Desktop app version",
                "description": "The newest T7Proxy Desktop release and the oldest one still allowed. No key needed. T7Proxy Desktop asks on start: below `minimum` it must update, below `latest` it offers to. Fields are `null` until a release is published.",
                "tags": [
                    "Developer tools"
                ],
                "security": [],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "latest": "1.2.0",
                                        "minimum": "1.0.0",
                                        "download_url": "https://t7proxy.com/desktop",
                                        "notes_url": "https://t7proxy.com/desktop#changes"
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "No key"
            }
        },
        "/desktop/ping": {
            "post": {
                "operationId": "postDesktopPing",
                "summary": "Desktop usage ping",
                "description": "T7Proxy Desktop says it is open (once a minute, and when it connects or disconnects). No key needed. Used by T7Proxy Desktop for its anonymous usage count, which customers can turn off in the app. A valid access token links the install to its account; an invalid one is ignored. Only the listed fields are kept, never the IP address.",
                "tags": [
                    "API"
                ],
                "security": [],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "ok": true
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                },
                                "example": {
                                    "error": {
                                        "code": "invalid_request",
                                        "message": "The product id field is required."
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-access": "No key",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "install_id": {
                                        "type": "string",
                                        "example": "6f1c2a8e-4b7d-4c1e-9a3f-2d5b8e7c1a90",
                                        "description": "Random UUID the app makes on first start."
                                    },
                                    "platform": {
                                        "type": "string",
                                        "example": "macos",
                                        "description": "One of `macos`, `windows`, `linux`."
                                    },
                                    "app_version": {
                                        "type": "string",
                                        "example": "1.0.0",
                                        "description": "The app version."
                                    },
                                    "arch": {
                                        "type": "string",
                                        "example": "aarch64",
                                        "description": "One of `aarch64`, `x86_64`, `x86`."
                                    },
                                    "os_version": {
                                        "type": "string",
                                        "example": "15.2",
                                        "description": "Operating system version."
                                    },
                                    "locale": {
                                        "type": "string",
                                        "example": "en",
                                        "description": "App language."
                                    },
                                    "state": {
                                        "type": "string",
                                        "example": "connected",
                                        "description": "One of `idle`, `connecting`, `connected`, `failed`."
                                    },
                                    "mode": {
                                        "type": "string",
                                        "example": "tunnel",
                                        "description": "While connected: `tunnel`, `system_proxy` or `local_proxy`."
                                    },
                                    "proxy_type": {
                                        "type": "string",
                                        "example": "resident",
                                        "description": "While connected: `ipv4`, `isp`, `resident`, `mobile` or `ipv6`."
                                    }
                                },
                                "required": [
                                    "install_id",
                                    "platform",
                                    "app_version"
                                ]
                            },
                            "example": null
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "A tp_live_ key from https://t7proxy.com/dashboard/api"
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "error": {
                        "type": "object",
                        "required": [
                            "code",
                            "message"
                        ],
                        "properties": {
                            "code": {
                                "type": "string"
                            },
                            "message": {
                                "type": "string"
                            },
                            "fields": {
                                "type": "object",
                                "additionalProperties": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}