> ## Documentation Index
> Fetch the complete documentation index at: https://help.decodo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 生成自定义端点

> 为住宅代理和按 GB 付费数据中心（已弃用）订阅生成自定义代理端点。如果已设置默认值，则不需要在请求参数查询中包含该参数。



## OpenAPI

````yaml /cn/api-reference/cn-jero_public_api.yaml get /v2/endpoints-custom
openapi: 3.1.0
info:
  title: Smartproxy
  version: '1.2'
servers:
  - url: https://api.decodo.com
security:
  - sec0: []
tags:
  - name: 子用户
    description: 管理住宅代理订阅的子用户
  - name: 白名单 IP
    description: 管理住宅代理订阅的白名单 IP
  - name: 端点
    description: 管理和生成代理端点
  - name: 订阅
    description: 订阅信息
paths:
  /v2/endpoints-custom:
    get:
      tags:
        - 端点
      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: []
components: {}

````