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

# Verify KBA Questions

> Submits customer answers to KBA questions for identity verification. Requires four question-answer pairs with questionId and answerId values. Returns verification status indicating whether the customer passed or failed the KBA authentication.



## OpenAPI

````yaml post /kba/{id}
openapi: 3.1.0
info:
  title: Dwolla API
  description: Dwolla API Documentation
  contact:
    name: Dwolla Developer Relations Team
    url: https://developers.dwolla.com
    email: api@dwolla.com
  version: '2.0'
  termsOfService: https://www.dwolla.com/legal/tos/
  license:
    name: MIT
    url: https://github.com/Dwolla/dwolla-openapi/blob/master/LICENSE
servers:
  - url: https://api.dwolla.com
    description: Production server
  - url: https://api-sandbox.dwolla.com
    description: Sandbox server
security:
  - clientCredentials: []
tags:
  - name: tokens
    description: Operations related to Application Access Tokens
  - name: root
    description: Root API operations
  - name: accounts
    description: Operations related to Accounts
  - name: customers
    description: Operations related to Customers
  - name: kba
    description: Operations related to Knowledge-Based Authentication
  - name: beneficial owners
    description: Operations related to Beneficial Owners
  - name: documents
    description: Operations related to Documents
  - name: exchanges
    description: Operations related to Exchanges
  - name: exchange sessions
    description: Operations related to Exchange Sessions
  - name: funding sources
    description: Operations related to Funding Sources
  - name: transfers
    description: Operations related to Transfers
  - name: labels
    description: Operations related to Labels
  - name: mass payments
    description: Operations related to Mass Payments
  - name: events
    description: Operations related to Events
  - name: webhook subscriptions
    description: Operations related to Webhook Subscriptions
  - name: webhooks
    description: Operations related to Webhooks
  - name: client tokens
    description: Operations related to Client Tokens
  - name: sandbox simulations
    description: Sandbox-only operations for simulating processing of bank transfers
paths:
  /kba/{id}:
    post:
      tags:
        - kba
      summary: Verify KBA Questions
      description: >-
        Submits customer answers to KBA questions for identity verification.
        Requires four question-answer pairs with questionId and answerId values.
        Returns verification status indicating whether the customer passed or
        failed the KBA authentication.
      operationId: verifyKbaQuestions
      parameters:
        - name: id
          in: path
          description: The id of the KBA session to verify questions for.
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/Accept'
      requestBody:
        required: true
        description: Parameters for verifying KBA questions
        content:
          application/json:
            schema:
              required:
                - answers
              type: object
              properties:
                answers:
                  type: array
                  items:
                    type: object
                    required:
                      - questionId
                      - answerId
                    properties:
                      questionId:
                        type: string
                        example: '2355953375'
                      answerId:
                        type: string
                        example: '2687969335'
      responses:
        '200':
          description: created
          headers: {}
          content:
            application/vnd.dwolla.v1.hal+json:
              schema:
                type: object
                properties:
                  _links:
                    type: object
                    properties:
                      customer:
                        type: object
                        properties:
                          href:
                            type: string
                            example: >-
                              https://api.dwolla.com/customers/b5fd802d-d8c7-43ce-94a8-7c14485b7042
                          type:
                            type: string
                            example: application/vnd.dwolla.v1.hal+json
                          resource-type:
                            type: string
                            example: customer
                  verificationStatus:
                    type: string
                    example: verified
        '403':
          description: 403 Error
          headers: {}
          content:
            application/vnd.dwolla.v1.hal+json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ForbiddenError'
                  - $ref: '#/components/schemas/InvalidKbaSessionError'
                  - $ref: '#/components/schemas/ExpiredKbaSessionError'
        '404':
          description: 404 Error
          headers: {}
          content:
            application/vnd.dwolla.v1.hal+json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NotFound
                  message:
                    type: string
                    example: KBA session not found.
      x-codeSamples:
        - lang: bash
          source: >
            POST https://api.dwolla.com/kba/33aa88b1-97df-424a-9043-d5f85809858b

            Accept: application/vnd.dwolla.v1.hal+json

            Authorization: Bearer
            cRahPzURfaIrTewKL18tmslWPqKdzkLeYJm0oB1hGJ1vMPArft1v


            {
                "answers": [
                    { "questionId": "2355953375", "answerId": "2687969335" },
                    { "questionId": "2355953385", "answerId": "2687969385" },
                    { "questionId": "2355953395", "answerId": "2687969435" },
                    { "questionId": "2355953405", "answerId": "2687969485" }
                ]
            }
        - lang: javascript
          source: >
            // Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node

            var kbaUrl =
            "https://api.dwolla.com/kba/70b0e9cc-020d-4de2-9a82-a2281afa4c31";

            var requestBody = {
              answers: [
                { questionId: "2355953375", answerId: "2687969335" },
                { questionId: "2355953385", answerId: "2687969385" },
                { questionId: "2355953395", answerId: "2687969435" },
                { questionId: "2355953405", answerId: "2687969485" },
              ],
            };


            dwolla.post(kbaUrl, requestBody);
        - lang: python
          source: >
            # Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python

            kba_url =
            'https://api-sandbox.dwolla.com/kba/70b0e9cc-020d-4de2-9a82-a2281afa4c31'


            request_body = {
                'answers' : [
                    { 'questionId': "2355953375", 'answerId': "2687969335" },
                    { 'questionId': "2355953385", 'answerId': "2687969385" },
                    { 'questionId': "2355953395", 'answerId':"2687969435" },
                    { 'questionId': "2355953405", 'answerId': "2687969485" }
                ]
            }


            kba_answers = app_token.post (kba_url, request_body)
        - lang: php
          source: >
            <?php

            // Using dwollaswagger -
            https://github.com/Dwolla/dwolla-swagger-php

            $kbaApi = new DwollaSwagger\KbaApi($apiClient);


            $kbaUrl =
            "https://api-sandbox.dwolla.com/kba/70b0e9cc-020d-4de2-9a82-a2281afa4c31";


            $kbaAnswers = $kbaApi->answerKbaQuestions([
                "answers" => [
                     [
                         "questionId" => "2355953375",
                         "answerId" => "2687969335"
                     ],
                     [
                         "questionId" => "2355953385",
                         "answerId" => "2687969385"
                     ],
                     [
                         "questionId" => "2355953395",
                         "answerId" => "2687969435"
                     ],
                     [
                         "questionId" => "2355953405",
                         "answerId" => "2687969485"
                     ]
                ]
              ], $kbaUrl);
            ?>
        - lang: ruby
          source: >
            # Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby

            kba_url =
            'https://api-sandbox.dwolla.com/kba/70b0e9cc-020d-4de2-9a82-a2281afa4c31'


            request_body = {
                :answers => [
                    { :questionId => "2355953375", :answerId => "2687969335" },
                    { :questionId => "2355953385", :answerId => "2687969385" },
                    { :questionId => "2355953395", :answerId => "2687969435" },
                    { :questionId => "2355953405", :answerId => "2687969485" }
                ]
            }


            kba_answers = app_token.post kba_url, request_body
components:
  parameters:
    Accept:
      name: Accept
      in: header
      required: true
      description: >-
        The media type of the response. Must be
        application/vnd.dwolla.v1.hal+json
      schema:
        type: string
        enum:
          - application/vnd.dwolla.v1.hal+json
        default: application/vnd.dwolla.v1.hal+json
  schemas:
    ForbiddenError:
      title: ForbiddenError
      description: Error response schema for 403 Forbidden
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: Forbidden
        message:
          type: string
          example: The supplied credentials are not authorized for this resource.
    InvalidKbaSessionError:
      title: InvalidKbaSessionError
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: InvalidResourceState
        message:
          type: string
          example: The kba session is no longer valid.
    ExpiredKbaSessionError:
      title: ExpiredKbaSessionError
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: InvalidResourceState
        message:
          type: string
          example: The kba session has expired.
  securitySchemes:
    clientCredentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /token
          x-speakeasy-token-endpoint-authentication: client_secret_basic
          scopes: {}

````