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

# List Documents

> Retrieves a paginated list of documents for the current user



## OpenAPI

````yaml GET /docs
openapi: 3.0.1
info:
  title: Lex API
  description: An API to manage your documents
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://lex.page/api/v1
security:
  - bearerAuth: []
paths:
  /docs:
    get:
      description: Retrieves a paginated list of documents for the current user
      parameters:
        - name: page
          in: query
          description: Page number for pagination
          schema:
            type: integer
            default: 1
        - name: per_page
          in: query
          description: Number of items per page
          schema:
            type: integer
            default: 20
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  docs:
                    type: array
                    items:
                      $ref: '#/components/schemas/DocWithUserDetails'
                  pagination:
                    $ref: '#/components/schemas/PaginationInfo'
components:
  schemas:
    DocWithUserDetails:
      type: object
      properties:
        id:
          type: integer
          description: The document ID.
        updated_at:
          type: string
          format: date-time
          description: The last update timestamp of the document.
        user_docs:
          type: array
          items:
            type: object
            properties:
              user:
                type: object
                properties:
                  id:
                    type: integer
                    description: The user ID.
                  fname:
                    type: string
                    description: The user's first name.
                  lname:
                    type: string
                    description: The user's last name.
                  email:
                    type: string
                    format: email
                    description: The user's email address.
                  avatar_url:
                    type: string
                    format: uri
                    description: The URL of the user's avatar image.
    PaginationInfo:
      type: object
      properties:
        current_page:
          type: integer
          description: The current page number
        next_page:
          type: integer
          nullable: true
          description: The next page number, or null if there is no next page
        prev_page:
          type: integer
          nullable: true
          description: The previous page number, or null if there is no previous page
        total_pages:
          type: integer
          description: The total number of pages
        total_count:
          type: integer
          description: The total number of items across all pages
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````