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

# List File Uploads

> Retrieve a list of files for a specific app.



## OpenAPI

````yaml get /apps/{app_id}/files/uploads
openapi: 3.0.0
info:
  version: 1.0.0
  title: API
servers: []
security: []
paths:
  /apps/{app_id}/files/uploads:
    get:
      summary: List File Uploads
      description: Retrieve a list of files for a specific app.
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the app
          name: app_id
          in: path
        - schema:
            type: number
          required: false
          description: Page number
          name: page
          in: query
        - schema:
            type: number
          required: false
          description: Number of items to take
          name: take
          in: query
        - schema:
            type: string
          required: false
          description: Next page token (Only used on special endpoints)
          name: next
          in: query
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AppFileUploadSchema'
components:
  schemas:
    AppFileUploadSchema:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the uploaded file
        region:
          type: string
          description: Region on R2/Cloudflare
          example: european-union
        bucket:
          type: string
          description: Storage bucket for the file
          example: cortex-eu
        future_file_id:
          type: string
          description: Future file ID for the uploaded file
        file:
          $ref: '#/components/schemas/AppFileNullableSchema'
        upload_url:
          type: string
          description: URL to upload the file
        expires_at:
          type: string
          nullable: true
          description: Timestamp when the uploaded file will expire
          format: date
        metadata:
          $ref: '#/components/schemas/AppFileUploadMetadata'
        allowed_types:
          $ref: '#/components/schemas/FileAllowedTypesSchema'
        document_extract_contents:
          type: boolean
          description: >-
            Whether to extract contents from the document. If true, the file
            will be processed and contents extracted.
        document_extract_images:
          type: boolean
          description: >-
            Whether to extract images from the document. If true, images will be
            extracted.
        document_pages:
          type: array
          nullable: true
          items:
            type: number
          maxItems: 1024
          description: Array of page numbers to extract from the document
          example:
            - 1
            - 2
            - 3
        storage:
          $ref: '#/components/schemas/AppFileStorageSchema'
        visibility:
          $ref: '#/components/schemas/AppFileVisibilitySchema'
        created_at:
          type: string
          nullable: true
          description: Timestamp when the uploaded file was created
          format: date
        updated_at:
          type: string
          nullable: true
          description: Timestamp when the uploaded file was last updated
          format: date
      required:
        - id
        - future_file_id
        - file
        - upload_url
        - expires_at
        - document_pages
        - storage
        - visibility
        - created_at
        - updated_at
      description: Uploaded file information
    AppFileNullableSchema:
      type: object
      nullable: true
      properties:
        id:
          type: string
          description: Unique identifier for the file
        file_id:
          type: string
          description: File identifier used in the storage system
        file_filename:
          type: string
          description: Name of the file
          example: document.pdf
        file_size:
          type: number
          description: Size of the file in bytes
          example: 1024
        file_mimetype:
          type: string
          description: MIME type of the file
          example: application/pdf
        file_url:
          type: string
          description: URL to access the file
        file_format:
          type: string
          enum:
            - DOCUMENT
          description: Format of the file
          example: DOCUMENT
        file_status:
          type: string
          enum:
            - PROCESSING
            - PROCESSED
            - FAILED
          description: Current status of the file
          example: PROCESSED
        file_status_message:
          type: string
          description: >-
            Status message providing additional information about the file
            status
        document:
          $ref: '#/components/schemas/DocumentSchema'
        document_extract_contents:
          type: boolean
          description: Flag indicating whether to extract contents from the document
        document_extract_images:
          type: boolean
          description: Flag indicating whether to extract images from the document
        document_extract_pages:
          type: boolean
          description: Flag indicating whether to extract pages from the document
        document_pages:
          type: array
          items:
            type: number
          maxItems: 1024
          description: Array of page numbers to extract from the document
          example:
            - 1
            - 2
            - 3
        document_progress:
          type: number
          description: Progress of the document extraction process
        storage:
          $ref: '#/components/schemas/AppFileStorageSchema'
        created_at:
          type: string
          nullable: true
          description: Timestamp when the file was created
          format: date
      required:
        - id
        - file_id
        - file_filename
        - file_size
        - file_mimetype
        - file_url
        - created_at
      description: The file associated with the upload, if available
    AppFileUploadMetadata:
      type: object
      nullable: true
      additionalProperties:
        nullable: true
      description: Custom metadata for the uploaded file as key-value pairs (Max 2KB)
    FileAllowedTypesSchema:
      type: array
      nullable: true
      items:
        type: string
        maxLength: 255
      maxItems: 255
      default:
        - '*/*'
      description: >-
        The allowed mime types for the file field (e.g. image/*,
        application/pdf)
    AppFileStorageSchema:
      type: string
      enum:
        - PERSISTENT
        - TEMPORARY
      default: PERSISTENT
      description: >-
        Whether the file is stored permanently or temporarily, indicating the
        storage type
      example: PERSISTENT
    AppFileVisibilitySchema:
      type: string
      enum:
        - PUBLIC
        - PRIVATE
      description: >-
        Whether the file is private or public, private files URLs are signed
        with a token and can be accessed temporarily
      example: PRIVATE
    DocumentSchema:
      type: object
      properties:
        filename:
          type: string
          description: Name of the document file
        filetype:
          type: string
          description: Type of the document file
        contents:
          type: array
          items:
            $ref: '#/components/schemas/DocumentContentSchema'
          description: >-
            Array of document contents (only available if extract_contents is
            true)
        images:
          type: array
          items:
            $ref: '#/components/schemas/DocumentImageSchema'
          description: Array of document images (only available if extract_images is true)
        extracted_pages:
          type: string
          description: >-
            Extracted pages from the document (only available if extract_pages
            is true)
        time:
          type: number
          description: Time taken to process the document
      required:
        - filename
        - filetype
        - contents
        - images
      description: Document data associated with the file
    DocumentContentSchema:
      type: object
      properties:
        id:
          type: number
          description: Unique identifier for the content
        type:
          type: string
          enum:
            - TITLE
            - TEXT
            - UNTEXT
            - NARRATIVETEXT
            - BULLETEDTEXT
            - ABSTRACT
            - THREADING
            - FORM
            - FIELD-NAME
            - VALUE
            - LINK
            - COMPOSITEELEMENT
            - IMAGE
            - PICTURE
            - FIGURECAPTION
            - FIGURE
            - CAPTION
            - LIST
            - LISTITEM
            - LIST-ITEM
            - CHECKED
            - UNCHECKED
            - ADDRESS
            - EMAILADDRESS
            - PAGEBREAK
            - FORMULA
            - TABLE
            - HEADER
            - HEADLINE
            - SUBHEADLINE
            - PAGE-HEADER
            - SECTION-HEADER
            - FOOTER
            - FOOTNOTE
            - PAGE-FOOTER
          description: Type of the content element
        content:
          type: string
          description: Content text
        content_as_html:
          type: string
          description: Content text in HTML format
        page:
          type: number
          description: Page number where the content is located in the document
        parent:
          type: number
          description: Parent content identifier
      required:
        - id
        - type
        - content
        - page
      description: Detailed information about the content of a document
    DocumentImageSchema:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the image
        file_id:
          type: string
          description: File identifier associated with the image
        image_url:
          type: string
          description: URL of the image
        type:
          type: string
          description: Type of the image
        page:
          type: number
          description: Page number where the image is located in the document
        height:
          type: number
          description: Height of the image
        width:
          type: number
          description: Width of the image
      required:
        - id
        - file_id
        - image_url
        - type
        - page
        - height
        - width
      description: Detailed information about an image in a document

````