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

# Upload User Files



## OpenAPI

````yaml POST /user/projects/file/upload
openapi: 3.1.0
info:
  title: Onyx API
  description: Onyx API for AI-powered enterprise search and chat
  version: Development
servers:
  - url: https://cloud.onyx.app/api
security: []
paths:
  /user/projects/file/upload:
    post:
      tags:
        - public
      summary: Upload User Files
      operationId: upload_user_files
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upload_user_files_user_projects_file_upload_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategorizedFilesSnapshot'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    Body_upload_user_files_user_projects_file_upload_post:
      properties:
        files:
          items:
            type: string
            format: binary
          type: array
          title: Files
        project_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Project Id
        temp_id_map:
          anyOf:
            - type: string
            - type: 'null'
          title: Temp Id Map
      type: object
      required:
        - files
      title: Body_upload_user_files_user_projects_file_upload_post
    CategorizedFilesSnapshot:
      properties:
        user_files:
          items:
            $ref: '#/components/schemas/UserFileSnapshot'
          type: array
          title: User Files
        rejected_files:
          items:
            $ref: '#/components/schemas/RejectedFile'
          type: array
          title: Rejected Files
      type: object
      required:
        - user_files
        - rejected_files
      title: CategorizedFilesSnapshot
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UserFileSnapshot:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        temp_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Temp Id
        name:
          type: string
          title: Name
        project_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Project Id
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Id
        file_id:
          type: string
          title: File Id
        created_at:
          type: string
          format: date-time
          title: Created At
        status:
          $ref: '#/components/schemas/UserFileStatus'
        last_accessed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Accessed At
        file_type:
          anyOf:
            - type: string
            - type: 'null'
          title: File Type
        chat_file_type:
          $ref: '#/components/schemas/ChatFileType'
        token_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Token Count
        chunk_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Chunk Count
      type: object
      required:
        - id
        - name
        - user_id
        - file_id
        - created_at
        - status
        - last_accessed_at
        - file_type
        - chat_file_type
        - token_count
        - chunk_count
      title: UserFileSnapshot
    RejectedFile:
      properties:
        file_name:
          type: string
          title: File Name
        reason:
          type: string
          title: Reason
      type: object
      required:
        - file_name
        - reason
      title: RejectedFile
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    UserFileStatus:
      type: string
      enum:
        - PROCESSING
        - COMPLETED
        - FAILED
        - CANCELED
        - DELETING
      title: UserFileStatus
    ChatFileType:
      type: string
      enum:
        - image
        - document
        - plain_text
        - csv
      title: ChatFileType
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Authorization header with Bearer token

````