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

# List Documents

> Retrieve all documents and categories for the authenticated user.

This endpoint returns a comprehensive list of all documents uploaded by the user, including their metadata, processing status, and available document categories with counts.


**Returns:**

- `List of document objects, each containing`:
  - `id`: Unique document identifier
  - `filename`: Original filename
  - `type`: File type/MIME type
  - `size`: File size in bytes
  - `upload_date`: ISO 8601 timestamp of upload
  - `status`: Processing status (e.g., `COMPLETED`, `PROCESSING`, `FAILED`)
  - `categories`: List of category names assigned to this document
  - `uploader`: Username of the uploader
  - `processing_progress` (optional): Processing progress percentage (0-100)

- `categories`: List of category objects, each containing:
  - `name`: Category name
  - `count`: Number of documents in this category


**Example Request:**

```json
GET /api/v3/documents
Headers: {"Authorization": "Bearer <api_key>"}
```


**Example Response:**

```json
{
  "documents": [
    {
      "id": "doc-abc123",
      "filename": "quarterly_report.jsom",
      "size": 102400,
      "upload_date": "2024-01-15T10:30:00Z",
      "status": "READY",
      "categories": ["financial", "2024"],
      "uploader": "john.doe@example.com",
      "processing_progress": 100
    },
    {
      "id": "doc-xyz789",
      "filename": "meeting_notes.txt",
      "size": 45678,
      "upload_date": "2024-01-16T14:20:00Z",
      "status": "PROCESSING",
      "categories": ["meetings"],
      "uploader": "john.doe@example.com",
      "processing_progress": 65
    }
  ],
  "categories": [
    {
      "name": "financial",
      "count": 5
    },
    {
      "name": "2024",
      "count": 12
    },
    {
      "name": "meetings",
      "count": 8
    }
  ]
}
```


**Notes:**

- Categories are automatically extracted and organized for easy filtering
- Each category shows the total count of documents tagged with that category



## OpenAPI

````yaml https://api.nugen.in/openapi-public.json get /api/v3/documents
openapi: 3.1.0
info:
  title: Nugen Intelligence API
  description: 'Nugen Intelligence : Powering Specialized Intelligence At Scale'
  version: 25.4.20
servers: []
security: []
paths:
  /api/v3/documents:
    get:
      tags:
        - Documents
      summary: List Documents
      description: >-
        Retrieve all documents and categories for the authenticated user.


        This endpoint returns a comprehensive list of all documents uploaded by
        the user, including their metadata, processing status, and available
        document categories with counts.



        **Returns:**


        - `List of document objects, each containing`:
          - `id`: Unique document identifier
          - `filename`: Original filename
          - `type`: File type/MIME type
          - `size`: File size in bytes
          - `upload_date`: ISO 8601 timestamp of upload
          - `status`: Processing status (e.g., `COMPLETED`, `PROCESSING`, `FAILED`)
          - `categories`: List of category names assigned to this document
          - `uploader`: Username of the uploader
          - `processing_progress` (optional): Processing progress percentage (0-100)

        - `categories`: List of category objects, each containing:
          - `name`: Category name
          - `count`: Number of documents in this category


        **Example Request:**


        ```json

        GET /api/v3/documents

        Headers: {"Authorization": "Bearer <api_key>"}

        ```



        **Example Response:**


        ```json

        {
          "documents": [
            {
              "id": "doc-abc123",
              "filename": "quarterly_report.jsom",
              "size": 102400,
              "upload_date": "2024-01-15T10:30:00Z",
              "status": "READY",
              "categories": ["financial", "2024"],
              "uploader": "john.doe@example.com",
              "processing_progress": 100
            },
            {
              "id": "doc-xyz789",
              "filename": "meeting_notes.txt",
              "size": 45678,
              "upload_date": "2024-01-16T14:20:00Z",
              "status": "PROCESSING",
              "categories": ["meetings"],
              "uploader": "john.doe@example.com",
              "processing_progress": 65
            }
          ],
          "categories": [
            {
              "name": "financial",
              "count": 5
            },
            {
              "name": "2024",
              "count": 12
            },
            {
              "name": "meetings",
              "count": 8
            }
          ]
        }

        ```



        **Notes:**


        - Categories are automatically extracted and organized for easy
        filtering

        - Each category shows the total count of documents tagged with that
        category
      operationId: list_documents
      responses:
        '200':
          description: >-
            Returns a comprehensive list of all documents uploaded by the
            authenticated user, including their metadata, processing status, and
            available document categories with counts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentsData'
      security:
        - HTTPBearer: []
components:
  schemas:
    DocumentsData:
      properties:
        documents:
          items:
            $ref: '#/components/schemas/api_v3__schemas__Document'
          type: array
          title: Documents
          description: >-
            List of all documents uploaded by the user, including metadata and
            processing status
        categories:
          items:
            $ref: '#/components/schemas/DocumentCategory'
          type: array
          title: Categories
          description: >-
            List of all document categories with document counts for filtering
            and organization
      type: object
      required:
        - documents
        - categories
      title: DocumentsData
      examples:
        - categories:
            - count: 5
              name: financial
          documents:
            - categories:
                - financial
                - '2024'
              filename: quarterly_report.pdf
              id: doc-abc123
              processing_progress: 100
              size: 2548736
              status: READY
              type: application/pdf
              upload_date: '2024-01-15T10:30:00Z'
              uploader: user@example.com
    api_v3__schemas__Document:
      properties:
        document_id:
          type: string
          title: Document Id
          description: Unique identifier for the document
          example:
            - doc-abc123
            - doc-def456
        filename:
          type: string
          title: Filename
          description: Original filename of the uploaded document
          example:
            - product_catalog.docx
            - training_manual.txt
        type:
          type: string
          title: Type
          description: MIME type of the document
          example:
            - text/plain
        size:
          type: integer
          minimum: 0
          title: Size
          description: File size in bytes
          example:
            - 2548736
            - 1024000
            - 512000
        upload_date:
          type: string
          title: Upload Date
          description: timestamp when the document was uploaded
          example:
            - '2024-01-15T10:30:00Z'
        status:
          $ref: '#/components/schemas/DocumentStatus'
          description: >-
            Current processing status of the document (PROCESSING, READY,
            FAILED)
        categories:
          items:
            type: string
          type: array
          title: Categories
          description: >-
            List of category tags assigned to the document for organization and
            retrieval
          example:
            - - customer_support
              - documentation
            - - products
              - sales
            - - legal
              - compliance
        uploader:
          type: string
          title: Uploader
          description: Email/username of the user who uploaded the document
          example:
            - user@example.com
            - admin@example.com
        processing_progress:
          anyOf:
            - type: integer
              maximum: 100
              minimum: 0
            - type: 'null'
          title: Processing Progress
          description: >-
            Processing progress percentage (0-100). Null if not started or not
            applicable.
          example:
            - 100
            - 65
            - 0
            - null
      type: object
      required:
        - document_id
        - filename
        - type
        - size
        - upload_date
        - status
        - categories
        - uploader
      title: DocumentInfo
      examples:
        - categories:
            - customer_support
            - documentation
          document_id: doc-abc123
          filename: customer_support_guide.txt
          processing_progress: 100
          size: 2548736
          status: READY
          type: text/plain
          upload_date: '2024-01-15T10:30:00Z'
          uploader: user@example.com
    DocumentCategory:
      properties:
        name:
          type: string
          title: Name
          description: Name of the category
          example:
            - financial
            - customer_support
            - legal
            - 2024-q1
        count:
          type: integer
          minimum: 0
          title: Count
          description: Number of documents tagged with this category
          example:
            - 5
            - 12
            - 8
      type: object
      required:
        - name
        - count
      title: DocumentCategory
      examples:
        - count: 5
          name: financial
        - count: 12
          name: customer_support
    DocumentStatus:
      type: string
      enum:
        - PROCESSING
        - READY
        - FAILED
      title: DocumentStatus
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````