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

> ## Agent Instructions
> For new direct REST integrations, use the v2026-04 surfaces. The @fluid-app FairShare SDK continues to use its own published public-v2025-06 contract.
> Authenticate with the header Authorization: Bearer <token>; public storefront read endpoints require no auth.
> Lists use cursor pagination via the page[cursor] and page[limit] query params; follow meta.pagination.next_cursor until it is null.
> Never use /api/company/v1 or /api/v1 paths, page/per_page params, or offset pagination — they are legacy.
> The OpenAPI specs under api-reference/ are the authoritative contracts; prefer them over prose when in doubt. api-reference/storefront-v2026-04.yaml covers the v2026-04 storefront surface (/api/v202604/... paths); api-reference/auth-v0.yaml covers the unversioned auth surface (/api/... paths — authentication, MFA, social auth, and token exchange); api-reference/checkout-v2026-04.yaml covers the v2026-04 checkout surface (/api/checkout/v2026-04/... paths — carts, cart auth, discounts, items, subscriptions, orders, enrollments, and store config); api-reference/public-v2025-06.yaml covers the Public SDK surface used by the @fluid-app FairShare SDK, including its parallel cart lifecycle, browser integrations, versioned payment callbacks, unversioned public utilities, and the cart price-override operation; api-reference/payment-v2026-04.yaml covers the v2026-04 payment gateway admin surface (/api/payment/v2026-04/... paths, bearer-authenticated — gateway CRUD, gateway purchase/authorize/$0-verify, transaction list/show and capture/void/credit, and merchant payment configuration); api-reference/payments-v2026-04.yaml covers the v2026-04 cart payment surface (/api/payments/v2026-04/carts/{cart_token}/... paths, authenticated by the cart token in the path with no bearer — payment-method selection, VGS card tokenization, 3D Secure verification, and PayPal/Braintree/Klarna/Apple Pay flows); api-reference/commerce-v2026-04.yaml covers the v2026-04 commerce order-editing surface (/api/v202604/orders/{order_id}/edits paths, bearer-authenticated — post-checkout order edits that atomically insert items and add adjustments/discounts, with an optional dry-run preview); api-reference/webhooks-v0.yaml covers the unversioned webhooks surface (/api/... paths — webhook registration, delivery payloads, callback registrations, company events, and webhook/callback schemas).
> Successful responses wrap the resource payload alongside a top-level integer status and a meta object.

# Confirm MFA via SSO

> Verify a multi-factor authentication code through the SSO flow.



## OpenAPI

````yaml /api-reference/auth-v0.yaml post /api/single_sign_ons/confirm_mfa
openapi: 3.1.0
info:
  title: Fluid Auth API
  version: v0
  description: >-
    Authentication, MFA, social auth, impersonation, and token exchange
    endpoints.
  contact:
    email: support@fluid.app
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.fluid.app
  - url: https://{company}.fluid.app
    description: Production server with company subdomain
    variables:
      company:
        default: myco
        description: Company subdomain
security: []
tags:
  - name: auth-token
    description: Short-lived auth-token minting for the current user company.
  - name: authentication
    description: >-
      Email MFA login, company switching, JWT-based "me" lookups, and public
      company branding.
  - name: confirm-visitor
    description: Visitor token confirmation.
  - name: impersonation
    description: Root-admin company impersonation (start and exit).
  - name: multi-factor-authentications
    description: MFA record creation and verification-code checks.
  - name: single-sign-ons
    description: SSO-flow aliases of the authentication MFA and lookup endpoints.
  - name: social-auth
    description: >-
      Google, Facebook, and Apple OAuth URLs, callback handling, and Apple
      account linking.
  - name: switch-role
    description: Switch the current admin user between admin and rep roles.
  - name: token-exchange
    description: Exchange and refresh JWTs and user-company tokens.
paths:
  /api/single_sign_ons/confirm_mfa:
    post:
      tags:
        - single-sign-ons
      summary: Confirm MFA via SSO
      description: Verify a multi-factor authentication code through the SSO flow.
      operationId: auth_v0_sso_confirm_mfa
      parameters:
        - name: fluid_shop
          in: query
          required: false
          description: >-
            Company subdomain used to pick which company receives the
            `mfa_verified` webhook. When omitted the company is resolved from
            the authenticated record's own companies.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - uuid
                - multi_factor_authentication
              properties:
                uuid:
                  type: string
                multi_factor_authentication:
                  type: object
                  required:
                    - verification_code
                  properties:
                    verification_code:
                      type: string
            examples:
              confirm_emailed_passcode:
                summary: Confirm the emailed MFA passcode to complete login
                value:
                  uuid: mfa_9f8c1b2a3d4e5f60
                  multi_factor_authentication:
                    verification_code: '123456'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfirmMfaResponse'
        '404':
          description: No MFA record matches the supplied uuid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '410':
          description: The verification code has expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security: []
components:
  schemas:
    ConfirmMfaResponse:
      type: object
      additionalProperties: false
      required:
        - authenticated
        - auth_type
        - companies
      properties:
        authenticated:
          description: >-
            `true` once the submitted verification code matched, meaning the
            JWTs in `companies` are usable.
          type: boolean
        auth_type:
          description: >
            Top-level principal kind resolved by this login. Prefer the
            per-entry

            `companies[].auth_type` when routing, since a user can be a rep in
            one

            company and a customer in another.
          type: string
          enum:
            - user
            - customer
            - rep
        companies:
          description: >
            One entry per company the authenticated principal belongs to, each
            with

            its own bearer JWT. A single-company user gets a one-element array.
          type: array
          items:
            $ref: '#/components/schemas/ConfirmMfaCompany'
        meta:
          $ref: '#/components/schemas/Meta'
          description: Response metadata (request id and generation timestamp).
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
        - error_message
        - errors
        - meta
      properties:
        error_message:
          description: >-
            Human-readable summary of what went wrong, safe to surface to the
            caller.
          type: string
        errors:
          $ref: '#/components/schemas/ErrorBag'
          description: >-
            Structured per-field or per-issue detail behind `error_message`;
            shape varies (see `ErrorBag`) and is `null` when no structured
            detail is available.
        meta:
          $ref: '#/components/schemas/Meta'
          description: Response metadata (request id and generation timestamp).
    ConfirmMfaCompany:
      description: Company returned after successful MFA confirmation
      type: object
      additionalProperties: false
      required:
        - id
        - name
        - jwt
      properties:
        id:
          description: >-
            Numeric identifier of the company this entry authenticates the user
            into.
          type: integer
        name:
          description: Display name of the company.
          type: string
        shop_name:
          description: Fluid shop identifier for the company (its `*.fluid.app` shop name).
          type: string
        logo_url:
          description: URL of the company logo, or `null` when none is set.
          type:
            - string
            - 'null'
        primary_domain_hostname:
          description: >-
            Company's primary custom domain hostname, or `null` when only the
            default shop domain is configured.
          type:
            - string
            - 'null'
        jwt:
          description: >
            Bearer JWT scoped to this company. Send it as `Authorization: Bearer

            <jwt>` on subsequent requests, or exchange it for a user-company
            token via

            `PUT /api/user_companies/jwt_exchange`.
          type: string
        auth_type:
          description: >-
            Per-company auth context for this entry's jwt — "rep" (admin/rep
            surface) or "customer" (checkout/customer portal). Lets the client
            route each company to the correct destination instead of relying on
            the single top-level auth_type, which is ambiguous for a user who is
            a rep in one company and a customer in another.
          type:
            - string
            - 'null'
          enum:
            - rep
            - customer
            - null
    Meta:
      type: object
      properties:
        request_id:
          description: >
            Opaque per-request identifier echoed on the response; `null` when
            the

            request was not assigned one. Quote it when reporting an issue so
            support

            can correlate server-side logs.
          type:
            - string
            - 'null'
        timestamp:
          description: Server time the response was generated, as an ISO 8601 date-time.
          type: string
          format: date-time
    ErrorBag:
      description: >-
        Validation errors keyed by field, a list of errors, a single error
        message, or null when no structured error details are available.
      anyOf:
        - type: string
        - type: array
          items:
            $ref: '#/components/schemas/ErrorValue'
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/ErrorValue'
        - type: 'null'
    ErrorValue:
      description: A validation or API error value.
      anyOf:
        - type: string
        - type: array
          items:
            type: string
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
    JsonValue:
      description: >-
        Any valid JSON value for provider, integration, theme, metadata, or
        other dynamic payloads whose keys are not fixed by the API contract.
      anyOf:
        - type: string
        - type: number
        - type: boolean
        - type: 'null'
        - type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'

````