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

# Regenerate two-factor recovery codes

> WARNING: Recovery codes are sensitive and should be stored securely by the client.
Old recovery codes will be invalidated and replaced with new ones.



## OpenAPI

````yaml https://dev.flextell.ai/docs/api.json post /v1/account/two-factor/recovery-codes/regenerate
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: '## Flextell API'
servers:
  - url: https://dev.flextell.ai/api
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/account/two-factor/recovery-codes/regenerate:
    post:
      tags:
        - Account
      summary: Regenerate two-factor recovery codes
      description: >-
        WARNING: Recovery codes are sensitive and should be stored securely by
        the client.

        Old recovery codes will be invalidated and replaced with new ones.
      operationId: account.two-factor.recovery-codes.regenerate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountTwoFactorPasswordRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                  data:
                    type: object
                    properties:
                      recovery_codes:
                        type: array
                        items: {}
                    required:
                      - recovery_codes
                required:
                  - success
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    AccountTwoFactorPasswordRequest:
      type: object
      properties:
        current_password:
          type: string
          description: The current account password.
      required:
        - current_password
      title: AccountTwoFactorPasswordRequest
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://dev.flextell.ai/oauth/authorize
          tokenUrl: https://dev.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````