> ## Documentation Index
> Fetch the complete documentation index at: https://microstrate-1133-notifications-prefs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Authenticate with recovery code

> Complete authentication using a recovery code after initial password verification. Recovery codes are one-time use.



## OpenAPI

````yaml /api-reference/endpoint/accounts/openapi.json post /accounts/auth-with-recovery-code
openapi: 3.0.3
info:
  title: quiva.ai Gateway
  description: >-
    API for managing accounts, users, authentication, and payments in the
    quiva.ai platform
  version: 1.0.0
  contact:
    name: quiva.ai Support
    url: https://app.quiva.ai
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Account Management
    description: Operations related to account creation, updating, and deletion
  - name: User Management
    description: Operations related to user creation, updating, and deletion
  - name: Authentication
    description: Operations related to authentication and session management
  - name: API Keys
    description: Operations related to API key management
  - name: Multi-Factor Authentication
    description: Operations related to MFA setup and verification
  - name: Payment
    description: Operations related to subscription and payment management
  - name: Mesh Nodes
    description: Operations related to mesh node management
paths:
  /accounts/auth-with-recovery-code:
    post:
      tags:
        - Authentication
        - Multi-Factor Authentication
      summary: Authenticate with recovery code
      description: >-
        Complete authentication using a recovery code after initial password
        verification. Recovery codes are one-time use.
      operationId: authWithRecoveryCode
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthWithRecoveryCodeRequest'
            example:
              token: mfa_token_abcdef1234567890
              code: ABCD-1234
      responses:
        '200':
          description: Authentication successful
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/AuthResponse'
        '401':
          description: Invalid recovery code or token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Used or invalid recovery code
      security: []
components:
  schemas:
    AuthWithRecoveryCodeRequest:
      type: object
      properties:
        token:
          type: string
          description: MFA token received from password authentication
        code:
          type: string
          description: Recovery code
      required:
        - token
        - code
      example:
        token: mfa_token_abcdef1234567890
        code: ABCD-1234
    AuthResponse:
      type: object
      properties:
        refresh_token:
          type: string
          description: Refresh token
        auth_token:
          type: string
          description: Authentication token
        passkey_enabled:
          type: boolean
          description: Whether passkey authentication is enabled
        totp_enabled:
          type: boolean
          description: Whether TOTP authentication is enabled
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````