{
  "openapi": "3.1.0",
  "info": {
    "title": "Smartproxy",
    "version": "1.2"
  },
  "servers": [
    {
      "url": "https://api.decodo.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v2/sub-users": {
      "get": {
        "x-mint": {
          "href": "/cn/api-reference/sub-users/get-sub-users"
        },
        "summary": "获取子用户列表",
        "description": "获取住宅代理订阅的活跃子用户列表",
        "operationId": "get-sub-users",
        "parameters": [
          {
            "name": "service_type",
            "in": "query",
            "description": "可选参数：residential_proxies",
            "schema": {
              "type": "string",
              "enum": [
                "residential_proxies"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "[\n  0:{\n    \"id\":24570,\n    \"username\":\"name\",\n    \"status\":\"active\",\n    \"created_at\":\"2019-03-23 13:08\",\n    \"traffic\" : 1.13,\n    \"traffic_limit\":NULL,\n    \"service_type\":\"residential_proxies\",\n    \"traffic_count_from\":\"2019-03-23 13:10\",\n    \"auto_disable\":false\n  }\n]"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error_code\":\"not_found\"\n  \"message\":\"Resource not found\"\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "tags": [
          "子用户"
        ]
      },
      "post": {
        "x-mint": {
          "href": "/cn/api-reference/sub-users/create-sub-user"
        },
        "summary": "创建子用户",
        "description": "为住宅代理订阅创建新的子用户",
        "operationId": "create-sub-user",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "username",
                  "password",
                  "service_type"
                ],
                "properties": {
                  "username": {
                    "type": "string",
                    "description": "长度为 6 到 64 个字符。仅允许使用字母、数字和下划线。",
                    "format": "json"
                  },
                  "password": {
                    "type": "string",
                    "description": "必须包含：12 个或更多字符；至少一个大写字母；一个小写字母；一个数字；以下符号之一 `_` `~` `+` `=`（不允许使用 `@` 和 `:`）。",
                    "format": "json"
                  },
                  "service_type": {
                    "type": "string",
                    "description": "",
                    "default": "residential_proxies",
                    "enum": [
                      "residential_proxies"
                    ]
                  },
                  "traffic_limit": {
                    "type": "number",
                    "format": "float"
                  },
                  "auto_disable": {
                    "type": "boolean",
                    "description": "当流量限额用完时禁用子用户",
                    "default": false
                  },
                  "traffic_count_from": {
                    "type": "string",
                    "description": "从指定日期开始计算子用户订阅流量。使用日期格式 yyyy-mm-dd hh:mm:ss。",
                    "format": "date"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error_code\": \"bad_request\",\n  \"message\": \"Can not process request\",\n  \"error\": {\n    \"username\": \"username must be between 3 and 64 characters. Only numbers, characters and underscore are allowed\",\n    \"password\": \"password must be between 9 and 64 characters and must contain at least one number. Symbols @ and : are invalid\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_code": {
                      "type": "string",
                      "example": "bad_request"
                    },
                    "message": {
                      "type": "string",
                      "example": "Can not process request"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "username": {
                          "type": "string",
                          "example": "username must be between 3 and 64 characters. Only numbers, characters and underscore are allowed"
                        },
                        "password": {
                          "type": "string",
                          "example": "password must be between 9 and 64 characters and must contain at least one number. Symbols @ and : are invalid"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "tags": [
          "子用户"
        ]
      }
    },
    "/v2/sub-users/{sub_user_id}": {
      "get": {
        "x-mint": {
          "href": "/cn/api-reference/sub-users/get-sub-user"
        },
        "summary": "获取单个子用户",
        "description": "获取单个活跃子用户的信息",
        "operationId": "get-sub-user",
        "parameters": [
          {
            "name": "sub_user_id",
            "in": "path",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"id\": 1,\n  \"username\": \"name\",\n  \"status\": \"active\",\n  \"created_at\": \"2021-07-01 00:00\",\n  \"traffic\": 0,\n  \"traffic_limit\": null,\n  \"service_type\": \"type\",\n  \"traffic_count_from\": null,\n  \"auto_disable\": false\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "username": {
                      "type": "string",
                      "example": "name"
                    },
                    "status": {
                      "type": "string",
                      "example": "active"
                    },
                    "created_at": {
                      "type": "string",
                      "example": "2021-07-01 00:00"
                    },
                    "traffic": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "traffic_limit": {},
                    "service_type": {
                      "type": "string",
                      "example": "type"
                    },
                    "traffic_count_from": {},
                    "auto_disable": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error_code\": \"bad_request\",\n  \"message\": \"Can not process request\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_code": {
                      "type": "string",
                      "example": "bad_request"
                    },
                    "message": {
                      "type": "string",
                      "example": "Can not process request"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "tags": [
          "子用户"
        ]
      },
      "put": {
        "x-mint": {
          "href": "/cn/api-reference/sub-users/update-sub-user"
        },
        "summary": "更新子用户",
        "description": "更新指定子用户的密码或流量限额",
        "operationId": "update-sub-user",
        "parameters": [
          {
            "name": "sub_user_id",
            "in": "path",
            "description": "通过\"获取子用户列表\"接口获取的子用户 ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "traffic_limit": {
                    "type": "number",
                    "description": "流量限额",
                    "format": "float"
                  },
                  "auto_disable": {
                    "type": "boolean",
                    "description": "当流量限额用完时禁用子用户",
                    "default": false
                  },
                  "password": {
                    "type": "string",
                    "format": "json",
                    "description": "必须包含：12 个或更多字符；至少一个大写字母；一个小写字母；一个数字；以下符号之一 `_` `~` `+` `=`（不允许使用 `@` 和 `:`）。"
                  },
                  "traffic_count_from": {
                    "type": "string",
                    "description": "从指定日期开始计算子用户订阅流量。使用日期格式 yyyy-mm-dd hh:mm:ss。",
                    "format": "date"
                  },
                  "status": {
                    "type": "string",
                    "description": "",
                    "enum": [
                      "active",
                      "disabled"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error_code\": \"bad_request\",\n  \"message\": \"Can not process request\",\n  \"error\": {\n    \"password\": \"password must be between 9 and 64 characters and must contain at least one number. Symbols @ and : are invalid\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_code": {
                      "type": "string",
                      "example": "bad_request"
                    },
                    "message": {
                      "type": "string",
                      "example": "Can not process request"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "password": {
                          "type": "string",
                          "example": "password must be between 9 and 64 characters and must contain at least one number. Symbols @ and : are invalid"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "tags": [
          "子用户"
        ]
      },
      "delete": {
        "x-mint": {
          "href": "/cn/api-reference/sub-users/delete-sub-user"
        },
        "summary": "删除子用户",
        "description": "删除指定的子用户",
        "operationId": "delete-sub-user",
        "parameters": [
          {
            "name": "sub_user_id",
            "in": "path",
            "description": "通过\"获取子用户列表\"接口获取的子用户 ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "204",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error_code\":\"not_found\"\n  \"message\":\"Resource not found\"\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "tags": [
          "子用户"
        ]
      }
    },
    "/v2/sub-users/{sub_user_id}/traffic": {
      "get": {
        "x-mint": {
          "href": "/cn/api-reference/sub-users/get-sub-user-traffic"
        },
        "summary": "获取子用户流量",
        "description": "获取指定子用户的流量使用情况",
        "operationId": "get-sub-user-traffic",
        "parameters": [
          {
            "name": "sub_user_id",
            "in": "path",
            "description": "通过\"获取子用户列表\"接口获取的子用户 ID",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "type",
            "in": "query",
            "description": "如果选择 custom 类型，可以提供 **from** 和 **to** 参数，也可以留空，它们将分别默认为子用户创建日期和当前日期。",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "24h",
                "7days",
                "month",
                "custom"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "使用日期格式 yyyy-mm-dd",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "使用日期格式 yyyy-mm-dd",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "service_type",
            "in": "query",
            "description": "",
            "schema": {
              "type": "string",
              "enum": [
                "residential_proxies"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\"traffic\": 4.7,\n\"traffic_rx\": 4.2,\n\"traffic_tx\": 0.5\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "traffic": {
                      "type": "number",
                      "example": 4.7,
                      "default": 0
                    },
                    "traffic_rx": {
                      "type": "number",
                      "example": 4.2,
                      "default": 0
                    },
                    "traffic_tx": {
                      "type": "number",
                      "example": 0.5,
                      "default": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error_code\":\"not_found\"\n  \"message\":\"Resource not found\"\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "tags": [
          "子用户"
        ]
      }
    },
    "/v2/allocated-traffic-limit": {
      "get": {
        "x-mint": {
          "href": "/cn/api-reference/sub-users/get-allocated-sub-user-traffic"
        },
        "summary": "获取已分配的子用户流量",
        "description": "获取住宅代理订阅下所有子用户的已分配流量",
        "operationId": "get-allocated-sub-user-traffic",
        "parameters": [
          {
            "name": "service_type",
            "in": "query",
            "description": "",
            "schema": {
              "type": "string",
              "enum": [
                "residential_proxies"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\"allocated_traffic_limit\":728\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "allocated_traffic_limit": {
                      "type": "integer",
                      "example": 728,
                      "default": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error_code\":\"not_found\"\n  \"message\":\"Resource not found\"\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "tags": [
          "子用户"
        ]
      }
    },
    "/v2/whitelisted-ips": {
      "get": {
        "x-mint": {
          "href": "/cn/api-reference/whitelisted-ips/get-whitelisted-ips"
        },
        "summary": "获取白名单 IP",
        "description": "获取住宅代理订阅的白名单 IP 列表",
        "operationId": "get-whitelisted-ips",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "[\n  0:{\n    \"id\":69489\n    \"ip\":\"<IP_ADDRESS>\"\n    \"enabled\":true\n    \"created_at\":\"2019-05-22 12:44\"\n\t}\n]"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error_code\":\"not_found\"\n  \"message\":\"Resource not found\"\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "tags": [
          "白名单 IP"
        ]
      },
      "post": {
        "x-mint": {
          "href": "/cn/api-reference/whitelisted-ips/add-whitelisted-ips"
        },
        "summary": "添加白名单 IP",
        "description": "为住宅代理订阅添加白名单 IP",
        "operationId": "add-whitelisted-ips",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "IPAddressList": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error_code\":\"bad_request\"\n  \"message\":\"Can not process request\"\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "tags": [
          "白名单 IP"
        ]
      }
    },
    "/v2/whitelisted-ips/{id}": {
      "delete": {
        "x-mint": {
          "href": "/cn/api-reference/whitelisted-ips/delete-whitelisted-ip"
        },
        "summary": "删除白名单 IP",
        "description": "删除指定的白名单 IP",
        "operationId": "delete-whitelisted-ip",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "在此输入 IP 的 ID - [获取白名单 IP](https://help.decodo.com/reference#get-whitelisted-ips)",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "204",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error_code\":\"bad_request\"\n  \"message\":\"Can not process request\"\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "tags": [
          "白名单 IP"
        ]
      }
    },
    "/v2/endpoints/{type}": {
      "get": {
        "x-mint": {
          "href": "/cn/api-reference/endpoints/get-endpoints-by-type"
        },
        "summary": "按类型获取端点",
        "description": "获取住宅代理订阅中指定类型的端点列表",
        "operationId": "get-endpoints-by-type",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "description": "",
            "schema": {
              "type": "string",
              "enum": [
                "random",
                "sticky"
              ]
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "[\n  0:{\n    \"location\":\"Random\"\n    \"hostname\":\"gate.decodo.com\"\n    \"port_range\":\"7000\"\n  }\n  1:{\n    \"location\":\"Canada\"\n    \"hostname\":\"ca.decodo.com\"\n    \"port_range\":\"20000\"\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error_code\":\"bad_request\"\n  \"message\":\"Bad proxy type provided.\"\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [],
        "tags": [
          "端点"
        ]
      }
    },
    "/v2/endpoints": {
      "get": {
        "x-mint": {
          "href": "/cn/api-reference/endpoints/get-endpoints"
        },
        "summary": "获取端点",
        "description": "获取住宅代理订阅的端点类型",
        "operationId": "get-endpoints",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "[\n  0:{\n    \"type\":\"random\"\n    \"available_locations\":\"148\"\n    \"url\":\"endpoints/random\"\n  }\n  1:{\n    \"type\":\"sticky\"\n    \"available_locations\":\"62\"\n    \"url\":\"endpoints/sticky\"\n  }\n]"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [],
        "tags": [
          "端点"
        ]
      }
    },
    "/v2/endpoints-custom/back-connect": {
      "get": {
        "x-mint": {
          "href": "/cn/api-reference/endpoints/generate-custom-back-connect-endpoints"
        },
        "summary": "生成自定义反向连接端点",
        "description": "为住宅代理订阅生成自定义反向连接代理端点。如果已设置默认值，则不需要在请求参数查询中包含该参数。",
        "operationId": "generate-custom-back-connect-endpoints",
        "parameters": [
          {
            "name": "username",
            "in": "query",
            "description": "提供用于授权的用户名。此参数为**必填**。",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "password",
            "in": "query",
            "description": "提供用于授权的密码。此参数为**必填**。",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_type",
            "in": "query",
            "description": "选择会话类型。选择 `sticky` 用于粘性会话，或 `random` 用于轮换会话。默认值为 `sticky`。",
            "schema": {
              "type": "string",
              "enum": [
                "sticky",
                "random"
              ],
              "default": "sticky"
            }
          },
          {
            "name": "session_time",
            "in": "query",
            "description": "会话时间（分钟），范围为 1-1440（含）。如果参数 `sessionType` 值为 `sticky`，则此参数为**必填**。默认值为 10。",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "name": "country",
            "in": "query",
            "description": "小写的国家 Alpha2 代码。",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "如果国家是美国（`us`），可以选择州。提供完整的州名，用下划线代替空格。例如 `new_york`。",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "description": "完整的小写城市名，用下划线代替空格。例如 `new_orleans`。",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "output_format",
            "in": "query",
            "description": "输出格式类型。默认为 `protocol:auth@endpoint`。",
            "schema": {
              "type": "string",
              "enum": [
                "protocol:auth@endpoint",
                "endpoint:auth",
                "auth@endpoint"
              ],
              "default": "protocol:auth@endpoint"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "将生成并返回的路由数量。最小值为 1。默认值为 10。",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "路由页码（分页）。最小值为 1。默认值为 1。",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "response_format",
            "in": "query",
            "description": "返回的响应类型。可以是 `json`、`txt` 或 `html`。默认为 `json`。",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "txt",
                "html"
              ],
              "default": "json"
            }
          },
          {
            "name": "line_break",
            "in": "query",
            "description": "响应内容中使用的换行符。如果参数 `responseType` 值为 `txt`，则此参数为**必填**。默认为 `\\n`。",
            "schema": {
              "type": "string",
              "enum": [
                "\\n",
                "\\r\\n",
                "\\r",
                "\\t"
              ],
              "default": "\\n"
            }
          },
          {
            "name": "domain",
            "in": "query",
            "required": false,
            "description": "路由应使用的域名。默认为 decodo.com。ip 用于使用 IP 地址代替域名。",
            "schema": {
              "type": "string",
              "default": "gate.decodo.com"
            }
          },
          {
            "name": "ip",
            "in": "query",
            "description": "用于代替域名的 IP 地址。如果参数 `domain` 值为 `ip`，则此字段为**必填**。必须在末尾包含端口，例如 `<IP_ADDRESS>:7000`。",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "protocol",
            "in": "query",
            "description": "使用的协议。默认为 `http`。",
            "schema": {
              "type": "string",
              "enum": [
                "http",
                "https"
              ],
              "default": "http"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "[\n\t\"http:\\/\\/user-smith-sessionduration-1:<EMAIL_ADDRESS>:10000\",\n\t\"http:\\/\\/user-smith-sessionduration-1:<EMAIL_ADDRESS>:10001\"\n]"
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "example": "http://user-smith-sessionduration-1:<EMAIL_ADDRESS>:10000"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"message\": \"Invalid data provided.\",\n\t\"violations\": [\n\t\t\"sessionType: The value you selected is not a valid choice.\"\n\t]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Invalid data provided."
                    },
                    "violations": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "sessionType: The value you selected is not a valid choice."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [],
        "tags": [
          "端点"
        ]
      }
    },
    "/v2/endpoints-custom": {
      "get": {
        "x-mint": {
          "href": "/cn/api-reference/endpoints/generate-custom-endpoints"
        },
        "summary": "生成自定义端点",
        "description": "为住宅代理和按 GB 付费数据中心（已弃用）订阅生成自定义代理端点。如果已设置默认值，则不需要在请求参数查询中包含该参数。",
        "operationId": "generate-custom-endpoints",
        "parameters": [
          {
            "name": "proxy_type",
            "in": "query",
            "required": false,
            "description": "要为哪种代理类型生成路由",
            "schema": {
              "type": "string",
              "default": "residential_proxies",
              "enum": [
                "residential_proxies"
              ]
            }
          },
          {
            "name": "auth_type",
            "in": "query",
            "description": "选择授权方式，可以是 `basic` 或 `whitelist`。默认为 `basic`。`whitelist` 仅在参数 `proxyType` 值为 `residential_proxies` 时有效。",
            "schema": {
              "type": "string",
              "enum": [
                "basic",
                "whitelist"
              ],
              "default": "basic"
            }
          },
          {
            "name": "username",
            "in": "query",
            "description": "提供用于授权的用户名。如果参数 `authType` 值为 `basic`，则此参数为**必填**。",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "password",
            "in": "query",
            "description": "提供用于授权的密码。如果参数 `authType` 值为 `basic`，则此参数为**必填**。",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_type",
            "in": "query",
            "description": "选择会话类型。选择 `sticky` 用于粘性会话，或 `random` 用于轮换会话。默认值为 `sticky`。",
            "schema": {
              "type": "string",
              "enum": [
                "sticky",
                "random"
              ],
              "default": "sticky"
            }
          },
          {
            "name": "session_time",
            "in": "query",
            "description": "会话时间（分钟），范围为 1-1440（含）。如果参数 `proxyType` 值为 `residential_proxies` 且 `authType` 值为 `basic` 且 `sessionType` 值为 `sticky`，则此参数为**必填**。默认值为 10。",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "name": "location",
            "in": "query",
            "description": "可用位置之一，小写，可以是国家 Alpha-2 代码、城市或州名。要获取可用位置，请查看\"按类型获取端点\"。默认为 `random`。",
            "schema": {
              "type": "string",
              "default": "random"
            }
          },
          {
            "name": "output_format",
            "in": "query",
            "description": "输出格式类型。默认为 `protocol:auth@endpoint`。",
            "schema": {
              "type": "string",
              "enum": [
                "protocol:auth@endpoint",
                "endpoint:auth",
                "auth@endpoint"
              ],
              "default": "protocol:auth@endpoint"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "将生成并返回的路由数量。最小值为 1，最大值取决于参数 `page` 和特定位置。默认值为 10。",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "路由页码（分页）。最小值为 1，最大值取决于参数 `count` 和特定位置。默认值为 1。",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "response_format",
            "in": "query",
            "description": "返回的响应类型。可以是 `json`、`txt` 或 `html`。默认为 `json`。",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "txt",
                "html"
              ],
              "default": "json"
            }
          },
          {
            "name": "line_break",
            "in": "query",
            "description": "响应内容中使用的换行符。如果参数 `responseType` 值为 `txt`，则此参数为**必填**。默认为 `\\n`。",
            "schema": {
              "type": "string",
              "enum": [
                "\\n",
                "\\r\\n",
                "\\r",
                "\\t"
              ],
              "default": "\\n"
            }
          },
          {
            "name": "domain",
            "in": "query",
            "required": false,
            "description": "路由应使用的域名。默认为 `dedoco.com`。`ip` 用于使用 IP 地址代替域名。",
            "schema": {
              "type": "string",
              "default": "decodo.com"
            }
          },
          {
            "name": "ip",
            "in": "query",
            "description": "用于代替域名的 IP 地址。如果参数 `domain` 值为 `ip`，则此字段为**必填**。",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": [
                      "http://user-smith-sessionduration-1:<EMAIL_ADDRESS>:10000",
                      "http://user-smith-sessionduration-1:<EMAIL_ADDRESS>:10001"
                    ]
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "example": "http://user-smith-sessionduration-1:<EMAIL_ADDRESS>:10000"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"message\": \"Invalid data provided.\",\n\t\"violations\": [\n\t\t\"sessionType: The value you selected is not a valid choice.\"\n\t]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Invalid data provided."
                    },
                    "violations": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "sessionType: The value you selected is not a valid choice."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [],
        "tags": [
          "端点"
        ]
      }
    },
    "/v2/subscriptions": {
      "get": {
        "x-mint": {
          "href": "/cn/api-reference/subscriptions/get-subscriptions"
        },
        "summary": "获取订阅信息",
        "description": "获取住宅代理订阅的详细信息",
        "operationId": "get-subscriptions",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\"traffic_limit\":\"50\"\n\"traffic_per_period\":\"0.15\"\n\"users_limit\":3\n\"ip_address_limit\":2\n\"valid_from\":\"2018-11-08\"\n\"valid_until\":\"2019-06-30\"\n\"service_type\":\"residential_proxies\"\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error_code\":\"not_found\"\n  \"message\":\"Resource not found\"\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "tags": [
          "订阅"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "子用户",
      "description": "管理住宅代理订阅的子用户"
    },
    {
      "name": "白名单 IP",
      "description": "管理住宅代理订阅的白名单 IP"
    },
    {
      "name": "端点",
      "description": "管理和生成代理端点"
    },
    {
      "name": "订阅",
      "description": "订阅信息"
    }
  ]
}
