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

# Upload a prepared document image

> Send the **raw image bytes** as the request body (no multipart, no base64) with `Content-Type` equal to the type declared at prepare time. JPEG or PNG, max 5 MB; file signature is verified. Stored encrypted and deleted once submitted.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/onboarding/cases/{caseId}/uploads/{uploadId}
openapi: 3.0.3
info:
  title: XentFi API
  version: 1.0.0
  description: >-
    API documentation for XentFi.The XentFi API gives you access to pretty much
    all the features you can use on our dashboard and lets you extend them for
    use in your application. It strives to be RESTful and is organized around
    the main resources you would be interacting with - with a few notable
    exceptions.
servers:
  - url: https://api.xentfi.com
    description: Production server
security: []
tags: []
paths:
  /v1/onboarding/cases/{caseId}/uploads/{uploadId}:
    post:
      tags:
        - Customer Onboarding
      summary: Upload a prepared document image
      description: >-
        Send the **raw image bytes** as the request body (no multipart, no
        base64) with `Content-Type` equal to the type declared at prepare time.
        JPEG or PNG, max 5 MB; file signature is verified. Stored encrypted and
        deleted once submitted.
      operationId: uploadOnboardingDocument
      parameters:
        - name: caseId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: uploadId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          image/jpeg:
            schema:
              type: string
              format: binary
          image/png:
            schema:
              type: string
              format: binary
      responses:
        '200':
          description: Stored
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      caseId:
                        type: string
                      uploadId:
                        type: string
                      field:
                        type: string
                      side:
                        type: string
                      status:
                        type: string
                        example: UPLOADED
                      sizeBytes:
                        type: integer
        '400':
          description: Wrong type, too large, expired or already used
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: NOT_FOUND
                      message:
                        type: string
                        example: Wallet not found
                      timestamp:
                        type: string
                        format: date-time
                      requestId:
                        type: string
        '404':
          description: Upload not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: NOT_FOUND
                      message:
                        type: string
                        example: Wallet not found
                      timestamp:
                        type: string
                        format: date-time
                      requestId:
                        type: string
      security:
        - ApiKeyAuth: []
          OrgIdAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apiKey
    OrgIdAuth:
      type: apiKey
      in: header
      name: orgId

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.