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

# List Files

> List your uploaded files, newest first. Expired files are omitted, as they 404 on `GET /v1/files/{file_id}`.

Pages continue from the last file returned rather than from an offset, so an upload or delete between requests never repeats or skips a file. Pass the previous page's `next_cursor` as `cursor`; the last page has `next_cursor: null`.



## OpenAPI

````yaml /openapi.json get /v1/files
openapi: 3.1.0
info:
  title: Decart API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/files:
    get:
      summary: List Files
      description: >-
        List your uploaded files, newest first. Expired files are omitted, as
        they 404 on `GET /v1/files/{file_id}`.


        Pages continue from the last file returned rather than from an offset,
        so an upload or delete between requests never repeats or skips a file.
        Pass the previous page's `next_cursor` as `cursor`; the last page has
        `next_cursor: null`.
      operationId: list_files_v1_files_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 100
            title: Limit
          description: Files per page (1..1000); default 100.
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
          description: '`next_cursor` from the previous page. Omit for the first page.'
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
            description: API key for authentication
            title: X-Api-Key
          description: API key for authentication
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileListResponse'
        '422':
          description: >-
            Validation Error — `limit` out of range, or a `cursor` this endpoint
            did not return
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    FileListResponse:
      properties:
        files:
          type: array
          items:
            $ref: '#/components/schemas/FileReferenceResponse'
          title: Files
          description: Newest first.
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Pass back as `cursor` to fetch the next page; null on the last page.
      type: object
      required:
        - files
        - next_cursor
      title: FileListResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FileReferenceResponse:
      properties:
        id:
          type: string
          title: Id
        filename:
          anyOf:
            - type: string
            - type: 'null'
          title: Filename
        mime_type:
          type: string
          title: Mime Type
        size_bytes:
          type: integer
          title: Size Bytes
        md5:
          anyOf:
            - type: string
            - type: 'null'
          title: Md5
          description: >-
            Hex MD5 of the uploaded bytes. Null on files uploaded before hashes
            were recorded.
        created_at:
          type: string
          format: date-time
          title: Created At
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
      type: object
      required:
        - id
        - filename
        - mime_type
        - size_bytes
        - md5
        - created_at
        - expires_at
      title: FileReferenceResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````