{
  "openapi": "3.1.0",
  "info": {
    "title": "777 Proxy Reseller API",
    "version": "1.0.0",
    "description": "Catalog, orders, renewals and Luxury traffic management. Docs: https://api.777projects.org/docs"
  },
  "servers": [
    {
      "url": "https://api.777projects.org"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "Account"
    },
    {
      "name": "Catalog"
    },
    {
      "name": "Orders"
    },
    {
      "name": "Luxury management"
    }
  ],
  "paths": {
    "/v1/balance": {
      "get": {
        "operationId": "balance",
        "summary": "Get balance",
        "description": "Your USD balance, the same one as in the bot. You top it up in the bot; the API only spends it.",
        "tags": [
          "Account"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "balance_usd": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "low_balance_threshold_usd": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "balance_usd": 124.5,
                  "currency": "USD",
                  "low_balance_threshold_usd": 10
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/products": {
      "get": {
        "operationId": "products",
        "summary": "List products",
        "description": "What is on sale right now: tiers, types and periods. price_usd is your API price, retail_price_usd is the bot price. For per_gb types the period is a traffic volume and quantity is always 1.",
        "tags": [
          "Catalog"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tiers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "types": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "billing": {
                                  "type": "string"
                                },
                                "max_quantity": {
                                  "type": "integer"
                                },
                                "renewable": {
                                  "type": "boolean"
                                },
                                "periods": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "days": {
                                        "type": "integer"
                                      },
                                      "gb": {},
                                      "price_usd": {
                                        "type": "number"
                                      },
                                      "retail_price_usd": {
                                        "type": "number"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "tiers": [
                    {
                      "id": "prem",
                      "name": "Premium",
                      "types": [
                        {
                          "id": "socks5",
                          "name": "SOCKS5 Proxy",
                          "description": "Datacenter proxies, SOCKS5 protocol. Support any traffic (TCP/UDP), games, software.",
                          "billing": "per_proxy",
                          "max_quantity": 50,
                          "renewable": true,
                          "periods": [
                            {
                              "id": "month",
                              "name": "30 days",
                              "days": 30,
                              "gb": null,
                              "price_usd": 2.79,
                              "retail_price_usd": 3.06
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "id": "di",
                      "name": "Luxury",
                      "types": [
                        {
                          "id": "diresi",
                          "name": "Residential",
                          "description": "Real home IPs in 190+ countries…",
                          "billing": "per_gb",
                          "max_quantity": 1,
                          "renewable": false,
                          "periods": [
                            {
                              "id": "10gb",
                              "name": "10 GB",
                              "days": null,
                              "gb": 10.0,
                              "price_usd": 14.0,
                              "retail_price_usd": 15.0
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/products/{tier}/{type}/countries": {
      "get": {
        "operationId": "countries",
        "summary": "List countries",
        "description": "Countries for a type. For Economy and Telegram, available is the provider's stock. Luxury also accepts ANY for any country.",
        "tags": [
          "Catalog"
        ],
        "parameters": [
          {
            "name": "tier",
            "in": "path",
            "required": true,
            "description": "Tier ID, e.g. prem",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "description": "Type ID, e.g. socks5",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "countries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "available": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "countries": [
                    {
                      "code": "US",
                      "name": "United States",
                      "available": 318
                    },
                    {
                      "code": "DE",
                      "name": "Germany",
                      "available": 142
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/geo/{type}/{kind}": {
      "get": {
        "operationId": "geo",
        "summary": "Luxury geo lookup",
        "description": "States, cities, ZIP codes and ASNs for Luxury targeting. Pass code into order options or settings.",
        "tags": [
          "Catalog"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "description": "Luxury type: diresi, dipremium, dimobile, didc",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "description": "countries · states · cities · zipcodes · asns",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ISO-2, required for all kinds except countries",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "State code to narrow cities and ZIPs",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "code": "losangeles",
                      "name": "Los Angeles",
                      "count": 30
                    },
                    {
                      "code": "sandiego",
                      "name": "San Diego",
                      "count": 12
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders": {
      "post": {
        "operationId": "create",
        "summary": "Create an order",
        "description": "Charges your balance and returns the proxies right away. If the provider fails, the money goes back to your balance and the response is an error.",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Any unique string up to 100 chars. A retry with the same key returns the first response and never charges twice.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "tier": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string"
                    },
                    "period": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": "integer"
                    },
                    "price_usd": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string"
                    },
                    "protocol": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string"
                    },
                    "traffic_gb": {},
                    "renewable": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string"
                    },
                    "proxies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "host": {
                            "type": "string"
                          },
                          "port": {
                            "type": "integer"
                          },
                          "login": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "charged_usd": {
                      "type": "number"
                    }
                  }
                },
                "example": {
                  "id": 18342,
                  "tier": "prem",
                  "type": "socks5",
                  "country": "US",
                  "period": "month",
                  "quantity": 2,
                  "price_usd": 5.58,
                  "status": "active",
                  "protocol": "socks5",
                  "created_at": "2026-10-18T12:00:00Z",
                  "expires_at": "2026-11-17T12:00:00Z",
                  "traffic_gb": null,
                  "renewable": true,
                  "source": "api",
                  "proxies": [
                    {
                      "host": "45.12.31.7",
                      "port": 12324,
                      "login": "u7f3k2",
                      "password": "p9QmL2xa"
                    },
                    {
                      "host": "45.12.31.9",
                      "port": 12324,
                      "login": "u7f3k2",
                      "password": "p9QmL2xa"
                    }
                  ],
                  "charged_usd": 5.58
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tier": {
                    "type": "string",
                    "description": "Tier ID from the catalog"
                  },
                  "type": {
                    "type": "string",
                    "description": "Type ID"
                  },
                  "country": {
                    "type": "string",
                    "description": "ISO-2; ANY is allowed for Luxury"
                  },
                  "period": {
                    "type": "string",
                    "description": "Period or volume ID from the catalog"
                  },
                  "quantity": {
                    "type": "integer",
                    "description": "Number of proxies, 1 to 50 (default 1). Always 1 for per_gb"
                  },
                  "options": {
                    "type": "object",
                    "description": "Luxury only, fields below",
                    "properties": {
                      "session": {
                        "type": "string",
                        "description": "rotating (new IP per request) or sticky (IP is kept for a set time)"
                      },
                      "sticky_minutes": {
                        "type": "integer",
                        "description": "Minutes to keep a sticky IP, 1 to 120 (default 30)"
                      },
                      "protocol": {
                        "type": "string",
                        "description": "http, socks5 or both (default)"
                      },
                      "state": {
                        "type": "string",
                        "description": "State code from the geo directory"
                      },
                      "city": {
                        "type": "string",
                        "description": "City code"
                      },
                      "zip": {
                        "type": "string",
                        "description": "ZIP code"
                      },
                      "asn": {
                        "type": "string",
                        "description": "Provider ASN, e.g. 7922"
                      },
                      "exclude_asn": {
                        "type": "array",
                        "description": "ASNs to exclude",
                        "items": {
                          "type": "string"
                        }
                      },
                      "anonymous": {
                        "type": "boolean",
                        "description": "Anonymous IPs only"
                      },
                      "threads": {
                        "type": "integer",
                        "description": "Concurrent connection limit"
                      }
                    }
                  }
                },
                "required": [
                  "tier",
                  "type",
                  "country",
                  "period"
                ]
              },
              "example": {
                "tier": "prem",
                "type": "socks5",
                "country": "US",
                "period": "month",
                "quantity": 2
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list",
        "summary": "List orders",
        "description": "Your orders from both the API and the bot, newest first. The list has no logins or passwords; get them from a single order.",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "active · expired · paused · exhausted",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1 to 200 (default 50)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Pagination offset",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "tier": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "country": {
                            "type": "string"
                          },
                          "period": {
                            "type": "string"
                          },
                          "quantity": {
                            "type": "integer"
                          },
                          "price_usd": {
                            "type": "number"
                          },
                          "status": {
                            "type": "string"
                          },
                          "protocol": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "expires_at": {
                            "type": "string"
                          },
                          "traffic_gb": {},
                          "renewable": {
                            "type": "boolean"
                          },
                          "source": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "orders": [
                    {
                      "id": 18342,
                      "tier": "prem",
                      "type": "socks5",
                      "country": "US",
                      "period": "month",
                      "quantity": 2,
                      "price_usd": 5.58,
                      "status": "active",
                      "protocol": "socks5",
                      "created_at": "2026-10-18T12:00:00Z",
                      "expires_at": "2026-11-17T12:00:00Z",
                      "traffic_gb": null,
                      "renewable": true,
                      "source": "api"
                    }
                  ],
                  "total": 1,
                  "limit": 20,
                  "offset": 0
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{order_id}": {
      "get": {
        "operationId": "get",
        "summary": "Retrieve an order",
        "description": "An order with logins and passwords. expires_at includes renewals. For per_gb orders it is null: they work until the traffic runs out.",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Order ID",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "tier": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string"
                    },
                    "period": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": "integer"
                    },
                    "price_usd": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string"
                    },
                    "protocol": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string"
                    },
                    "traffic_gb": {},
                    "renewable": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string"
                    },
                    "proxies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "host": {
                            "type": "string"
                          },
                          "port": {
                            "type": "integer"
                          },
                          "login": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "id": 18342,
                  "tier": "prem",
                  "type": "socks5",
                  "country": "US",
                  "period": "month",
                  "quantity": 2,
                  "price_usd": 5.58,
                  "status": "active",
                  "protocol": "socks5",
                  "created_at": "2026-10-18T12:00:00Z",
                  "expires_at": "2026-11-17T12:00:00Z",
                  "traffic_gb": null,
                  "renewable": true,
                  "source": "api",
                  "proxies": [
                    {
                      "host": "45.12.31.7",
                      "port": 12324,
                      "login": "u7f3k2",
                      "password": "p9QmL2xa"
                    },
                    {
                      "host": "45.12.31.9",
                      "port": 12324,
                      "login": "u7f3k2",
                      "password": "p9QmL2xa"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{order_id}/renew": {
      "post": {
        "operationId": "renew",
        "summary": "Renew an order",
        "description": "Extends the same proxies: IP, login and password stay as they are. Works when the order has renewable: true (Premium, Economy, Telegram). The new term is added to the current one.",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Order ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Any unique string up to 100 chars. A retry with the same key returns the first response and never charges twice.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "tier": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string"
                    },
                    "period": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": "integer"
                    },
                    "price_usd": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string"
                    },
                    "protocol": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string"
                    },
                    "traffic_gb": {},
                    "renewable": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string"
                    },
                    "proxies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "host": {
                            "type": "string"
                          },
                          "port": {
                            "type": "integer"
                          },
                          "login": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "charged_usd": {
                      "type": "number"
                    }
                  }
                },
                "example": {
                  "id": 18342,
                  "tier": "prem",
                  "type": "socks5",
                  "country": "US",
                  "period": "month",
                  "quantity": 2,
                  "price_usd": 5.58,
                  "status": "active",
                  "protocol": "socks5",
                  "created_at": "2026-10-18T12:00:00Z",
                  "expires_at": "2026-12-17T12:00:00Z",
                  "traffic_gb": null,
                  "renewable": true,
                  "source": "api",
                  "proxies": [
                    {
                      "host": "45.12.31.7",
                      "port": 12324,
                      "login": "u7f3k2",
                      "password": "p9QmL2xa"
                    },
                    {
                      "host": "45.12.31.9",
                      "port": 12324,
                      "login": "u7f3k2",
                      "password": "p9QmL2xa"
                    }
                  ],
                  "charged_usd": 5.58
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "period": {
                    "type": "string",
                    "description": "Period ID from the catalog"
                  }
                },
                "required": [
                  "period"
                ]
              },
              "example": {
                "period": "month"
              }
            }
          }
        }
      }
    },
    "/v1/orders/{order_id}/traffic": {
      "get": {
        "operationId": "traffic",
        "summary": "Get traffic",
        "description": "How many GB are used and how many are left.",
        "tags": [
          "Luxury management"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Order ID",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total_gb": {
                      "type": "number"
                    },
                    "used_gb": {
                      "type": "number"
                    },
                    "left_gb": {
                      "type": "number"
                    },
                    "used_percent": {
                      "type": "number"
                    }
                  }
                },
                "example": {
                  "total_gb": 10.0,
                  "used_gb": 3.412,
                  "left_gb": 6.588,
                  "used_percent": 34.1
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "traffic_add",
        "summary": "Add traffic",
        "description": "Adds GB to the order. Login, password and settings stay the same.",
        "tags": [
          "Luxury management"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Order ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Any unique string up to 100 chars. A retry with the same key returns the first response and never charges twice.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total_gb": {
                      "type": "number"
                    },
                    "used_gb": {
                      "type": "number"
                    },
                    "left_gb": {
                      "type": "number"
                    },
                    "used_percent": {
                      "type": "number"
                    },
                    "charged_usd": {
                      "type": "number"
                    }
                  }
                },
                "example": {
                  "total_gb": 20.0,
                  "used_gb": 3.412,
                  "left_gb": 16.588,
                  "used_percent": 17.1,
                  "charged_usd": 14.0
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "period": {
                    "type": "string",
                    "description": "Volume from the catalog, e.g. 10gb"
                  }
                },
                "required": [
                  "period"
                ]
              },
              "example": {
                "period": "10gb"
              }
            }
          }
        }
      }
    },
    "/v1/orders/{order_id}/settings": {
      "get": {
        "operationId": "settings",
        "summary": "Get settings",
        "description": "Geo, session type, protocol, threads, IP access, blocked sites and the gateway address.",
        "tags": [
          "Luxury management"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Order ID",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "country": {
                      "type": "string"
                    },
                    "state": {},
                    "city": {
                      "type": "string"
                    },
                    "zip": {},
                    "asn": {},
                    "exclude_asn": {
                      "type": "array",
                      "items": {}
                    },
                    "anonymous": {
                      "type": "boolean"
                    },
                    "session": {
                      "type": "string"
                    },
                    "sticky_minutes": {
                      "type": "integer"
                    },
                    "protocol": {
                      "type": "string"
                    },
                    "threads": {
                      "type": "integer"
                    },
                    "allowed_ips": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "blocked_hosts": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "paused": {
                      "type": "boolean"
                    },
                    "login": {
                      "type": "string"
                    },
                    "gateway": {
                      "type": "object",
                      "properties": {
                        "host": {
                          "type": "string"
                        },
                        "http_port": {
                          "type": "integer"
                        },
                        "socks5_port": {
                          "type": "integer"
                        },
                        "sticky_ports": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "country": "DE",
                  "state": null,
                  "city": "berlin",
                  "zip": null,
                  "asn": null,
                  "exclude_asn": [],
                  "anonymous": false,
                  "session": "sticky",
                  "sticky_minutes": 30,
                  "protocol": "both",
                  "threads": 200,
                  "allowed_ips": [
                    "203.0.113.10"
                  ],
                  "blocked_hosts": [
                    "doubleclick.net"
                  ],
                  "paused": false,
                  "login": "4f0c1e9a2b7d",
                  "gateway": {
                    "host": "proxy.777projects.org",
                    "http_port": 823,
                    "socks5_port": 824,
                    "sticky_ports": [
                      10000,
                      20000
                    ]
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "settings_update",
        "summary": "Update settings",
        "description": "Send only the fields you change. Changes are free and unlimited, and the login and password stay the same. Changing the country resets state, city, ZIP and ASN.",
        "tags": [
          "Luxury management"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Order ID",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "country": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string"
                    },
                    "city": {},
                    "zip": {},
                    "asn": {},
                    "exclude_asn": {
                      "type": "array",
                      "items": {}
                    },
                    "anonymous": {
                      "type": "boolean"
                    },
                    "session": {
                      "type": "string"
                    },
                    "sticky_minutes": {
                      "type": "integer"
                    },
                    "protocol": {
                      "type": "string"
                    },
                    "threads": {
                      "type": "integer"
                    },
                    "allowed_ips": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "blocked_hosts": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "paused": {
                      "type": "boolean"
                    },
                    "login": {
                      "type": "string"
                    },
                    "gateway": {
                      "type": "object",
                      "properties": {
                        "host": {
                          "type": "string"
                        },
                        "http_port": {
                          "type": "integer"
                        },
                        "socks5_port": {
                          "type": "integer"
                        },
                        "sticky_ports": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "country": "US",
                  "state": "california",
                  "city": null,
                  "zip": null,
                  "asn": null,
                  "exclude_asn": [],
                  "anonymous": false,
                  "session": "sticky",
                  "sticky_minutes": 15,
                  "protocol": "both",
                  "threads": 200,
                  "allowed_ips": [
                    "203.0.113.10"
                  ],
                  "blocked_hosts": [
                    "doubleclick.net"
                  ],
                  "paused": false,
                  "login": "4f0c1e9a2b7d",
                  "gateway": {
                    "host": "proxy.777projects.org",
                    "http_port": 823,
                    "socks5_port": 824,
                    "sticky_ports": [
                      10000,
                      20000
                    ]
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "country": {
                    "type": "string",
                    "description": "ISO-2 or ANY"
                  },
                  "state": {
                    "type": "string",
                    "description": "State code. An empty string clears it"
                  },
                  "city": {
                    "type": "string",
                    "description": "City code"
                  },
                  "zip": {
                    "type": "string",
                    "description": "ZIP code"
                  },
                  "asn": {
                    "type": "string",
                    "description": "ASN"
                  },
                  "exclude_asn": {
                    "type": "array",
                    "description": "ASNs to exclude",
                    "items": {
                      "type": "string"
                    }
                  },
                  "anonymous": {
                    "type": "boolean",
                    "description": "Anonymous IPs only"
                  },
                  "session": {
                    "type": "string",
                    "description": "rotating or sticky"
                  },
                  "sticky_minutes": {
                    "type": "integer",
                    "description": "1 to 120"
                  },
                  "protocol": {
                    "type": "string",
                    "description": "http · socks5 · both"
                  },
                  "threads": {
                    "type": "integer",
                    "description": "Concurrent connection limit"
                  },
                  "allowed_ips": {
                    "type": "array",
                    "description": "Up to 5 IPs allowed to use the proxy without a password. The new list replaces the old one",
                    "items": {
                      "type": "string"
                    }
                  },
                  "blocked_hosts": {
                    "type": "array",
                    "description": "Domains the proxy will block. The new list replaces the old one",
                    "items": {
                      "type": "string"
                    }
                  },
                  "paused": {
                    "type": "boolean",
                    "description": "Pause or resume the order"
                  }
                }
              },
              "example": {
                "country": "US",
                "state": "california",
                "session": "sticky",
                "sticky_minutes": 15
              }
            }
          }
        }
      }
    },
    "/v1/orders/{order_id}/lines": {
      "get": {
        "operationId": "lines",
        "summary": "Get proxy lines",
        "description": "Connection lines for your software. In sticky mode each line has its own port and IP; you can get up to 1000 lines.",
        "tags": [
          "Luxury management"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Order ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "hpup host:port:login:pass, uphp login:pass@host:port, http and socks as URLs",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Number of sticky lines, 1 to 1000",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "protocol",
            "in": "query",
            "required": false,
            "description": "http or socks5",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "as",
            "in": "query",
            "required": false,
            "description": "text: plain-text response, one proxy per line",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "lines": [
                    "proxy.777projects.org:10000:4f0c1e9a2b7d:kq81xz0pa3",
                    "proxy.777projects.org:10001:4f0c1e9a2b7d:kq81xz0pa3",
                    "proxy.777projects.org:10002:4f0c1e9a2b7d:kq81xz0pa3"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{order_id}/reset-password": {
      "post": {
        "operationId": "password",
        "summary": "Reset password",
        "description": "Issues a new password. The old one stops working at once.",
        "tags": [
          "Luxury management"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Order ID",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "login": {
                      "type": "string"
                    },
                    "password": {
                      "type": "string"
                    },
                    "line": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "login": "4f0c1e9a2b7d",
                  "password": "n2v8qkx71c",
                  "line": "proxy.777projects.org:823:4f0c1e9a2b7d:n2v8qkx71c"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{order_id}/stats": {
      "get": {
        "operationId": "stats",
        "summary": "Get usage stats",
        "description": "Daily traffic and requests for the last week, plus connection errors. NO_RAY: no IP matches the filter, loosen the geo. TRAFFIC_EXHAUSTED: out of GB. THREADS_EXHAUSTED: too many connections.",
        "tags": [
          "Luxury management"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Order ID",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "days": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string"
                          },
                          "traffic_gb": {
                            "type": "number"
                          },
                          "requests": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "days": [
                    {
                      "date": "2026-10-17",
                      "traffic_gb": 1.204,
                      "requests": 48211
                    },
                    {
                      "date": "2026-10-18",
                      "traffic_gb": 0.861,
                      "requests": 30544
                    }
                  ],
                  "errors": [
                    {
                      "code": "NO_RAY",
                      "count": 12
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "sk_live_…"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "invalid_json",
                  "invalid_request",
                  "invalid_period",
                  "invalid_quantity",
                  "invalid_country",
                  "invalid_option",
                  "unauthorized",
                  "insufficient_balance",
                  "key_disabled",
                  "ip_not_allowed",
                  "unknown_product",
                  "order_not_found",
                  "out_of_stock",
                  "not_renewable",
                  "not_luxury",
                  "request_in_progress",
                  "rate_limited",
                  "internal_error",
                  "provider_error",
                  "api_disabled"
                ]
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}