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

# Refresh Token

> OAuth2 compatible token, get an access token for future requests using refresh token



## OpenAPI

````yaml post /auth/refresh-token
openapi: 3.1.0
info:
  title: Monyfix API
  description: Monyfix
  version: 1.0.0
servers: []
security: []
paths:
  /auth/refresh-token:
    post:
      tags:
        - auth
      summary: Refresh Token
      description: >-
        OAuth2 compatible token, get an access token for future requests using
        refresh token
      operationId: refresh_token_auth_refresh_token_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshTokenRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessTokenResponse'
        '400':
          description: Refresh token expired or is already used
          content:
            application/json:
              examples:
                refresh token expired:
                  summary: Refresh token expired
                  value:
                    detail: Refresh token expired
                refresh token already used:
                  summary: Refresh token already used
                  value:
                    detail: Refresh token already used
        '404':
          description: Refresh token does not exist
          content:
            application/json:
              example:
                detail: Refresh token not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RefreshTokenRequest:
      properties:
        refresh_token:
          type: string
          title: Refresh Token
      type: object
      required:
        - refresh_token
      title: RefreshTokenRequest
    AccessTokenResponse:
      properties:
        token_type:
          type: string
          title: Token Type
          default: Bearer
        access_token:
          type: string
          title: Access Token
        expires_at:
          type: integer
          title: Expires At
        refresh_token:
          type: string
          title: Refresh Token
        refresh_token_expires_at:
          type: integer
          title: Refresh Token Expires At
      type: object
      required:
        - access_token
        - expires_at
        - refresh_token
        - refresh_token_expires_at
      title: AccessTokenResponse
    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

````