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

# Refresh token

> Refresh authentication token



## OpenAPI

````yaml /api-reference/openapi/Evo-Auth-Service/authentication.yaml post /api/v1/auth/refresh
openapi: 3.0.1
info:
  title: Evolution Foundation - Auth Service - Authentication
  description: Authentication and user and account management
  version: v1.0.0
servers:
  - url: https://api.evoai.app
    description: Production server
  - url: http://localhost:3001
    description: Development server
    variables:
      port:
        default: '3001'
  - url: '{customUrl}'
    description: Custom server
    variables:
      customUrl:
        default: https://your-instance.com
        description: Enter your server URL
security: []
paths:
  /api/v1/auth/refresh:
    post:
      summary: Refresh token
      description: Refresh authentication token
      operationId: refreshToken
      responses:
        '200':
          description: Token refreshed successfully
          headers:
            access-token:
              schema:
                type: string
              description: New authentication token
            client:
              schema:
                type: string
              description: Client identifier
            uid:
              schema:
                type: string
              description: User identifier
            expiry:
              schema:
                type: string
              description: Token expiration timestamp
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      access_token:
                        type: string
                      expires_in:
                        type: integer
                      token_type:
                        type: string
                  meta:
                    type: object
                    properties:
                      timestamp:
                        type: string
                        format: date-time
                  message:
                    type: string
        '400':
          description: Bad Request (invalid data)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                validation_error:
                  summary: Invalid request parameters
                  value:
                    success: false
                    error:
                      code: VALIDATION_ERROR
                      message: Invalid request parameters
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/auth/refresh
                      method: POST
        '401':
          description: Unauthorized (invalid or missing refresh token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: Refresh token not found or invalid
                  value:
                    success: false
                    error:
                      code: UNAUTHORIZED
                      message: Token refresh failed
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/auth/refresh
                      method: POST
                refresh_token_not_found:
                  summary: Refresh token not found
                  value:
                    success: false
                    error:
                      code: UNAUTHORIZED
                      message: Refresh token not found
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/auth/refresh
                      method: POST
                invalid_refresh_token:
                  summary: Invalid refresh token
                  value:
                    success: false
                    error:
                      code: UNAUTHORIZED
                      message: Invalid refresh token
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/auth/refresh
                      method: POST
                refresh_token_expired:
                  summary: Refresh token expired
                  value:
                    success: false
                    error:
                      code: UNAUTHORIZED
                      message: Refresh token expired
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/auth/refresh
                      method: POST
        '500':
          description: Internal Server Error (erro interno do servidor)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internal_error:
                  summary: Internal server error
                  value:
                    success: false
                    error:
                      code: INTERNAL_ERROR
                      message: An unexpected error occurred
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/auth/refresh
                      method: POST
      security:
        - ApiAccessTokenAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - success
        - error
        - meta
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: VALIDATION_ERROR
            message:
              type: string
              example: Validation failed
            details:
              type: object
              additionalProperties: true
              nullable: true
        meta:
          type: object
          required:
            - timestamp
            - path
            - method
          properties:
            timestamp:
              type: string
              format: date-time
              example: '2024-01-15T10:30:00Z'
            path:
              type: string
              example: /api/v1/super_admin/accounts/123
            method:
              type: string
              example: POST
  securitySchemes:
    ApiAccessTokenAuth:
      type: apiKey
      in: header
      name: api_access_token
      description: API access token authentication

````

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