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

# List all documents

> Retrieve a list of documents for the authenticated team.



## OpenAPI

````yaml get /documents
openapi: 3.1.0
info:
  version: 0.0.1
  title: Abacus API
  description: Abacus is the operating system for Merchant Cash Advance businesses.
  contact:
    name: Abacus Support
    email: support@abacuslabs.co
    url: https://abacuslabs.co
  license:
    name: AGPL-3.0 license
    url: https://github.com/Suphian/abacus/blob/main/LICENSE
servers:
  - url: https://api.abacuslabs.co
    description: Production API
security:
  - oauth2: []
  - token: []
paths:
  /documents:
    get:
      tags:
        - Documents
      summary: List all documents
      description: Retrieve a list of documents for the authenticated team.
      operationId: listDocuments
      parameters:
        - schema:
            type: string
            nullable: true
            description: >-
              A cursor for pagination. Pass the value returned from the previous
              response to get the next page.
            example: '20'
          required: false
          description: >-
            A cursor for pagination. Pass the value returned from the previous
            response to get the next page.
          name: cursor
          in: query
        - schema:
            type: array
            nullable: true
            items:
              type: string
              minLength: 1
            minItems: 2
            maxItems: 2
            description: >-
              Sorting order as a tuple: [field, direction]. Example: ['name',
              'asc'].
          required: false
          description: >-
            Sorting order as a tuple: [field, direction]. Example: ['name',
            'asc'].
          in: query
          name: sort
        - schema:
            type: number
            minimum: 1
            maximum: 100
            description: Number of documents to return per page.
            example: 20
          required: false
          description: Number of documents to return per page.
          name: pageSize
          in: query
        - schema:
            type: string
            nullable: true
            description: Search query string to filter documents by text.
            example: invoice
          required: false
          description: Search query string to filter documents by text.
          name: q
          in: query
        - schema:
            type: array
            nullable: true
            items:
              type: string
            description: Array of tag IDs to filter documents by tags.
            example:
              - tag1
              - tag2
          required: false
          description: Array of tag IDs to filter documents by tags.
          name: tags
          in: query
        - schema:
            type: array
            nullable: true
            items:
              type: string
            description: >-
              Filter documents by MCA document type. Supply one or more enum
              values to OR them together.
            example:
              - contract
          required: false
          description: >-
            Filter documents by MCA document type. Supply one or more enum
            values to OR them together.
          name: documentType
          in: query
      responses:
        '200':
          description: Retrieve a list of documents for the authenticated team.
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      cursor:
                        type: string
                        nullable: true
                        description: Cursor for pagination.
                        example: '20'
                      hasPreviousPage:
                        type: boolean
                        description: Whether there is a previous page.
                        example: false
                      hasNextPage:
                        type: boolean
                        description: Whether there is a next page.
                        example: true
                    required:
                      - hasPreviousPage
                      - hasNextPage
                    description: Pagination metadata for the documents list.
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the document.
                          example: doc_1234567890abcdef
                        title:
                          type: string
                          nullable: true
                          description: Title of the document.
                          example: Invoice April 2024
                        pathTokens:
                          type: array
                          items:
                            type: string
                          description: >-
                            Array of path tokens representing the document's
                            location.
                          example:
                            - invoices
                            - '2024'
                            - april
                            - invoice-123.pdf
                        metadata:
                          type: object
                          nullable: true
                          properties:
                            size:
                              type: number
                              nullable: true
                              description: Size of the document in bytes.
                              example: 204800
                            mimetype:
                              type: string
                              nullable: true
                              description: MIME type of the document.
                              example: application/pdf
                          required:
                            - size
                            - mimetype
                          description: Metadata about the document.
                        processingStatus:
                          type: string
                          description: Processing status of the document.
                          example: processed
                        summary:
                          type: string
                          nullable: true
                          description: Summary or extracted content from the document.
                          example: Invoice for April 2024, total $1,200.00
                        date:
                          type: string
                          nullable: true
                          description: Date associated with the document (ISO 8601).
                          example: '2024-04-30'
                      required:
                        - id
                        - title
                        - pathTokens
                        - metadata
                        - processingStatus
                        - summary
                        - date
                      description: A single document object response.
                      example:
                        id: doc_1234567890abcdef
                        title: Invoice April 2024
                        pathTokens:
                          - invoices
                          - '2024'
                          - april
                          - invoice-123.pdf
                        metadata:
                          size: 204800
                          mimetype: application/pdf
                        processingStatus: processed
                        summary: Invoice for April 2024, total $1,200.00
                        date: '2024-04-30'
                    description: Array of document objects.
                required:
                  - meta
                  - data
                description: >-
                  Response containing a list of documents and pagination
                  metadata.
                example:
                  meta:
                    cursor: '20'
                    hasPreviousPage: false
                    hasNextPage: true
                  data:
                    - id: doc_1234567890abcdef
                      title: Invoice April 2024
                      pathTokens:
                        - invoices
                        - '2024'
                        - april
                        - invoice-123.pdf
                      metadata:
                        size: 204800
                        mimetype: application/pdf
                      processingStatus: processed
                      summary: Invoice for April 2024, total $1,200.00
                      date: '2024-04-30'
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer
      description: Default authentication mechanism
      x-speakeasy-example: ABACUS_API_KEY

````

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