> ## 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.

# Begin passkey authentication

> Initiates the WebAuthn passkey authentication flow. Returns a challenge for the client to sign with the user's passkey.



## OpenAPI

````yaml /api-reference/endpoint/accounts/openapi.json post /accounts/begin-auth-with-passkey
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/begin-auth-with-passkey:
    post:
      tags:
        - Authentication
        - Multi-Factor Authentication
      summary: Begin passkey authentication
      description: >-
        Initiates the WebAuthn passkey authentication flow. Returns a challenge
        for the client to sign with the user's passkey.
      operationId: beginAuthWithPasskey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BeginAuthWithPasskeyRequest'
            example:
              email: user@example.com
              account: acme
      responses:
        '200':
          description: Passkey authentication challenge
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/CredentialAssertion'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: User not found or passkeys not enabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    BeginAuthWithPasskeyRequest:
      type: object
      properties:
        account:
          type: string
          description: Account name (optional)
        email:
          type: string
          format: email
          description: User's email address
      required:
        - email
      example:
        email: user@example.com
        account: acme
    CredentialAssertion:
      type: object
      description: WebAuthn credential assertion options for the client to process
      properties:
        challenge:
          type: string
          description: Base64-encoded challenge to be signed by the authenticator
        timeout:
          type: integer
          description: >-
            Time in milliseconds the user has to respond to the authentication
            prompt
        rpId:
          type: string
          description: Relying party identifier (usually the domain name)
        allowCredentials:
          type: array
          description: List of credentials that are allowed for this authentication
          items:
            type: object
            properties:
              id:
                type: string
                description: Base64-encoded credential ID
              type:
                type: string
                description: Credential type (e.g., 'public-key')
              transports:
                type: array
                description: List of allowed transports (e.g., 'internal', 'usb')
                items:
                  type: string
        userVerification:
          type: string
          description: User verification requirement (e.g., 'preferred', 'required')
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````