{
  "openapi": "3.1.0",
  "info": {
    "title": "GetTGAPI 对外申请 API",
    "description": "使用授权码作为 Bearer Key。仅接口创建的申请可通过此 API 访问。",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://gettgapi.com/api/open/v1"
    }
  ],
  "paths": {
    "/balance": {
      "get": {
        "summary": "查询授权码余额",
        "operationId": "getBalance",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Balance_"
                }
              }
            }
          },
          "422": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "429": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "400": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "401": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "403": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "404": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "405": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "503": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "408": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "409": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "410": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "413": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "415": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          }
        },
        "security": [
          {
            "AuthorizationCode": []
          }
        ]
      }
    },
    "/applications": {
      "post": {
        "summary": "预占一次并开始申请",
        "operationId": "createApplication",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewApplication"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Application_"
                }
              }
            }
          },
          "422": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "429": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "400": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "401": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "403": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "404": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "405": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "503": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "408": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "409": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "410": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "413": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "415": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          }
        },
        "security": [
          {
            "AuthorizationCode": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 80,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ]
      },
      "get": {
        "summary": "分页查询接口申请",
        "operationId": "listApplications",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 50,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Before"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ApplicationList_"
                }
              }
            }
          },
          "422": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "429": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "400": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "401": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "403": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "404": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "405": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "503": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "408": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "409": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "410": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "413": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "415": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          }
        },
        "security": [
          {
            "AuthorizationCode": []
          }
        ]
      }
    },
    "/applications/{application_id}": {
      "get": {
        "summary": "查询进度和验证码轮次",
        "operationId": "getApplication",
        "parameters": [
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Application Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Application_"
                }
              }
            }
          },
          "422": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "429": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "400": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "401": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "403": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "404": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "405": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "503": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "408": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "409": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "410": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "413": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "415": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          }
        },
        "security": [
          {
            "AuthorizationCode": []
          }
        ]
      }
    },
    "/applications/{application_id}/code": {
      "post": {
        "summary": "提交当前轮次验证码",
        "operationId": "submitCode",
        "parameters": [
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Application Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 80,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Verification"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Application_"
                }
              }
            }
          },
          "422": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "429": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "400": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "401": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "403": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "404": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "405": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "503": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "408": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "409": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "410": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "413": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "415": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          }
        },
        "security": [
          {
            "AuthorizationCode": []
          }
        ]
      }
    },
    "/applications/{application_id}/cancel": {
      "post": {
        "summary": "取消允许取消的申请",
        "operationId": "cancelApplication",
        "parameters": [
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Application Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 80,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Confirmation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Application_"
                }
              }
            }
          },
          "422": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "429": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "400": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "401": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "403": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "404": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "405": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "503": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "408": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "409": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "410": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "413": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "415": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          }
        },
        "security": [
          {
            "AuthorizationCode": []
          }
        ]
      }
    },
    "/applications/{application_id}/result": {
      "get": {
        "summary": "获取临时申请结果",
        "operationId": "getResult",
        "parameters": [
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Application Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Credentials_"
                }
              }
            }
          },
          "422": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "429": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "400": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "401": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "403": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "404": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "405": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "503": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "408": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "409": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "410": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "413": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "415": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          }
        },
        "security": [
          {
            "AuthorizationCode": []
          }
        ]
      }
    },
    "/applications/{application_id}/result/deletion": {
      "post": {
        "summary": "确认保存后清除临时结果",
        "operationId": "deleteResult",
        "parameters": [
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Application Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 80,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Confirmation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Deletion_"
                }
              }
            }
          },
          "422": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "429": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "400": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "401": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "403": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "404": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "405": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "503": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "408": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "409": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "410": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "413": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          },
          "415": {
            "description": "标准业务错误（详见站点 API 文档）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "仅限可重试错误"
              }
            }
          }
        },
        "security": [
          {
            "AuthorizationCode": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Application": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "phone_mask": {
            "type": "string",
            "title": "Phone Mask"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "short_name": {
            "type": "string",
            "title": "Short Name"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "waiting_code",
              "verifying",
              "retry_wait",
              "review_required",
              "succeeded",
              "failed",
              "cancelled",
              "duplicate",
              "deleted"
            ],
            "title": "Status"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "challenge": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Challenge"
              },
              {
                "type": "null"
              }
            ]
          },
          "poll_after_seconds": {
            "type": "integer",
            "title": "Poll After Seconds"
          },
          "retry_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retry At"
          },
          "result_expires_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Expires At"
          },
          "quota": {
            "type": "string",
            "enum": [
              "reserved",
              "consumed",
              "released"
            ],
            "title": "Quota"
          },
          "created_at": {
            "type": "integer",
            "title": "Created At"
          },
          "updated_at": {
            "type": "integer",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "phone_mask",
          "title",
          "short_name",
          "status",
          "message",
          "challenge",
          "poll_after_seconds",
          "retry_at",
          "result_expires_at",
          "quota",
          "created_at",
          "updated_at"
        ],
        "title": "Application"
      },
      "ApplicationList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Application"
            },
            "type": "array",
            "title": "Items"
          },
          "next_before": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Before"
          }
        },
        "type": "object",
        "required": [
          "items",
          "next_before"
        ],
        "title": "ApplicationList"
      },
      "Balance": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "available": {
            "type": "integer",
            "title": "Available"
          },
          "reserved": {
            "type": "integer",
            "title": "Reserved"
          },
          "consumed": {
            "type": "integer",
            "title": "Consumed"
          },
          "revoked": {
            "type": "integer",
            "title": "Revoked"
          },
          "max_concurrent": {
            "type": "integer",
            "title": "Max Concurrent",
            "default": 2
          },
          "result_retention_seconds": {
            "type": "integer",
            "title": "Result Retention Seconds"
          }
        },
        "type": "object",
        "required": [
          "total",
          "available",
          "reserved",
          "consumed",
          "revoked",
          "result_retention_seconds"
        ],
        "title": "Balance"
      },
      "Challenge": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "expires_at": {
            "type": "integer",
            "title": "Expires At"
          },
          "attempts_remaining": {
            "type": "integer",
            "title": "Attempts Remaining"
          }
        },
        "type": "object",
        "required": [
          "id",
          "expires_at",
          "attempts_remaining"
        ],
        "title": "Challenge"
      },
      "Confirmation": {
        "properties": {
          "confirm": {
            "type": "boolean",
            "title": "Confirm"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "confirm"
        ],
        "title": "Confirmation"
      },
      "Credentials": {
        "properties": {
          "api_id": {
            "type": "integer",
            "title": "Api Id"
          },
          "api_hash": {
            "type": "string",
            "title": "Api Hash"
          },
          "expires_at": {
            "type": "integer",
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "api_id",
          "api_hash",
          "expires_at"
        ],
        "title": "Credentials"
      },
      "Deletion": {
        "properties": {
          "application_id": {
            "type": "string",
            "title": "Application Id"
          },
          "deleted_at": {
            "type": "integer",
            "title": "Deleted At"
          },
          "status": {
            "type": "string",
            "const": "deleted",
            "title": "Status",
            "default": "deleted"
          }
        },
        "type": "object",
        "required": [
          "application_id",
          "deleted_at"
        ],
        "title": "Deletion"
      },
      "Envelope_ApplicationList_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ApplicationList"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id",
            "description": "本次 HTTP 请求的服务端追踪编号，不是幂等键。"
          }
        },
        "type": "object",
        "required": [
          "data",
          "request_id"
        ],
        "title": "Envelope[ApplicationList]"
      },
      "Envelope_Application_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Application"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id",
            "description": "本次 HTTP 请求的服务端追踪编号，不是幂等键。"
          }
        },
        "type": "object",
        "required": [
          "data",
          "request_id"
        ],
        "title": "Envelope[Application]"
      },
      "Envelope_Balance_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Balance"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id",
            "description": "本次 HTTP 请求的服务端追踪编号，不是幂等键。"
          }
        },
        "type": "object",
        "required": [
          "data",
          "request_id"
        ],
        "title": "Envelope[Balance]"
      },
      "Envelope_Credentials_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Credentials"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id",
            "description": "本次 HTTP 请求的服务端追踪编号，不是幂等键。"
          }
        },
        "type": "object",
        "required": [
          "data",
          "request_id"
        ],
        "title": "Envelope[Credentials]"
      },
      "Envelope_Deletion_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Deletion"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id",
            "description": "本次 HTTP 请求的服务端追踪编号，不是幂等键。"
          }
        },
        "type": "object",
        "required": [
          "data",
          "request_id"
        ],
        "title": "Envelope[Deletion]"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "NewApplication": {
        "properties": {
          "phone": {
            "type": "string",
            "maxLength": 30,
            "minLength": 7,
            "title": "Phone",
            "description": "含国家区号，只允许数字、空格和开头的 +。"
          },
          "title": {
            "type": "string",
            "maxLength": 60,
            "minLength": 3,
            "pattern": "^[\\w .-]+$",
            "title": "Title",
            "default": "My Telegram App"
          },
          "short_name": {
            "type": "string",
            "maxLength": 32,
            "minLength": 5,
            "pattern": "^[a-zA-Z][a-zA-Z0-9_]+$",
            "title": "Short Name"
          },
          "consent": {
            "type": "boolean",
            "title": "Consent",
            "description": "确认拥有号码使用权；必须为 true。"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "phone",
          "short_name",
          "consent"
        ],
        "title": "NewApplication"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "Verification": {
        "properties": {
          "challenge_id": {
            "type": "string",
            "format": "uuid",
            "title": "Challenge Id"
          },
          "code": {
            "type": "string",
            "maxLength": 64,
            "minLength": 3,
            "format": "password",
            "title": "Code",
            "description": "本轮开发者门户验证码，区分大小写。",
            "writeOnly": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "challenge_id",
          "code"
        ],
        "title": "Verification"
      },
      "PublicError": {
        "type": "object",
        "required": [
          "error",
          "request_id"
        ],
        "properties": {
          "request_id": {
            "type": "string"
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "retryable",
              "retry_after_seconds"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "APPLICATION_NOT_FOUND",
                  "BODY_TOO_LARGE",
                  "CHALLENGE_EXPIRED",
                  "CONCURRENCY_LIMIT",
                  "CONSENT_REQUIRED",
                  "HOST_DENIED",
                  "HTTPS_REQUIRED",
                  "IDEMPOTENCY_CONFLICT",
                  "IDEMPOTENCY_REQUIRED",
                  "INVALID_INPUT",
                  "INVALID_KEY",
                  "KEY_DISABLED",
                  "METHOD_NOT_ALLOWED",
                  "NOT_FOUND",
                  "ORIGIN_DENIED",
                  "PHONE_ALREADY_USED",
                  "PHONE_INVALID",
                  "QUOTA_EXHAUSTED",
                  "RATE_LIMITED",
                  "REQUEST_TIMEOUT",
                  "RESULT_GONE",
                  "RESULT_NOT_READY",
                  "SERVICE_BUSY",
                  "SERVICE_UNAVAILABLE",
                  "STATE_CONFLICT",
                  "TOO_MANY_ATTEMPTS",
                  "UNSUPPORTED_MEDIA_TYPE"
                ]
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "retry_after_seconds": {
                "type": "integer",
                "minimum": 0
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "AuthorizationCode": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Authorization code"
      }
    }
  }
}
