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

# List documents

> Lists documents in a workspace with cursor-based pagination. Use the `after` parameter with the `nextCursor` value from the response to fetch subsequent pages. Pass `hash` (a hex SHA-256) to find documents with identical content — a non-empty result means the document already exists, so an upload can be skipped.



## OpenAPI

````yaml /api-reference/openapi.json get /workspaces/{workspaceId}/documents
openapi: 3.1.0
info:
  title: Nvisy API
  summary: Document detection and redaction platform
  description: >-
    Nvisy provides intelligent detection of sensitive content in documents,
    redaction pipelines, and reviewer workflows. This API enables document
    upload, detection analysis, redaction, and collaborative review across your
    workspaces.
  termsOfService: https://nvisy.com/legal/terms-of-service
  contact:
    name: Nvisy Support
    url: https://nvisy.com
    email: hello@nvisy.com
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 0.1.0
servers: []
security: []
tags:
  - name: Health
    description: Service health checks
  - name: Capabilities
    description: Read-only reference data describing this deployment
  - name: Accounts
    description: Account management and profile operations
  - name: Identities
    description: 'Account sign-in methods: password and linked providers'
  - name: Avatars
    description: Public avatar image serving
  - name: Authentication
    description: Login, signup, and token management
  - name: Workspaces
    description: Workspace creation and management
  - name: Activities
    description: Workspace activity log and export
  - name: Documents
    description: Document upload, download, and management
  - name: Analytics
    description: Aggregate metrics over a workspace's documents
  - name: Members
    description: Workspace member management
  - name: Invites
    description: Workspace invitation handling
  - name: API Tokens
    description: API token management
  - name: Connections
    description: External provider connections
  - name: Connection Syncs
    description: Connection synchronization runs
  - name: Providers
    description: Inference-provider configuration
  - name: Pipelines
    description: Redaction pipeline configuration
  - name: Detections
    description: Detection analysis and redaction
  - name: Redactions
    description: Redactions produced from a detection, with reviewer edits
  - name: Reviews
    description: Document reviews, the review queue, and their discussion
  - name: Policies
    description: Redaction policy configuration
  - name: Webhooks
    description: Webhook configuration
  - name: Notifications
    description: Account notification management
paths:
  /workspaces/{workspaceId}/documents:
    get:
      tags:
        - Documents
      summary: List documents
      description: >-
        Lists documents in a workspace with cursor-based pagination. Use the
        `after` parameter with the `nextCursor` value from the response to fetch
        subsequent pages. Pass `hash` (a hex SHA-256) to find documents with
        identical content — a non-empty result means the document already
        exists, so an upload can be skipped.
      parameters:
        - in: path
          name: workspaceId
          description: Workspace identifier.
          required: true
          schema:
            description: Workspace identifier.
            type: string
            format: uuid
          style: simple
        - in: query
          name: formats
          description: |-
            Filter by file extension. Each entry expands to its format's full
            extension set (so `jpg` also matches `jpeg`).
          schema:
            description: |-
              Filter by file extension. Each entry expands to its format's full
              extension set (so `jpg` also matches `jpeg`).
            type: array
            items:
              $ref: '#/components/schemas/FormatToken'
          style: form
        - in: query
          name: hash
          description: >-
            Filter to documents whose content is exactly this SHA-256. Lets a
            client

            check whether identical content already exists in the workspace
            before

            uploading it.
          schema:
            $ref: '#/components/schemas/DocumentHash'
            description: >-
              Filter to documents whose content is exactly this SHA-256. Lets a
              client

              check whether identical content already exists in the workspace
              before

              uploading it.
          style: form
        - in: query
          name: modality
          description: Filter by modality (`text`, `tabular`, `image`, `audio`).
          schema:
            description: Filter by modality (`text`, `tabular`, `image`, `audio`).
            type: array
            items:
              $ref: '#/components/schemas/ModalityToken'
          style: form
        - in: query
          name: search
          description: Search by document name (case-insensitive, partial match).
          schema:
            description: Search by document name (case-insensitive, partial match).
            type: string
          style: form
        - in: query
          name: after
          description: |-
            Cursor pointing to the last item of the previous page.
            Obtain this from the `nextCursor` field in the response.
          schema:
            description: |-
              Cursor pointing to the last item of the previous page.
              Obtain this from the `nextCursor` field in the response.
            type: string
          style: form
        - in: query
          name: includeCount
          description: >-
            Whether to include the total item count in the response's `total`
            field.

            Defaults to `false`, since counting is an extra query; set it to
            `true`

            only when the count is actually needed.
          schema:
            description: >-
              Whether to include the total item count in the response's `total`
              field.

              Defaults to `false`, since counting is an extra query; set it to
              `true`

              only when the count is actually needed.
            type: boolean
            default: false
          style: form
        - in: query
          name: limit
          description: 'The maximum number of records to return (1-100, default: 20).'
          schema:
            description: 'The maximum number of records to return (1-100, default: 20).'
            type: integer
            format: uint32
            maximum: 100
            minimum: 1
          style: form
      responses:
        '200':
          description: >-
            Generic paginated response wrapper.


            Provides a consistent structure for all paginated API responses with

            cursor-based pagination support. When `next_cursor` is present,
            there

            are more items to fetch.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceDocumentPage'
        '400':
          description: >-
            The serialized shape of an HTTP error: the inert wire/OpenAPI-schema
            view

            that [`Error`] renders to at the response boundary.


            It carries no builder logic — [`Error`] is the type handlers
            construct and

            thread through `Result`, and it builds an `ErrorResponse` directly
            in its

            `IntoResponse` impl. `context` and `status` are not part of the JSON
            body

            (`context` is logged, `status` sets the HTTP status line).


            [`Error`]: crate::response::Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: >-
            The serialized shape of an HTTP error: the inert wire/OpenAPI-schema
            view

            that [`Error`] renders to at the response boundary.


            It carries no builder logic — [`Error`] is the type handlers
            construct and

            thread through `Result`, and it builds an `ErrorResponse` directly
            in its

            `IntoResponse` impl. `context` and `status` are not part of the JSON
            body

            (`context` is logged, `status` sets the HTTP status line).


            [`Error`]: crate::response::Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            The serialized shape of an HTTP error: the inert wire/OpenAPI-schema
            view

            that [`Error`] renders to at the response boundary.


            It carries no builder logic — [`Error`] is the type handlers
            construct and

            thread through `Result`, and it builds an `ErrorResponse` directly
            in its

            `IntoResponse` impl. `context` and `status` are not part of the JSON
            body

            (`context` is logged, `status` sets the HTTP status line).


            [`Error`]: crate::response::Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    FormatToken:
      description: A supported file extension.
      type: string
      enum:
        - csv
        - docx
        - htm
        - html
        - jpeg
        - jpg
        - json
        - log
        - pdf
        - png
        - rtf
        - tif
        - tiff
        - txt
        - wav
        - x-elide-docprops
        - x-elide-exif
        - xlsx
        - xml
    DocumentHash:
      description: A SHA-256 content hash as a 64-character hex string.
      type: string
      pattern: ^[0-9a-fA-F]{64}$
    ModalityToken:
      description: A supported document modality.
      type: string
      enum:
        - audio
        - image
        - metadata
        - tabular
        - text
    WorkspaceDocumentPage:
      description: |-
        Generic paginated response wrapper.

        Provides a consistent structure for all paginated API responses with
        cursor-based pagination support. When `next_cursor` is present, there
        are more items to fetch.
      type: object
      properties:
        items:
          description: Items in this page.
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceDocument'
        nextCursor:
          description: Cursor to fetch the next page. Present only when more items exist.
          type: string
        total:
          description: Total count of items matching the query (if requested).
          type: integer
          format: int64
      required:
        - items
    ErrorResponse:
      description: >-
        The serialized shape of an HTTP error: the inert wire/OpenAPI-schema
        view

        that [`Error`] renders to at the response boundary.


        It carries no builder logic — [`Error`] is the type handlers construct
        and

        thread through `Result`, and it builds an `ErrorResponse` directly in
        its

        `IntoResponse` impl. `context` and `status` are not part of the JSON
        body

        (`context` is logged, `status` sets the HTTP status line).


        [`Error`]: crate::response::Error
      type: object
      properties:
        message:
          description: User-friendly error message safe for client display.
          type: string
        name:
          description: The error name/type identifier.
          type: string
      required:
        - name
        - message
    WorkspaceDocument:
      description: Represents a document in responses.
      type: object
      properties:
        createdAt:
          description: Creation timestamp.
          type: string
          format: date-time
        displayName:
          description: Display name.
          type: string
        extension:
          description: File extension (without dot). Owned by the document.
          type: string
        hash:
          description: >-
            Lowercase hex-encoded SHA-256 of the document's plaintext content.
            Resolved

            from the backing blob.
          type: string
        id:
          description: Unique document identifier.
          type: string
          format: uuid
        kind:
          description: The document's role (original or redacted).
          allOf:
            - $ref: '#/components/schemas/DocumentKind'
        originalFilename:
          description: Original filename when uploaded.
          type: string
        size:
          description: Size in bytes. Resolved from the backing blob.
          type: integer
          format: int64
        updatedAt:
          description: Last update timestamp.
          type: string
          format: date-time
        uploadedBy:
          description: Account that uploaded/created the document.
          allOf:
            - $ref: '#/components/schemas/AccountRef'
        workspaceHandle:
          description: URL-safe workspace handle. Display-only.
          allOf:
            - $ref: '#/components/schemas/Handle'
        workspaceId:
          description: Unique identifier of the workspace.
          type: string
          format: uuid
      required:
        - id
        - workspaceId
        - workspaceHandle
        - displayName
        - originalFilename
        - extension
        - size
        - hash
        - kind
        - uploadedBy
        - createdAt
        - updatedAt
    DocumentKind:
      description: |-
        The kind of a human-facing document.

        Corresponds to the `DOCUMENT_KIND` `PostgreSQL` enum. Machine byproducts
        (detection audits, review audits, enrichment intermediates) are not
        documents — they reference blobs directly from their own tables.
      oneOf:
        - description: Source document, uploaded or imported.
          type: string
          const: original
        - description: Redacted output produced by a redaction.
          type: string
          const: redacted
    AccountRef:
      description: >-
        Public reference to the account behind a resource — whoever created it,

        uploaded it, triggered it, or performed it.


        Reused across resource responses so an account is always presented the
        same

        way: its immutable id (the durable reference) plus a handle and optional

        avatar for display.
      type: object
      properties:
        avatarUrl:
          description: Serve path of the account's avatar, when set.
          type: string
        displayName:
          description: Human-readable display name, when set.
          type: string
        id:
          description: Immutable id of the account.
          type: string
          format: uuid
        username:
          description: Handle of the account (display).
          allOf:
            - $ref: '#/components/schemas/Handle'
      required:
        - id
        - username
    Handle:
      description: >-
        Lowercase, dash-separated identifier used in URLs and as account
        handles.
      type: string
      maxLength: 32
      minLength: 3
      pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$

````