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

# Get Documents

> Retrieve all documents belonging to a user.



## OpenAPI

````yaml get /v1/documents
openapi: 3.1.0
info:
  title: AI Form-Filler API
  version: 0.1.0
servers:
  - url: https://api.simplicity.ai
    description: Production
  - url: http://localhost:8000
    description: Local
security: []
paths:
  /v1/documents:
    get:
      tags:
        - Documents
      summary: Get Documents
      description: Retrieve all documents belonging to a user.
      operationId: get_documents_v1_documents_get
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 10
            title: Page Size
        - name: document_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Document Type
        - name: file_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: File Type
        - name: start_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Start Date
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: End Date
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: include_form_documents
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Include Form Documents
        - name: order
          in: query
          required: false
          schema:
            type: string
            default: desc
            title: Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDocumentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PaginatedDocumentResponse:
      properties:
        page:
          type: integer
          title: Page
        total_pages:
          type: integer
          title: Total Pages
        documents:
          items:
            $ref: '#/components/schemas/DocumentResponse'
          type: array
          title: Documents
      type: object
      required:
        - page
        - total_pages
        - documents
      title: PaginatedDocumentResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DocumentResponse:
      properties:
        document_id:
          type: string
          title: Document Id
          description: The unique identifier for the document
        extension:
          anyOf:
            - type: string
            - type: 'null'
          title: Extension
          description: The extension of the document
        original_filename:
          anyOf:
            - type: string
            - type: 'null'
          title: Original Filename
          description: The original filename of the document
        document_type:
          anyOf:
            - $ref: '#/components/schemas/DocumentSource'
            - type: 'null'
          description: >-
            Whether this file is the **FORM_DOCUMENT** (the form to fill) or a
            **SOURCE_DOCUMENT** (context for filling). See the DocumentSource
            schema for details.
          default: SOURCE_DOCUMENT
        file_key:
          type: string
          title: File Key
          description: The file key for the document in the S3 bucket
        original_document_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Original Document Url
          description: The original URL of the document that was supplied by the user
        presigned_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Presigned Url
          description: The Presigned url of the document
        metadata:
          anyOf:
            - $ref: '#/components/schemas/DocumentMetadata'
            - type: 'null'
          description: The metadata of the document
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: Date and time document was updated
      type: object
      required:
        - document_id
        - file_key
      title: DocumentResponse
    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
    DocumentSource:
      type: string
      enum:
        - FORM_DOCUMENT
        - SOURCE_DOCUMENT
      title: DocumentSource
      description: >-
        Classifies an uploaded document for the form-filling workflow.


        - **FORM_DOCUMENT** — The PDF form to be filled. Use this for the actual
        application, intake, or questionnaire file the AI should complete. Only
        PDF is supported for form documents.


        - **SOURCE_DOCUMENT** — Supporting material used as context when filling
        a form: PDFs, **images** (for example photos of IDs or receipts), and
        other reference files (policies, prior submissions, spreadsheets,
        notes). This is the default when the parameter is omitted. Upload
        multiple source documents and reference them when creating or
        autofilling a form alongside a **FORM_DOCUMENT**.
    DocumentMetadata:
      properties:
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: The title of the document
        keywords:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Keywords
          description: The keywords of the document
        total_pages:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Pages
          description: The total pages of the document
        file_size:
          anyOf:
            - type: number
            - type: 'null'
          title: File Size
          description: The file size of the document in MB
        file_type:
          anyOf:
            - $ref: '#/components/schemas/FileType'
            - type: 'null'
          description: The type of the document
      type: object
      title: DocumentMetadata
    FileType:
      type: string
      enum:
        - PDF
        - IMAGE
        - OTHER
      title: FileType
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````