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

# Refresh JWT access token

> **System Function**: Obtains a new access token using a valid refresh token.
    This endpoint allows users to refresh their expired access tokens without requiring re-authentication. Users must provide their valid refresh token to receive new access and refresh tokens.



## OpenAPI

````yaml POST /refresh
openapi: 3.0.0
info:
  title: DeFindex API
  description: API documentation for DeFindex endpoints
  version: 1.0.0
  contact: {}
  x-logo:
    url: https://links.paltalabs.io/defindex-full.svg
    backgroundColor: '#0e0e0e'
    altText: DeFindex Logo
    href: https://defindex.io
servers: []
security: []
tags: []
paths:
  /refresh:
    post:
      tags:
        - Auth
      summary: Refresh JWT access token
      description: >-
        **System Function**: Obtains a new access token using a valid refresh
        token.
            This endpoint allows users to refresh their expired access tokens without requiring re-authentication. Users must provide their valid refresh token to receive new access and refresh tokens.
      operationId: AuthController_refreshTokens
      parameters: []
      responses:
        '200':
          description: Token refresh successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  username:
                    type: string
                    description: Username of the user
                  role:
                    type: string
                    description: Role of the user
                  access_token:
                    type: string
                    description: New JWT access token for API authentication
                  refresh_token:
                    type: string
                    description: New JWT refresh token for future renewals
                example:
                  username: defi_investor
                  role: USER
                  access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
                  refresh_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
        '401':
          description: Unauthorized - invalid or expired refresh token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.