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

# Regenerate MFA backup codes

> Regenerate MFA backup codes for the authenticated user.



## OpenAPI

````yaml https://api.arklow.io/swagger/ui/json post /v1/self/mfa/regenerate/totp
openapi: 3.1.0
info:
  title: Arklow
  description: Arklow's API
  version: 0.1.0
servers:
  - url: https://api.arklow.io
    description: Production
  - url: http://localhost:3123
    description: Local development
security:
  - apiKey: []
tags:
  - name: actions
  - name: api_keys
  - name: billing
  - name: config
  - name: credentials
  - name: destinations
  - name: invites
  - name: members
  - name: metrics
  - name: notifications
  - name: orgs
  - name: rules
  - name: sources
  - name: users
  - name: ingress
externalDocs:
  url: https://api.arklow.io/swagger/ui
paths:
  /v1/self/mfa/regenerate/totp:
    post:
      tags:
        - users
      summary: Regenerate MFA backup codes
      description: Regenerate MFA backup codes for the authenticated user.
      operationId: post_v1_self_mfa_regenerate_totp
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - device_id
              properties:
                device_id:
                  type: string
                  pattern: ^[0-9]+$
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - errors
                properties:
                  data:
                    anyOf:
                      - type: object
                        required:
                          - device
                          - backup_codes
                          - session_mfa_not_after
                        properties:
                          device:
                            type: object
                            required:
                              - id
                              - user_id
                              - name
                              - device_type
                              - confirmed_at
                              - last_used_at
                              - updated_at
                              - deleted_at
                            properties:
                              id:
                                type: string
                              user_id:
                                type: string
                              name:
                                type: string
                                minLength: 1
                                maxLength: 64
                              device_type:
                                anyOf:
                                  - type: string
                                    enum:
                                      - totp
                              confirmed_at:
                                anyOf:
                                  - type: string
                                    format: date-time
                                  - type: 'null'
                              last_used_at:
                                anyOf:
                                  - type: string
                                    format: date-time
                                  - type: 'null'
                              updated_at:
                                type: string
                                format: date-time
                              deleted_at:
                                anyOf:
                                  - type: string
                                    format: date-time
                                  - type: 'null'
                          backup_codes:
                            type: array
                            items:
                              type: string
                          session_mfa_not_after:
                            type: string
                            format: date-time
                      - type: 'null'
                  errors:
                    anyOf:
                      - type: array
                        items:
                          type: object
                          required:
                            - code
                            - message
                          properties:
                            code:
                              type: string
                            message:
                              type: string
                      - type: 'null'
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-arklow-auth
      in: header

````