> ## 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 Session Documents

> List all workspace documents attached to an extraction session.

List all workspace-scoped documents attached to an extraction session.

## Authentication & Scope

Requires the `sessions-read` ability.

## Request

```http theme={null}
GET /extractions/sessions/{sessionId}/documents HTTP/1.1
Host: api.raydocs.com
Authorization: Bearer <token>
```

### Path Parameters

| Parameter   | Type | Required | Description    |
| ----------- | ---- | -------- | -------------- |
| `sessionId` | uuid | Yes      | The session ID |

## Response

`200 OK` – Session document list.

```json theme={null}
{
  "data": [
    {
    "id": "880e8400-e29b-41d4-a716-446655440000",
    "workspace_id": "660e8400-e29b-41d4-a716-446655440000",
    "filename": "invoice_001.pdf",
    "sha256": "6de7f6f5894c9f3fd1f6f8a4d1b3115d0d9b4b19d7a8a661f9fe90f9c2d80c3b",
    "status": "processed",
    "source": {
      "type": "upload"
    },
    "meta": {
      "page_count": 2,
      "file_size": 125000
    },
    "created_at": "2024-01-15T10:30:00Z"
    },
    {
    "id": "880e8400-e29b-41d4-a716-446655440001",
    "workspace_id": "660e8400-e29b-41d4-a716-446655440000",
    "filename": "invoice_002.pdf",
    "sha256": "bcf478e0af3f2aa34ad3f6c20d43d9e7ab332cd0ab471f6b4ea1986d8f97d5ab",
    "status": "processing",
    "source": {
      "type": "upload"
    },
    "meta": {},
    "created_at": "2024-01-15T10:35:00Z"
    }
  ]
}
```

<Note>
  The same document can appear in multiple sessions. Session membership is managed through an attachment relation, not document ownership.
</Note>

### Document Status Values

| Status       | Description                                 |
| ------------ | ------------------------------------------- |
| `uploaded`   | Document uploaded, awaiting processing      |
| `processing` | Document is being parsed and chunked        |
| `processed`  | Document processed and ready for extraction |
| `failed`     | Processing failed                           |


## OpenAPI

````yaml get /extractions/sessions/{sessionId}/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: Workflows
    description: Discover workflow runs and read their public outputs.
  - name: Results
    description: Access extraction results.
paths:
  /extractions/sessions/{sessionId}/documents:
    get:
      tags:
        - Extraction Sessions
      summary: List Session Documents
      description: List all documents in a session. Requires `sessions-read`.
      operationId: listSessionDocuments
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: page
          in: query
          schema:
            type: integer
            default: 1
      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.

````