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

# Post v2usermfa

> Setup MFA



## OpenAPI

````yaml /api-reference/swagger.yml post /v2/user/mfa
openapi: 3.0.0
info:
  version: 1.0.0
  title: Prisme.ai APIs
  description: Prisme.ai APIs specifications
  termsOfService: https://www.prisme.ai/mentions-legales
  contact:
    name: Prisme.ai Support Team
    email: support@prisme.ai
    url: https://www.prisme.ai
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.eda.prisme.ai
  - url: http://localhost:3001
security:
  - BearerAuth: []
  - WorkspaceApiKeyAuth: []
  - BearerAuth: []
    WorkspaceApiKeyAuth: []
paths:
  /v2/user/mfa:
    post:
      tags:
        - API Gateway
      description: Setup MFA
      operationId: setupMFA
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - method
                - currentPassword
              properties:
                method:
                  $ref: '#/components/schemas/SupportedMFA'
                currentPassword:
                  type: string
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    required:
                      - secret
                      - qrImage
                    properties:
                      secret:
                        type: string
                      qrImage:
                        type: string
                  - type: object
                    required:
                      - method
                    properties:
                      method:
                        type: string
        '400':
          description: Bad parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadParametersError'
        '401':
          description: AuthenticationError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
components:
  schemas:
    SupportedMFA:
      type: string
      enum:
        - totp
        - none
        - '*'
    BadParametersError:
      type: object
      properties:
        error:
          type: string
          example: BadParameters
        message:
          type: string
        details: {}
    AuthenticationError:
      type: object
      properties:
        error:
          type: string
          example: AuthenticationError
        message:
          type: string
          example: Unauthenticated
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: x-prismeai-api-key

````