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

# Submit MFA response

<Info>
  This endpoint requires a valid authorisation for the user. If no active authorisation exists, the request will be rejected.
  You can optionally pass the `x-teal-authorisation-id` header to specify which authorisation to use; otherwise the system will resolve a valid authorisation automatically.
  See [Authorisations](/authorisations) for more details.
</Info>


## OpenAPI

````yaml PUT /accounts/{account_id}/mfa
openapi: 3.0.1
info:
  title: Payroll API
  description: A full flagged payroll api provided by Teal
  version: 1.0.0
servers:
  - url: https://api.sandbox.goteal.co
    description: Sandbox server for experiments
  - url: https://api.goteal.co
    description: Production server
security:
  - ApiKeyAuth: []
  - MemberBearerAuth: []
paths:
  /accounts/{account_id}/mfa:
    description: >-
      Submit an MFA response to complete account authentication after an MFA
      challenge is returned during account creation.
    put:
      summary: Submit an MFA response for an account
      parameters:
        - in: path
          name: account_id
          schema:
            type: string
          required: true
          description: ID of the account requiring MFA
        - $ref: '#/components/parameters/XAuthorisationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - mfa
              properties:
                mfa:
                  type: string
                  description: >-
                    The MFA response value (code, date, or password characters
                    depending on the MFA method)
                  example: '123456'
      responses:
        '200':
          description: MFA response accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountsResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/UnauthorizedBearer'
        '404':
          $ref: '#/components/responses/ResourceNotFound'
components:
  parameters:
    XAuthorisationId:
      name: x-teal-authorisation-id
      in: header
      required: false
      description: >-
        Optional authorisation ID to associate with this request. If not
        provided, the system will attempt to resolve a valid authorisation for
        the user automatically.
      schema:
        type: string
        format: uuid
        example: 7f3b8c2a-1d4e-4f6a-8b8c-9a0b1c2d3e4f
  schemas:
    AccountsResult:
      type: object
      required:
        - payroll_provider
        - user_name
        - created_at
        - account_id
      properties:
        account_id:
          type: string
          description: The id of the account
          example: 95a0e70b-fe02-4f47-aef9-2efff279df71
        payroll_provider:
          type: string
          description: The payroll provider to use
          example: quickbooks
        user_name:
          type: string
          description: The login of the user
          example: john.smith@company.com
        status:
          type: string
          description: Status of account
          example: PENDING
        created_at:
          $ref: '#/components/schemas/Date'
        mfa_enabled:
          type: boolean
          description: Is mfa enabled for this account
        latest_pay_date:
          $ref: '#/components/schemas/Date'
          description: The latest pay date of the payroll under this account
    Date:
      type: string
      format: date-time
      example: '2019-05-17T00:00:00.000Z'
    Error:
      required:
        - errors
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          description: An array of messages describing the errors
          example:
            - The request is missing the required field `name`
    UnauthorizedBarer:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          description: An array of messages describing the errors
          example:
            - 'Not Authorization: Bearer <token> provided or wrong value'
    NotFound:
      type: object
      properties:
        errors:
          type: string
          description: An array of messages describing the not found errors
          example:
            - >-
              The resource with id [8be3bb60-5ab4-4bd2-90e6-3b015691a827] does
              not exist
  responses:
    BadRequest:
      description: Bad request if one of the required parameters is missing
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnauthorizedBearer:
      description: Unauthorized if the X-API-KEY is not provided or is wrong
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthorizedBarer'
    ResourceNotFound:
      description: Resource not found
      content:
        applcation/json:
          schema:
            $ref: '#/components/schemas/NotFound'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    MemberBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token for authentication. The token should be the one returned by
        the "/members/signin"

````