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

# Refresh token



## OpenAPI

````yaml /openapi/openapi.yaml post /v2/auth/refresh
openapi: 3.0.3
info:
  title: Qanapi
  version: 3.0.0
  description: Secure API with enforced API Key headers. Supports V2 and V3 endpoints.
servers:
  - url: https://{subdomain}.qanapi.cloud/api
    description: The Qanapi API server
    variables:
      subdomain:
        default: ''
        description: Customer-specific subdomain.
security:
  - ApiKeyAuth: []
paths:
  /v2/auth/refresh:
    post:
      tags:
        - Authentication and Token Lifecycle
      summary: Refresh token
      responses:
        '200':
          description: New token issued
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    description: JWT access token
                  token_type:
                    type: string
                    example: bearer
                  expires_in:
                    type: integer
                    description: Token expiration time in seconds
        '401':
          description: Invalid refresh token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Invalid refresh token
      security:
        - BearerAuth: []
components:
  schemas:
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          example: An error occurred.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-qanapi-authorization
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````