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

# Verify 2Fa Setup

> Verify TOTP code and activate 2FA. Requires password if the user has one.



## OpenAPI

````yaml https://api.apilens.ai/api/v1/openapi.json post /api/v1/auth/2fa/verify
openapi: 3.1.0
info:
  title: APILens API
  version: 1.0.0
  description: API Observability Platform
servers: []
security: []
paths:
  /api/v1/auth/2fa/verify:
    post:
      tags:
        - Auth
      summary: Verify 2Fa Setup
      description: >-
        Verify TOTP code and activate 2FA. Requires password if the user has
        one.
      operationId: api_auth_router_verify_2fa_setup
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TwoFactorVerifyRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BackupCodesResponse'
      security:
        - JWTBearer: []
components:
  schemas:
    TwoFactorVerifyRequest:
      properties:
        code:
          title: Code
          type: string
        password:
          anyOf:
            - type: string
            - type: 'null'
          title: Password
      required:
        - code
      title: TwoFactorVerifyRequest
      type: object
    BackupCodesResponse:
      properties:
        codes:
          items:
            type: string
          title: Codes
          type: array
      required:
        - codes
      title: BackupCodesResponse
      type: object
  securitySchemes:
    JWTBearer:
      type: http
      scheme: bearer

````