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

# Create Document Verification

> Verify a document against a 3rd party service. Currently supports Persona's
government ID verification, Inscribe document verification and Socure's
government ID verification.

The service (`"persona"`) and verification at that service (`"government-id"`)
must be specified, along with all attributes needed to satisfy the verification.

For Persona's Government ID verification the following additional request
parameters are required:

 - `verification` = `government-id`
 - `type` (state_id/passport/drivers_license)
 - `front_photo`
 - `back_photo` (this is optional, but helps with verification)

For Inscribe document verification the following additional request
parameters are required:

 - `verification` = `document`
 - `document`
 - `type` (drivers_license/social_security_card/bank_statement/payslip/tax_form/invoice/utility_bill/check/business_filing/financial_statement/unknown)

For Socure's Government ID verification the following additional request
parameters are required:

 - `verification` = `government-id`
 - `type` (state_id/passport/drivers_license)
 - `front_photo`
 - `back_photo` (this is optional, but helps with verification)
 - `self_portrait` (this is optional, but helps with verification)



## OpenAPI

````yaml /openapi.yaml post /api/applications/{application_id}/document_verifications
openapi: 3.0.3
info:
  title: Lendflow API docs
  description: ''
  version: 1.0.0
servers:
  - url: https://api.lendflow.com
security:
  - default: []
tags:
  - name: Authentication
    description: >-

      Lendflow uses API Bearer Tokens to permit access to our API. You can
      register for a new Lendflow API key on our <a style="color:blue;"
      href="https://app.lendflow.com/login">client portal</a> in less than 60
      seconds. The Bearer Token needs to be included in all API requests made to
      the API Service in the following form: <div
      id="auth-example">Authorization: Bearer [YOUR_TOKEN]</div><div
      id="auth-reminder"><div id="edge-green"></div><div
      id="auth-reminder-text">You must replace [YOUR_TOKEN] with your personal
      API key.</div></div>
  - name: Access Tokens
    description: |-

      Create and manage the personal access tokens used to authenticate API
      requests.
  - name: Workflow Management
    description: |-

      Create applications and manage them through every stage of their workflow,
      from intake through decision.
  - name: Documents
    description: |-

      Upload, retrieve, and manage the files attached to an application.
  - name: Placements
    description: |-

      Submit applications to lenders and manage each placement through its
      lifecycle.
  - name: Offers
    description: |-

      Create and manage offers on an application, from initial terms through
      funding.
  - name: Smartviews
    description: |-

      Save and manage reusable application filters that organize your pipeline.
  - name: Workflow Templates
    description: |-

      Browse the workflow templates available for creating applications.
  - name: Consent Templates
    description: |-

      Manage the consent documents presented to applicants for signature.
  - name: Offer Templates
    description: |-

      Manage the templates that define the structure and fields of your offers.
  - name: Data Orchestration
    description: |-

      Run data orchestration templates against applications and review their
      execution logs.
  - name: Attributes
    description: |-

      Define computed attributes and evaluate them against your applications.
  - name: Scorecards
    description: |-

      Run scorecards and scorecard groups against applications and retrieve
      their results.
  - name: Entity Profiles
    description: |-

      Manage the reusable business and individual profiles shared across
      applications.
  - name: Organization
    description: |-

      Manage the users in your organization.
  - name: Metadata
    description: |-

      Attach custom key-value data to your applications and files.
paths:
  /api/applications/{application_id}/document_verifications:
    parameters:
      - in: path
        name: application_id
        description: The ID of the application.
        example: architecto
        required: true
        schema:
          type: string
    post:
      tags:
        - Workflow Management
      summary: Create Document Verification
      description: >-
        Verify a document against a 3rd party service. Currently supports
        Persona's

        government ID verification, Inscribe document verification and Socure's

        government ID verification.


        The service (`"persona"`) and verification at that service
        (`"government-id"`)

        must be specified, along with all attributes needed to satisfy the
        verification.


        For Persona's Government ID verification the following additional
        request

        parameters are required:

         - `verification` = `government-id`
         - `type` (state_id/passport/drivers_license)
         - `front_photo`
         - `back_photo` (this is optional, but helps with verification)

        For Inscribe document verification the following additional request

        parameters are required:

         - `verification` = `document`
         - `document`
         - `type` (drivers_license/social_security_card/bank_statement/payslip/tax_form/invoice/utility_bill/check/business_filing/financial_statement/unknown)

        For Socure's Government ID verification the following additional request

        parameters are required:

         - `verification` = `government-id`
         - `type` (state_id/passport/drivers_license)
         - `front_photo`
         - `back_photo` (this is optional, but helps with verification)
         - `self_portrait` (this is optional, but helps with verification)
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                service:
                  type: string
                  description: A supported verification service identifier.
                  example: persona
                personal_information_id:
                  type: integer
                  description: >-
                    The ID of the personal information record (business owner)
                    the verification should be tied to.
                  example: 16
                verification:
                  type: string
                  description: A verification to perform against the service.
                  example: government-id
                type:
                  type: string
                  description: The type of document to verify.
                  example: passport
                front_photo:
                  type: string
                  format: binary
                  description: >-
                    A picture of the front of the ID (must be of type jpg, png,
                    heic, bmp, gif or pdf) or an id of already uploaded file.
                back_photo:
                  type: string
                  format: binary
                  description: >-
                    A picture of the back of the ID (must be of type jpg, png,
                    heic, bmp, gif or pdf) or an id of already uploaded file.
                self_portrait:
                  type: string
                  format: binary
                  description: >-
                    A picture of the self portrait (must be of type jpg, png,
                    heic, or pdf) or an id of already uploaded file.
                document:
                  type: string
                  format: binary
                  description: >-
                    A document to be verified (must be of type jpg, png, heic,
                    or pdf) or an id of already uploaded file.
              required:
                - service
                - verification
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: null
                    service: persona
                    verification: government-id
                    created_at: null
                    updated_at: null
                    processed_at: null
                    submitted_at: null
                    received_at: null
                    passed_at: null
                    failed_at: null
                    has_passed: false
                    has_failed: false
                    errored_at: null
                    error: null
                    error_status_code: null
                    document_type: null
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: null
                        nullable: true
                      service:
                        type: string
                        example: persona
                      verification:
                        type: string
                        example: government-id
                      created_at:
                        type: string
                        example: null
                        nullable: true
                      updated_at:
                        type: string
                        example: null
                        nullable: true
                      processed_at:
                        type: string
                        example: null
                        nullable: true
                      submitted_at:
                        type: string
                        example: null
                        nullable: true
                      received_at:
                        type: string
                        example: null
                        nullable: true
                      passed_at:
                        type: string
                        example: null
                        nullable: true
                      failed_at:
                        type: string
                        example: null
                        nullable: true
                      has_passed:
                        type: boolean
                        example: false
                      has_failed:
                        type: boolean
                        example: false
                      errored_at:
                        type: string
                        example: null
                        nullable: true
                      error:
                        type: string
                        example: null
                        nullable: true
                      error_status_code:
                        type: string
                        example: null
                        nullable: true
                      document_type:
                        type: string
                        example: null
                        nullable: true
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: >-
        <br>You can register for a new Lendflow API key on our <a
        style="color:blue;" href="https://app.lendflow.com/login">client
        portal</a> in less than 60 seconds. The Bearer Token needs to be
        included in all API requests made to the API Service in the following
        form: <div id="auth-example">Authorization: Bearer
        [YOUR_TOKEN]</div><div id="auth-reminder"><div
        id="edge-green"></div><div id="auth-reminder-text">You must replace
        [YOUR_TOKEN] with your personal API key.</div></div>

````