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

# List Workspace Documents

> List documents in a workspace with search, filters, and pagination.

List workspace-scoped documents that can be reused across sessions and runs.

## Authentication & Scope

Requires `documents-read`.

## Request

```http theme={null}
GET /workspaces/12/documents?query=invoice&status=processed&page=1&per_page=20 HTTP/1.1
Host: api.raydocs.com
Authorization: Bearer <token>
```

### Query Parameters

| Parameter     | Type    | Description                                |
| ------------- | ------- | ------------------------------------------ |
| `query`       | string  | Search by filename, source URL, or hash    |
| `mime`        | string  | Filter by MIME type                        |
| `status`      | string  | Filter by document status                  |
| `source_type` | string  | `upload`, `url`, or `connector`            |
| `sort`        | string  | `created_at`, `filename`, `size`, `status` |
| `order`       | string  | `asc` or `desc`                            |
| `page`        | integer | Page number                                |
| `per_page`    | integer | Items per page (max 100)                   |

## Response

`200 OK`

```json theme={null}
{
  "data": [
    {
      "id": "880e8400-e29b-41d4-a716-446655440000",
      "workspace_id": 12,
      "filename": "invoice.pdf",
      "mime": "application/pdf",
      "size": 123456,
      "sha256": "6de7f6f5894c9f3fd1f6f8a4d1b3115d0d9b4b19d7a8a661f9fe90f9c2d80c3b",
      "status": "processed",
      "source_type": "upload",
      "created_at": "2026-02-28T10:30:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 20,
    "total": 153,
    "last_page": 8
  }
}
```


## OpenAPI

````yaml get /workspaces/{workspaceId}/documents
openapi: 3.0.1
info:
  title: Raydocs API
  description: REST API for document extraction with AI-powered data parsing
  version: 1.0.0
servers:
  - url: https://api.raydocs.com
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Create and manage workspaces.
  - name: Workspace Users
    description: Manage users within a workspace.
  - name: Extraction Templates
    description: Define extraction schemas and settings.
  - name: Extraction Sessions
    description: Manage extraction jobs and documents.
  - name: Batch Operations
    description: Bulk operations on sessions.
  - name: Documents
    description: Upload and manage source documents.
  - name: Results
    description: Access extraction results.
paths:
  /workspaces/{workspaceId}/documents:
    get:
      tags:
        - Documents
      summary: List Workspace Documents
      description: >-
        List documents in a workspace with pagination and filters. Requires
        `documents-read`.
      operationId: listWorkspaceDocuments
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: integer
        - name: page
          in: query
          schema:
            type: integer
            default: 1
        - name: per_page
          in: query
          schema:
            type: integer
            default: 20
            maximum: 100
        - name: query
          in: query
          schema:
            type: string
        - name: mime
          in: query
          schema:
            type: string
        - name: status
          in: query
          schema:
            type: string
        - name: source_type
          in: query
          schema:
            type: string
            enum:
              - upload
              - url
              - connector
        - name: sort
          in: query
          schema:
            type: string
            enum:
              - created_at
              - filename
              - size
              - status
        - name: order
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Document'
                  meta:
                    $ref: '#/components/schemas/PaginationMeta'
        '403':
          description: Forbidden
components:
  schemas:
    Document:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        workspace_id:
          type: integer
        filename:
          type: string
        mime:
          type: string
        size:
          type: integer
          description: File size in bytes
        sha256:
          type: string
          minLength: 64
          maxLength: 64
        status:
          type: string
          enum:
            - uploaded
            - queued
            - parsing
            - parsed
            - processed
            - failed
        source_type:
          type: string
          enum:
            - upload
            - url
            - connector
        source_url:
          type: string
          nullable: true
        parsings:
          type: array
          items:
            $ref: '#/components/schemas/DocumentParsingSummary'
        created_at:
          type: string
          format: date-time
          readOnly: true
    PaginationMeta:
      type: object
      properties:
        current_page:
          type: integer
        last_page:
          type: integer
        per_page:
          type: integer
        total:
          type: integer
    DocumentParsingSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
        config_hash:
          type: string
        status:
          type: string
          enum:
            - queued
            - processing
            - ready
            - failed
        parser_version:
          type: string
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Personal Access Token created from the Raydocs dashboard.

        Include in the Authorization header: `Bearer <your_token>`

        See [API Keys](/api-reference/api-keys) for token creation and
        management.

````