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

# Upload Verification Document

> Upload KYC/KYB documents to an existing verification

export function RequiredRunnerHeaders() {
  return <>
      <ParamField header="X-Forwarded-For" type="string" required>
        Client source IP (runner default: `127.0.0.1`)
      </ParamField>
      <ParamField header="X-Tenant-ID" type="string" required>
        Tenant identifier
      </ParamField>
      <ParamField header="X-Forwarded-From" type="string" required>
        Client source identifier (runner default: `integration-client`)
      </ParamField>
      <ParamField header="platform" type="string" required>
        Client platform (runner default: `web`)
      </ParamField>
      <ParamField header="deviceId" type="string" required>
        Device identifier (runner default: `integration-device`)
      </ParamField>
      <ParamField header="Authorization" type="string" required>
        Bearer token
      </ParamField>
    </>;
}

# Upload Verification Document

Uploads a base64 encoded document file to a verification case.

## Endpoint

`POST /api/v2.1/verifications/{verificationId}/documents`

## Required Headers

<RequiredRunnerHeaders />

## Request Example (B2C)

```json theme={null}
{
  "verificationId": "825f84a5-a709-4e58-a80f-b51871d94cfb",
  "documentType": "PASSPORT",
  "mimeType": "application/pdf",
  "fileName": "passport.pdf",
  "fileContent": "<base64>",
  "customerId": "2dac1793-ab48-420c-b0b5-01292302e188"
}
```

## Request Example (B2B)

```json theme={null}
{
  "verificationId": "ac0d408e-06b8-420c-9876-745db4ea4c98",
  "documentType": "CERTIFICATE_OF_INCORPORATION",
  "mimeType": "application/pdf",
  "fileName": "certificate_of_incorporation.pdf",
  "fileContent": "<base64>",
  "organizationId": "f458d016-56bb-43a6-856c-4d0456b2c38c"
}
```

## Success Response

```json 200 theme={null}
{
  "code": 200,
  "data": {
    "documentId": "80cfa65a-713e-4802-a550-090adef9bcfd",
    "documentType": "DT_PASSPORT",
    "fileName": "passport.pdf"
  },
  "message": "Success"
}
```

<Note>
  Used in B2C step runner Step 5 and B2B step runner Step 6.
</Note>


## OpenAPI

````yaml fincheck.yaml POST /api/v2.1/verifications/{verificationId}/documents
openapi: 3.0.3
info:
  title: Fincheck Endpoint Set
  version: 1.1.0
  description: |
    Focused API spec for Customer APIs and Verification & Compliance endpoints,
    aligned to business-bff B2C/B2B runners and dump payloads.
servers:
  - url: https://sandbox.finhub.cloud
security: []
paths:
  /api/v2.1/verifications/{verificationId}/documents:
    post:
      operationId: uploadVerificationDocument
      parameters:
        - $ref: '#/components/parameters/XForwardedFor'
        - $ref: '#/components/parameters/XTenantId'
        - $ref: '#/components/parameters/XForwardedFrom'
        - $ref: '#/components/parameters/Platform'
        - $ref: '#/components/parameters/DeviceId'
        - $ref: '#/components/parameters/Authorization'
        - in: path
          name: verificationId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadVerificationDocument'
      responses:
        '200':
          description: Document uploaded
components:
  parameters:
    XForwardedFor:
      in: header
      name: X-Forwarded-For
      required: true
      schema:
        type: string
      example: 127.0.0.1
    XTenantId:
      in: header
      name: X-Tenant-ID
      required: true
      schema:
        type: string
      example: 97e7ff29-15f3-49ef-9681-3bbfcce4f6cd
    XForwardedFrom:
      in: header
      name: X-Forwarded-From
      required: true
      schema:
        type: string
      example: integration-client
    Platform:
      in: header
      name: platform
      required: true
      schema:
        type: string
      example: web
    DeviceId:
      in: header
      name: deviceId
      required: true
      schema:
        type: string
      example: integration-device
    Authorization:
      in: header
      name: Authorization
      required: true
      schema:
        type: string
      example: Bearer YOUR_ACCESS_TOKEN
  schemas:
    UploadVerificationDocument:
      type: object
      required:
        - documentType
        - fileName
        - fileContent
        - mimeType
        - verificationId
      properties:
        documentType:
          type: string
          example: PASSPORT
        fileName:
          type: string
          example: passport.pdf
        fileContent:
          type: string
          example: JVBERi0xLjQK...
        mimeType:
          type: string
          example: application/pdf
        verificationId:
          type: string
          example: 825f84a5-a709-4e58-a80f-b51871d94cfb
        customerId:
          type: string
          example: 2dac1793-ab48-420c-b0b5-01292302e188
        organizationId:
          type: string
          example: f458d016-56bb-43a6-856c-4d0456b2c38c
      example:
        documentType: PASSPORT
        fileName: passport.pdf
        fileContent: JVBERi0xLjQK...
        mimeType: application/pdf
        verificationId: 825f84a5-a709-4e58-a80f-b51871d94cfb
        customerId: 2dac1793-ab48-420c-b0b5-01292302e188

````