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

# Prepare document uploads

> Issues one upload slot per image (one side of one document). Put each returned `uploadId` into the matching schema property (`documentFront` / `documentBack`). Slots expire after 1 hour.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/onboarding/cases/{caseId}/uploads/prepare
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/prepare:
    post:
      tags:
        - Customer Onboarding
      summary: Prepare document uploads
      description: >-
        Issues one upload slot per image (one side of one document). Put each
        returned `uploadId` into the matching schema property (`documentFront` /
        `documentBack`). Slots expire after 1 hour.
      operationId: prepareOnboardingUploads
      parameters:
        - name: caseId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - files
              properties:
                files:
                  type: array
                  minItems: 1
                  maxItems: 10
                  items:
                    type: object
                    required:
                      - field
                      - contentType
                    properties:
                      field:
                        type: string
                        example: identifyingInformation[0].documentFront
                        description: Free label for your own bookkeeping
                      side:
                        type: string
                        enum:
                          - front
                          - back
                        default: front
                      contentType:
                        type: string
                        enum:
                          - image/jpeg
                          - image/png
      responses:
        '200':
          description: Upload slots
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      caseId:
                        type: string
                        format: uuid
                      uploads:
                        type: array
                        items:
                          type: object
                          properties:
                            uploadId:
                              type: string
                              format: uuid
                            field:
                              type: string
                            side:
                              type: string
                            method:
                              type: string
                              example: POST
                            url:
                              type: string
                            headers:
                              type: object
                            accept:
                              type: array
                              items:
                                type: string
                            maxFileSizeBytes:
                              type: integer
                            expiresAt:
                              type: string
                              format: date-time
        '400':
          description: Invalid file spec
          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: Case 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.