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

# LIST Document

> Returns a paged list of the Lease's Documents.

**Required capabilities:** `READ:DOCUMENT`

## Filters

Filters combine with AND: a result must match every filter you supply.

| Filter | Description |
| - | - |
| `filename` | Case-insensitive contains match on the document filename. |
| `docCategory` | Case-insensitive exact match on the document category label; an unrecognized value returns no results. |
| `documentStatus` | Case-sensitive exact match on the review status. |
| `numberOfPagesMin` | Minimum page count; inclusive. |
| `numberOfPagesMax` | Maximum page count; inclusive. |


## OpenAPI

````yaml /api-reference/openapi.json get /rest/v2/accounts/{accountId}/leases/{leaseId}/docs
openapi: 3.1.0
info:
  title: Prophia API Documentation
  license:
    name: Apache 2.0
    url: http://springdoc.org
  version: v2.495.0
servers:
  - url: https://api.prophia.com
    description: Prophia API
security:
  - apiKey: []
tags:
  - name: Accounts
    description: >-
      Accounts are the top-level scope for everything in the API. Start here:
      list your accounts to find the `accountId` every other path requires.
  - name: Properties
    description: >-
      Properties group one or more buildings under a single asset within an
      account.
  - name: Buildings
    description: Buildings are the physical structures where leases and spaces live.
  - name: Building Spaces
    description: >-
      Building spaces are the units inside a building — suites, floors, storage.
      A space's `suiteNumber` is the canonical name that tag `applicableSpaces`
      entries reference by string match.
  - name: Leases
    description: >-
      Leases are the agreements occupying building spaces. Each lease carries
      its source documents and the tags (structured terms) extracted from them.
  - name: Documents
    description: >-
      Documents are the source files attached to leases — original leases,
      amendments, memorandums, etc.
  - name: Tags
    description: >-
      Tags are the structured lease terms Prophia extracts from documents — a
      rent amount, a renewal option, a key date — each cited to its location in
      the source document. STANDARD tags carry a typed `value`; COMPLEX tags
      carry option details in `tagComponents`.
  - name: Custom Terms
    description: >-
      Custom terms are account-level definitions of extra lease terms your team
      tracks beyond Prophia's standard set. Tags created from them are ordinary
      tags with `isCustomTag: true` — the definition and its tag instances are
      separate resources.
  - name: Custom Fields
    description: >-
      Custom Fields are Account-level fields your team tracks on Buildings
      beyond Prophia's standard set. A `SINGLE` field holds free text per
      Building; a `MULTI` field holds one of a fixed list of options.
      Assignments set a field's value on a Building.
  - name: Loans
    description: >-
      Loans are the financing agreements secured by an account's buildings. Each
      loan carries its source documents and the terms read from them: summary
      terms, covenants and reporting deliverables. Loans is a Labs feature in
      beta, and its endpoints may change.
    x-beta: true
paths:
  /rest/v2/accounts/{accountId}/leases/{leaseId}/docs:
    get:
      tags:
        - Leases
      summary: LIST Document
      description: |-
        Returns a paged list of the Lease's Documents.

        **Required capabilities:** `READ:DOCUMENT`
      operationId: listDocs
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: leaseId
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: 0-based page index. Negative values are clamped to 0.
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            description: 0-based page index. Negative values are clamped to 0.
        - name: limit
          in: query
          description: >-
            Page size. Values outside 1–200 are clamped, not rejected; check the
            response's `limit` for the value actually applied.
          required: false
          schema:
            type: integer
            format: int32
            default: 50
            description: >-
              Page size. Values outside 1–200 are clamped, not rejected; check
              the response's `limit` for the value actually applied.
        - name: sortBy
          in: query
          description: >-
            Sort field. Defaults to `filename`; unrecognized values silently
            fall back to the default.
          required: false
          schema:
            type: string
            default: filename
            enum:
              - filename
              - createdAt
              - numberOfPages
              - docCategory
        - name: sortDir
          in: query
          description: >-
            Sort direction: `asc` (default) or `desc`. Any other value is
            treated as `asc`.
          required: false
          schema:
            type: string
            default: asc
            description: >-
              Sort direction: `asc` (default) or `desc`. Any other value is
              treated as `asc`.
        - name: filename
          in: query
          description: Case-insensitive contains match on the document filename.
          required: false
          schema:
            type: string
            description: Case-insensitive contains match on the document filename.
            x-mint:
              pre:
                - Filter
        - name: docCategory
          in: query
          description: >-
            Case-insensitive exact match on the document category label; an
            unrecognized value returns no results.
          required: false
          schema:
            type: string
            description: >-
              Case-insensitive exact match on the document category label; an
              unrecognized value returns no results.
            enum:
              - Main Lease Agreement
              - Extension - Amendment
              - Expansion - Amendment
              - Contraction - Amendment
              - Move - Amendment
              - Correction - Amendment
              - New Rights - Amendment
              - Other - Amendment
              - Commencement Letter
              - Work Letter
              - Lease Abstract
              - Stacking Plan
              - Floorplan
              - Site Plan
              - Letter of Credit
              - Letter of Intent
              - Certificate of Insurance
              - Notices
              - Termination Notices
              - Assignment and Assumption Agreement
              - Telecom/Antenna Agreement
              - Storage Agreement
              - Other
              - Sublease Agreement
              - Consent to Sublease
              - Parking Agreement
              - Licensing Agreement
              - Guaranty
              - Estoppel
              - Management Office Agreement
              - Loan Agreement
              - Letter Agreement
              - JV Agreement
              - Closing Document
              - Purchase & Sale Agreement
              - Management Agreement
              - Brokerage Listing Agreement
              - Real Estate Tax Bills
              - Capital Projects
              - Service Agreement
              - Subordination, Non-Disturbance and Attornment Agreement
              - Ground Lease
              - Memorandum of Lease
              - Rent Roll
            x-mint:
              pre:
                - Filter
        - name: documentStatus
          in: query
          description: >-
            Case-sensitive exact match on the review status. 'processing'
            matches every document still in the AI pipeline.
          required: false
          schema:
            type: string
            description: >-
              Case-sensitive exact match on the review status. 'processing'
              matches every document still in the AI pipeline.
            x-mint:
              pre:
                - Filter
        - name: numberOfPagesMin
          in: query
          description: Minimum page count; inclusive.
          required: false
          schema:
            type: integer
            format: int32
            description: Minimum page count; inclusive.
            x-mint:
              pre:
                - Filter
        - name: numberOfPagesMax
          in: query
          description: Maximum page count; inclusive.
          required: false
          schema:
            type: integer
            format: int32
            description: Maximum page count; inclusive.
            x-mint:
              pre:
                - Filter
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/V2PagedLeaseDocResult'
        '400':
          description: >-
            Invalid input — for example an unknown `include` key or a malformed
            parameter value
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ErrorResponse'
              example:
                error: Invalid Input
                errorCode: InvalidInput
                message: >-
                  Unknown include keys: [bogus]; supported: [tags, documents,
                  subleases]
                status: 400 BAD_REQUEST
                timestamp: '2026-09-02T20:41:03.118Z'
                localizedMessage: >-
                  Unknown include keys: [bogus]; supported: [tags, documents,
                  subleases]
        '401':
          description: >-
            The credential was rejected before the request reached the endpoint
            — for example a JWT was presented where an API key is required. Only
            `error` is populated on this path
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ErrorResponse'
              example:
                error: JWT authentication is not supported. Use an API key.
        '403':
          description: >-
            The API key is valid but lacks a required capability, or its
            building permissions do not cover the requested resource. The
            message names the missing capabilities only in the former case
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ErrorResponse'
              example:
                error: Access Denied
                errorCode: AccessDenied
                message: 'Not authorized. Missing capabilities: READ:TAG'
                status: 403 FORBIDDEN
                timestamp: '2026-09-02T20:41:03.118Z'
                localizedMessage: 'Not authorized. Missing capabilities: READ:TAG'
        '404':
          description: No such resource is visible to the account named in the path
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ErrorResponse'
              example:
                error: Entity Not Found
                errorCode: EntityNotFound
                message: This entity is not found in the system.
                status: 404 NOT_FOUND
                timestamp: '2026-09-02T20:41:03.118Z'
                localizedMessage: This entity is not found in the system.
components:
  schemas:
    V2PagedLeaseDocResult:
      type: object
      properties:
        totalCount:
          type: integer
          format: int64
          description: Total number of items matching the request across all pages.
        page:
          type: integer
          format: int32
          description: 0-based index of this page.
        limit:
          type: integer
          format: int32
          description: >-
            Page size actually applied — requested values outside 1–200 are
            clamped.
        items:
          type: array
          description: The Documents on this page of results.
          items:
            $ref: '#/components/schemas/V2LeaseDocModel'
        hasMore:
          type: boolean
          description: >-
            True when more pages exist after this one. Iterate on this rather
            than computing page counts from totalCount, which can change between
            requests.
    V2ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Stable error category
          example: Invalid Input
        errorCode:
          type: string
          description: Stable error code suitable for programmatic handling
          example: InvalidInput
        message:
          type: string
          description: Human-readable detail; may aggregate multiple field errors
        status:
          type: string
          description: >-
            HTTP status of the response as code and reason phrase, matching the
            response's own status line
          example: 404 NOT_FOUND
        timestamp:
          type: string
          format: date-time
          description: When the error was produced, as an ISO-8601 UTC instant
          example: '2026-09-02T20:41:03.118Z'
        localizedMessage:
          type: string
          description: >-
            Same text as `message`; present because the body is a serialized
            exception. Prefer `message`
    V2LeaseDocModel:
      type: object
      description: >-
        Representation of a Lease Document. Each Document belongs to one Lease
        and cannot be duplicated within a single Lease.
      properties:
        id:
          type: string
          description: Prophia internal Document ID (UUID).
          readOnly: true
        filename:
          type: string
          description: >-
            Name of the document from your file system. This can not be
            duplicated for multiple files in the same Lease.
        title:
          type: string
          description: Display title; defaults to the filename when not set.
        numberOfPages:
          type: integer
          format: int32
          description: 1-based count of pages in the Document.
          readOnly: true
        docCategory:
          type: string
          description: >-
            Document classification. Certain Document categories may determine
            which Tags and in-app features the Document is included in. If left
            blank, Prophia's AI will inspect the Document and set it
            accordingly, with a human review to follow. The AI will not
            overwrite an existing category if one is already set.
          enum:
            - Main Lease Agreement
            - Extension - Amendment
            - Expansion - Amendment
            - Contraction - Amendment
            - Move - Amendment
            - Correction - Amendment
            - New Rights - Amendment
            - Other - Amendment
            - Commencement Letter
            - Work Letter
            - Lease Abstract
            - Stacking Plan
            - Floorplan
            - Site Plan
            - Letter of Credit
            - Letter of Intent
            - Certificate of Insurance
            - Notices
            - Termination Notices
            - Assignment and Assumption Agreement
            - Telecom/Antenna Agreement
            - Storage Agreement
            - Other
            - Sublease Agreement
            - Consent to Sublease
            - Parking Agreement
            - Licensing Agreement
            - Guaranty
            - Estoppel
            - Management Office Agreement
            - Loan Agreement
            - Letter Agreement
            - JV Agreement
            - Closing Document
            - Purchase & Sale Agreement
            - Management Agreement
            - Brokerage Listing Agreement
            - Real Estate Tax Bills
            - Capital Projects
            - Service Agreement
            - Subordination, Non-Disturbance and Attornment Agreement
            - Ground Lease
            - Memorandum of Lease
            - Rent Roll
        createdAt:
          type: string
          format: date-time
          description: When the Document was uploaded to Prophia.
          readOnly: true
        documentStatus:
          type: string
          description: >-
            Processing state: `processing` while the document is in Prophia's AI
            ingestion pipeline, then `incomplete` followed by any account
            specific statuses (defined by/through our operations team) and
            ultimately `complete` when the Document has been fully processed. To
            understand how this plays into the broader onboarding state of the
            Lease and Building see our understanding onboarding conceptual
            guide.
          readOnly: true
        splitStatus:
          type: string
          description: >-
            Whether this Document was split into parts. `single` is an ordinary
            Document, `combined` is an original that was split (its data lives
            on its parts), and `split` is a part cut from an original.
          enum:
            - single
            - combined
            - split
          readOnly: true
        originalDocId:
          type: string
          description: >-
            For a part (`splitStatus` = `split`), the ID of the original
            Document it was cut from. Omitted otherwise.
          readOnly: true
  securitySchemes:
    apiKey:
      type: apiKey
      description: >-
        Prophia API key — either an account key (grants admin level permissions)
        or a user key with the REST scope. Send it in the `X-API-Key` header, or
        equivalently as `Authorization: Bearer <api-key>`. JWTs are rejected on
        /rest endpoints with 401.
      name: X-API-Key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.