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

# Upload Document



## OpenAPI

````yaml put /external/upload
openapi: 3.0.2
info:
  title: Shieldbase AI
  version: 1.0.0
servers: []
security: []
paths:
  /external/upload:
    put:
      tags:
        - public
      summary: Upload Document
      operationId: upload_document_external_upload_put
      parameters:
        - required: true
          schema:
            title: Client-Id
            type: string
          name: client-id
          in: header
        - required: true
          schema:
            title: Private-Key
            type: string
          name: private-key
          in: header
        - required: true
          schema:
            title: Secret
            type: string
          name: secret
          in: header
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                files:
                  type: array
                  items:
                    type: string
                    format: binary
              required:
                - files
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: >-
                      The files has been uploaded and is being processed. Please
                      wait a moment.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: cURL
          source: >-
            curl --location --request PUT
            'https://app.sbai.cloud/api/external/upload' \

            --header 'client-id: your-client-id' \

            --header 'private-key: your-private-key' \

            --header 'secret: your-secret' \

            --form 'files=@/path/to/file1.pdf' \

            --form 'files=@/path/to/file2.pdf'
        - lang: Python
          source: |-
            import requests

            url = 'https://app.sbai.cloud/api/external/upload'
            headers = {
                'client-id': '0fbc9cf2-595a-4068-a643-a58d764514df',
                'private-key': 'pk-5d72029b',
                'secret': 'sk-5d72029b34dbc6c89f837ec8f2413b734fd37b2a681bd2f58d'
            }
            files = [
                ('files', open('/path/to/file1.pdf', 'rb')),
                ('files', open('/path/to/file2.pdf', 'rb'))
            ]

            response = requests.put(url, headers=headers, files=files)
            print(response.json())
components:
  schemas:
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    ValidationError:
      title: ValidationError
      required:
        - loc
        - msg
        - type
      type: object
      properties:
        loc:
          title: Location
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string

````