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

# 刷新 JWT

> 刷新访问令牌



## OpenAPI

````yaml /specs/bp-agent-account.openapi.json post /api/auth/refresh
openapi: 3.1.0
info:
  title: BP-Agent Account API
  description: BP-Agent 账号接口：项目导入与重复复用、N1 打标及项目卡读取。除登录和刷新外，接口使用账号 JWT 鉴权。
  contact:
    name: BP Agent 开发团队
    email: support@bpagent.com
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
  version: 1.0.0
servers:
  - url: https://bptest.mapleai.cc
    description: 测试环境（仅 relay 上传）
  - url: https://project.mapleai.cc
    description: 生产环境（OSS；STS 直传需服务端启用）
security: []
paths:
  /api/auth/refresh:
    post:
      tags:
        - 认证授权 / Authentication
      summary: 刷新 JWT
      description: 刷新访问令牌
      operationId: refresh_token_api_auth_refresh_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshToken'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse_TokenResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RefreshToken:
      properties:
        refresh_token:
          type: string
          title: Refresh Token
          description: 刷新令牌
      type: object
      required:
        - refresh_token
      title: RefreshToken
    SuccessResponse_TokenResponse_:
      properties:
        code:
          type: integer
          title: Code
          description: 响应码，成功时为0
          default: 0
        message:
          type: string
          title: Message
          description: 成功消息
          default: 操作成功
        data:
          $ref: '#/components/schemas/TokenResponse'
          description: 响应数据
        timestamp:
          anyOf:
            - type: integer
            - type: 'null'
          title: Timestamp
          description: 响应时间戳（可选）
      type: object
      title: SuccessResponse[TokenResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TokenResponse:
      properties:
        access_token:
          type: string
          title: Access Token
          description: 访问令牌
        refresh_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Refresh Token
          description: 刷新令牌
        token_type:
          type: string
          title: Token Type
          description: 令牌类型
          default: bearer
      type: object
      required:
        - access_token
      title: TokenResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````