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

# Refresh Session

> Exchange a refresh token for a short-lived session token (10 min).

If user_id differs from the token owner, checks team membership
and issues a delegated session token (sub=owner, uid=target).



## OpenAPI

````yaml /openapi.json post /api/v1/auth/refresh
openapi: 3.1.0
info:
  title: HEVN API
  description: Backend API for HEVN mobile neobank
  version: 0.1.2
servers:
  - url: https://api.hevn.finance
    description: Production
security: []
paths:
  /api/v1/auth/refresh:
    post:
      tags:
        - auth
      summary: Refresh Session
      description: |-
        Exchange a refresh token for a short-lived session token (10 min).

        If user_id differs from the token owner, checks team membership
        and issues a delegated session token (sub=owner, uid=target).
      operationId: refresh_session_api_v1_auth_refresh_post
      parameters:
        - name: user-agent
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: User-Agent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionTokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    RefreshRequest:
      properties:
        userId:
          type: string
          title: Userid
          description: Target user UUID
      type: object
      required:
        - userId
      title: RefreshRequest
      description: Request for refreshing a session token.
    SessionTokenResponse:
      properties:
        accessToken:
          type: string
          title: Accesstoken
          description: JWT access token (10 min)
        tokenType:
          type: string
          title: Tokentype
          default: bearer
        expiresIn:
          type: integer
          title: Expiresin
          description: Token TTL in seconds
          default: 600
      type: object
      required:
        - accessToken
      title: SessionTokenResponse
      description: Response with short-lived JWT session token.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      x-default: Bearer <token>

````